On 7/16/2019 10:34 AM, A.McLoughlin wrote:
> Previously in the PCAP PMD it was only possibe to specify an rxq which
> uses an iface or a pcap file. This patch creates a 'dummy Rx' function
> which is used when no rx_pcap or rx_iface is passed but a tx queue is
> passed. This function can be polled and receives no packets.

+1 to the feature, thanks.
So user doesn't have to provide both "rx" and "tx" queue anymore, user can only
provide "tx" queue if the intention is just capture Tx packets.

> 
> Signed-off-by: A.McLoughlin <aideen.mclough...@intel.com>
> ---
>  drivers/net/pcap/rte_eth_pcap.c | 64 ++++++++++++++++++++++++---------

Can you please update documentation too, 'pcap_ring.rst' to document new
behavior and release notes to announce the feature briefly?

<...>

> +             /* Creating a dummy rx queue for each tx queue passed */
> +             for (i = 0; i < num_tx_queues; i++)
> +                     ret =
> +                     add_queue(&pcaps, "dummy_rx", "rx_null", NULL, NULL);

Please fix the syntax.

> +     } else {
> +             PMD_LOG(ERR, "Error - No rx or tx queues provided");
> +             exit(0);

We are not allowed to exit/abort in drivers, that is application's discretion,
can you please return error in this case, please remember the cleanup before 
return.

Reply via email to