aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/devices/dpdk/device.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vnet/vnet/devices/dpdk/device.c b/vnet/vnet/devices/dpdk/device.c
index 9f40c277..800a06ca 100644
--- a/vnet/vnet/devices/dpdk/device.c
+++ b/vnet/vnet/devices/dpdk/device.c
@@ -160,12 +160,13 @@ dpdk_validate_rte_mbuf (vlib_main_t * vm, vlib_buffer_t * b,
rte_mbuf header */
if (PREDICT_FALSE ((b->flags & VNET_BUFFER_RTE_MBUF_VALID) == 0))
{
- last_mb = mb = rte_mbuf_from_vlib_buffer (b);
+ vlib_buffer_t *b2 = b;
+ last_mb = mb = rte_mbuf_from_vlib_buffer (b2);
rte_pktmbuf_reset (mb);
- while (maybe_multiseg && (b->flags & VLIB_BUFFER_NEXT_PRESENT))
+ while (maybe_multiseg && (b2->flags & VLIB_BUFFER_NEXT_PRESENT))
{
- b = vlib_get_buffer (vm, b->next_buffer);
- mb = rte_mbuf_from_vlib_buffer (b);
+ b2 = vlib_get_buffer (vm, b2->next_buffer);
+ mb = rte_mbuf_from_vlib_buffer (b2);
last_mb->next = mb;
last_mb = mb;
rte_pktmbuf_reset (mb);