patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com,
	Shihong Wang <shihong.wang@corigine.com>,
	stable@dpdk.org, Akhil Goyal <gakhil@marvell.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Chaoyong He <chaoyong.he@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH] examples/ipsec-secgw: fix Rx queue ID in Rx callback
Date: Mon, 11 Mar 2024 10:32:47 +0800	[thread overview]
Message-ID: <20240311023247.2520028-1-chaoyong.he@corigine.com> (raw)

From: Shihong Wang <shihong.wang@corigine.com>

The Rx queue ID on the core and on the port are not necessarily
equal, for example, there are two RX queues on core0, queue0 and
queue1, queue0 is the rx_queueid0 on port0 and queue1 is the
rx_queueid0 on port1.

The 'rte_eth_add_rx_callback()' function is based on the port
registration callback function, so should be the RX queue ID on
the port.

Fixes: d04bb1c52647 ("examples/ipsec-secgw: use HW parsed packet type in poll mode")
Cc: stable@dpdk.org
Cc: Akhil Goyal <gakhil@marvell.com>
Cc: Radu Nicolau <radu.nicolau@intel.com>

Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a61bea400a..45a303850d 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2093,10 +2093,10 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
 
 			/* Register Rx callback if ptypes are not supported */
 			if (!ptype_supported &&
-			    !rte_eth_add_rx_callback(portid, queue,
+			    !rte_eth_add_rx_callback(portid, rx_queueid,
 						     parse_ptype_cb, NULL)) {
 				printf("Failed to add rx callback: port=%d, "
-				       "queue=%d\n", portid, queue);
+				       "rx_queueid=%d\n", portid, rx_queueid);
 			}
 
 
-- 
2.39.1


             reply	other threads:[~2024-03-11  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  2:32 Chaoyong He [this message]
2024-03-18  3:20 ` Thomas Monjalon

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=20240311023247.2520028-1-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.com \
    --cc=radu.nicolau@intel.com \
    --cc=shihong.wang@corigine.com \
    --cc=stable@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).