From patchwork Thu Jun 29 13:21:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 129115 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 617F142D8C; Thu, 29 Jun 2023 15:54:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 336BD410D0; Thu, 29 Jun 2023 15:54:50 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 2507C40EDB for ; Thu, 29 Jun 2023 15:54:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688046888; x=1719582888; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=J3H8sTzFdM93d3Otb46Ptn013Wb1LiVa554dPJfwIhg=; b=KIiG/7x8tIVvKL6yisB+sPBMjGEmA/wYRQEQaXx3ycEO4V1nu+BXSJpO 076zcLVKrVy2WQXLKQCWnbCHnzCQi+u6iv4UC//gOUft3Cld9Ii3RDBwj 0ITd6H+AGQipzFZGrGhXQiQDZ7yfZS11ZLRvEcgMuxEsAWz4EzxYC7jno oDJZHtmLF9/rEd0bZaDrVW8Y0DsTinhYKGmIQaoQ+6+IoZZRwD5bFsV3Y hGXhAFA6FAJmqAaktgiBst6tIOElTyqY8EhiP4x/tQYPORUS70LtLB+e9 2tLPo15FuB2MSlKtpJyyts6JxPHt/V95eHmVkJgrk7tpqAzk+el6S+5AR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="364670299" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="364670299" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 06:22:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="1047763294" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="1047763294" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.80]) by fmsmga005.fm.intel.com with ESMTP; 29 Jun 2023 06:21:57 -0700 From: Ciara Power To: dev@dpdk.org Cc: kai.ji@intel.com, Ciara Power , olivier.matz@6wind.com, Akhil Goyal , Fan Zhang Subject: [PATCH] cryptodev: fix device socket ID type Date: Thu, 29 Jun 2023 13:21:55 +0000 Message-Id: <20230629132155.75075-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 The socket ID field for a cryptodev device data was unsigned int. Due to recent changes to the default device socket ID, this caused an issue when the socket ID was unknown and set to -1. The device socket ID wrapped around to 255, and caused errors when allocating memory. Changing this field type to int fixes the issue, as it now takes the correct -1 value. Fixes: 7dcd73e37965 ("drivers/bus: set device NUMA node to unknown by default") Cc: olivier.matz@6wind.com Signed-off-by: Ciara Power Acked-by: Kai Ji > Acked-by: Morten Brørup Acked-by: Kai Ji --- lib/cryptodev/cryptodev_pmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h index 8710ed7558..4c98cedca6 100644 --- a/lib/cryptodev/cryptodev_pmd.h +++ b/lib/cryptodev/cryptodev_pmd.h @@ -65,7 +65,7 @@ struct rte_cryptodev_data { /** Device ID for this instance */ uint8_t dev_id; /** Socket ID where memory is allocated */ - uint8_t socket_id; + int socket_id; /** Unique identifier name */ char name[RTE_CRYPTODEV_NAME_MAX_LEN];