The function rte_vlan_insert may allocate a new buffer for the
vlan header and return a different mbuf than originally passed.
In this case, the stored mbuf in txm[] array could point to wrong
buffer.
Fixes:
dd856dfcb9e7 ("virtio: use any layout on Tx")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
rte_pktmbuf_free(txm);
continue;
}
+ /* vlan_insert may add a header mbuf */
+ tx_pkts[nb_tx] = txm;
}
/* optimize ring usage */
rte_pktmbuf_free(txm);
continue;
}
+ /* vlan_insert may add a header mbuf */
+ tx_pkts[nb_tx] = txm;
}
/* optimize ring usage */
rte_pktmbuf_free(txm);
continue;
}
+ /* vlan_insert may add a header mbuf */
+ tx_pkts[nb_tx] = txm;
}
/* optimize ring usage */