From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5B4D42DE7; Thu, 6 Jul 2023 13:00:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0971410FA; Thu, 6 Jul 2023 13:00:40 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 0C6E640A79; Thu, 6 Jul 2023 13:00:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688641239; x=1720177239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mU5Eo2Ee9KicAzvf7JfeaxZqGsyJwuCiRipfP5K8b54=; b=gp60TL06kew3+8nC9ZrXDuym/mps5YPYbs/iIaccl2vZ2yBOZxihKyD9 uBJwWJQs494Zh/UrjJa3sDtkmmllMGnKPyRtFE4MuLeGrGD7fIqdzRvTH 8NAGGhYpK1kKSglWv2p9MMkBGbBX6iOAxadcDzMbqsSGw0m5wHqUWwKX/ FofU2U15iAeqKUCQGFi7NnFBWt1tWS/pTr987srokZChlbe0aiobOd6UH lr+1/iBz+46emGfCguiuxGLOI8q1sSzKIy6uwGqviTEM/oEyafDrvPAy3 m/kEQPBqYIEepPvFH3iczX1O8Wz57s83BZYi2/9wYERCXowpV49J8cjlP Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10762"; a="363606341" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="363606341" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 04:00:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10762"; a="864071652" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="864071652" Received: from silpixa00400465.ir.intel.com ([10.55.129.105]) by fmsmga001.fm.intel.com with ESMTP; 06 Jul 2023 04:00:36 -0700 From: Kai Ji To: dev@dpdk.org Cc: gakhil@marvell.com, stable@dpdk.org, Kai Ji , 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 Message-Id: <20230706110034.981345-1-kai.ji@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230705172954.906085-1-kai.ji@intel.com> References: <20230705172954.906085-1-kai.ji@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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