dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "A.McLoughlin" <aideen.mcloughlin@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/pcap: create null Rx function
Date: Tue, 16 Jul 2019 12:06:04 +0100	[thread overview]
Message-ID: <70aa5fa8-8819-73ed-1ee7-d34332a2b886@intel.com> (raw)
In-Reply-To: <20190716093405.23192-1-aideen.mcloughlin@intel.com>

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.mcloughlin@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	other threads:[~2019-07-16 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16  9:34 [dpdk-dev] [PATCH] net/pcap: create null Rx function A.McLoughlin
2019-07-16 11:06 ` Ferruh Yigit [this message]
2019-07-16 15:43 ` [dpdk-dev] [PATCH v2] " A.McLoughlin
2019-07-17  8:08   ` [dpdk-dev] [PATCH v3] " A.McLoughlin
2019-07-17 16:10     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70aa5fa8-8819-73ed-1ee7-d34332a2b886@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=aideen.mcloughlin@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).