net/pcap: fix concurrent multiseg Tx
authorDavid Marchand <david.marchand@redhat.com>
Thu, 25 Jul 2019 19:24:19 +0000 (21:24 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 25 Jul 2019 22:32:18 +0000 (00:32 +0200)
commitfbbbf553f268b94d6dbe491a31d1f0c8d227465f
tree4c6cfa0d40ddd1c4482e1668a1b04fe98f9d114b
parent9be0b6bde39289cfe583a25070eba44383de7de7
net/pcap: fix concurrent multiseg Tx

Two cores can send multi segment packets on two different pcap ports.
Because of this, we can't have one single buffer to linearize packets.

Use rte_pktmbuf_read() to copy the packet into a buffer on the stack
and remove eth_pcap_gather_data() when necessary (if the mbuf is
contiguous, rte_pktmbuf_read() just points at the buffer address).

Fixes: 6db141c91e1f ("pcap: support jumbo frames")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/pcap/rte_eth_pcap.c