DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Aideen McLoughlin <aideen.mcloughlin@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	Muthurajan Jayakumar <muthurajan.jayakumar@intel.com>
Subject: [dpdk-dev] [PATCH] net/pcap: fix input only Rx
Date: Thu,  8 Oct 2020 12:34:25 +0100
Message-ID: <20201008113425.241010-1-ferruh.yigit@intel.com> (raw)

When input only Rx interface argument 'rx_iface_in' provided, current
code assigns 'eth_null_rx' burst function by mistake and no packet
received as a result.
Like in following usage no packets received from physical interface:
"--vdev net_pcap0,rx_iface_in=eth0,tx_iface=eth0"

Fixing the burst function assignment when 'rx_iface_in' argument is used

Fixes: f14a94591504 ("net/pcap: remove Rx queue argument necessity")
Cc: stable@dpdk.org

Reported-by: Muthurajan Jayakumar <muthurajan.jayakumar@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: aideen.mcloughlin@intel.com
 drivers/net/pcap/rte_eth_pcap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index da4988064a..057aa9dbfc 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1416,7 +1416,8 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
 	devargs_all.is_rx_pcap =
 		rte_kvargs_count(kvlist, ETH_PCAP_RX_PCAP_ARG) ? 1 : 0;
 	devargs_all.is_rx_iface =
-		rte_kvargs_count(kvlist, ETH_PCAP_RX_IFACE_ARG) ? 1 : 0;
+		(rte_kvargs_count(kvlist, ETH_PCAP_RX_IFACE_ARG) +
+		 rte_kvargs_count(kvlist, ETH_PCAP_RX_IFACE_IN_ARG)) ? 1 : 0;
 	pcaps.num_of_queue = 0;
 	devargs_all.is_tx_pcap =

             reply	other threads:[~2020-10-08 11:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 11:34 Ferruh Yigit [this message]
2020-10-09 14:39 ` 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:

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

  git send-email \
    --in-reply-to=20201008113425.241010-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=aideen.mcloughlin@intel.com \
    --cc=dev@dpdk.org \
    --cc=muthurajan.jayakumar@intel.com \
    --cc=stable@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git