From: Kai Ji <kai.ji@intel.com>
To: dev@dpdk.org
Cc: gakhil@marvell.com, stable@dpdk.org, Kai Ji <kai.ji@intel.com>,
olivier.matz@6wind.com
Subject: [PATCH v2] examples/ipsec-secgw: fix of socket id default value
Date: Thu, 6 Jul 2023 11:00:34 +0000 [thread overview]
Message-ID: <20230706110034.981345-1-kai.ji@intel.com> (raw)
In-Reply-To: <20230705172954.906085-1-kai.ji@intel.com>
Due to recent changes to the default device socket ID, before
being used as an index for session mempool list,
set socket ID to 0 if unknown (-1).
Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default")
Cc: olivier.matz@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Kai Ji <kai.ji@intel.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 029749e522..72b3bfba9e 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1699,6 +1699,9 @@ cryptodevs_init(enum eh_pkt_transfer_mode mode)
total_nb_qps += qp;
dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
+ /* Use the first socket if SOCKET_ID_ANY is returned. */
+ if (dev_conf.socket_id == SOCKET_ID_ANY)
+ dev_conf.socket_id = 0;
dev_conf.nb_queue_pairs = qp;
dev_conf.ff_disable = RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO;
--
2.34.1
next prev parent reply other threads:[~2023-07-06 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 17:29 [dpdk-dev v1] " Kai Ji
2023-07-06 11:00 ` Kai Ji [this message]
2023-07-06 15:58 ` [PATCH v2] " Power, Ciara
2023-07-06 18:17 ` Akhil Goyal
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=20230706110034.981345-1-kai.ji@intel.com \
--to=kai.ji@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=olivier.matz@6wind.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).