From patchwork Wed Jul 5 10:36:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 129287 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 16A0542DCC; Wed, 5 Jul 2023 12:36:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 062E940A8B; Wed, 5 Jul 2023 12:36:37 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 0C26E40FAE; Wed, 5 Jul 2023 12:36:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688553395; x=1720089395; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b5vYVOh5LwhyYy8oKhGUbdUDmFdyEliVcR63TJzXQ9Y=; b=Q7HxZJxE72kldnbS38bDiNmpnbdSdfoKJimrBZztTN5yjntNuhG/UM3T a64n2NFchMIaCHiXhpsBASpmscpJG27HSOcaXRX1A/4Ml6vp7lVwTzCVH j+UHvaZob+lvBHrr5dFA0rkBTy/cjvzcXyOp3OpTQUx2yy9mlDHQitJ+u 24cnKPHBlZNYWq7nzwGAAmE7KB9tlphI+MS5XStkF8DIWL8BozEXoVAVc WQtfE16MajzeWoRm9L7aU2KfABneeGlx7HhyGVp/MU5jQi/hGrXxIEpZe VzXjV75VcR+quuaDzdljMJUTkQleCs4G6aGUJ3jNxACOY6OquRAuVRV2/ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="348094947" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="348094947" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 03:36:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="748675324" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="748675324" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.80]) by orsmga008.jf.intel.com with ESMTP; 05 Jul 2023 03:36:32 -0700 From: Ciara Power To: dev@dpdk.org Cc: gakhil@marvell.com, Ciara Power , olivier.matz@6wind.com, stable@dpdk.org, =?utf-8?q?Morten_Br=C3=B8rup?= , Kai Ji , Fan Zhang Subject: [PATCH v2] cryptodev: fix device socket ID type Date: Wed, 5 Jul 2023 10:36:30 +0000 Message-Id: <20230705103630.1131136-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629132155.75075-1-ciara.power@intel.com> References: <20230629132155.75075-1-ciara.power@intel.com> 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 Cc: stable@dpdk.org Signed-off-by: Ciara Power Acked-by: Morten Brørup Acked-by: Kai Ji Acked-by: Konstantin Ananyev Acked-by: Akhil Goyal --- v2: Added cc for stable mailing list --- 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];