[dpdk-dev] [PATCH 19.08 v3 2/2] net/pcap: enable infinitely rxing a pcap file
ferruh.yigit at intel.com
Thu Jun 27 19:56:13 CEST 2019
On 6/14/2019 3:43 PM, Cian Ferriter wrote:
> It can be useful to use pcap files for some rudimental performance
> At a high level, this works by creaing a ring of sufficient size to
> store the packets in the pcap file passed to the application. When the
> rx function for this mode is called, packets are dequeued from the ring
> for use by the application and also enqueued back on to the ring to be
> "received" again.
> A tx_drop mode is also added since transmitting to a tx_pcap file isn't
> desirable at a high traffic rate.
> Jumbo frames are not supported in this mode. When filling the ring at rx
> queue setup time, the presence of multi segment mbufs is checked for.
> The PMD will exit on detection of these multi segment mbufs.
> Signed-off-by: Cian Ferriter <cian.ferriter at intel.com>
> @@ -106,6 +106,26 @@ Runtime Config Options
> --vdev 'net_pcap0,iface=eth0,phy_mac=1'
> +- Use the RX PCAP file to infinitely receive packets
> + In case ``rx_pcap=`` configuration is set, user may want to use the selected PCAP file for rudimental
> + performance testing. This can be done with a ``devarg`` ``infinite_rx``, for example::
> + --vdev 'net_pcap0,rx_pcap=file_rx.pcap,infinite_rx=1,tx_drop=1'
'tx_drop' seems remaining, it is no more valid.
> @@ -1337,6 +1551,9 @@ pmd_pcap_remove(struct rte_vdev_device *dev)
> eth_dev->data->mac_addrs = NULL;
> + if (internals->infinite_rx)
> + eth_dev_close(eth_dev);
Why 'internals->infinite_rx' check is required to call the 'eth_dev_close()'?
Can we remove the check?
More information about the dev