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 91A79A04A4; Tue, 1 Mar 2022 15:15:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E8BD426DE; Tue, 1 Mar 2022 15:15:25 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061.outbound.protection.outlook.com [40.107.94.61]) by mails.dpdk.org (Postfix) with ESMTP id 6E87240DF6; Tue, 1 Mar 2022 15:15:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZKUX/COELoGQEplINeM0wNVnTtIHS1Gippsn7J6zw8T/L5Yf3FlRFM7ZqKLejZYuNRw7WLbhe8j4DxzdIdraoxOOnxTlkcVxTT3Uvw3HZiJZg8SuO5bV1sAt7Uj09e0Urur1mx6ghzu/83YQjoOhaw5GVMsu6PyL/whnmEfiOMzrYjHhVSCDMprWJkCm3PI5ZGcqANd6Zzq2I6dgx6+hcl3ctbdJYSDO2NVwgIpVjiaHGaM9+BffjcVwXKvbc7SPjgfupTyPAXbg3OWCd4jAMPBzfpdZN02OLIOU/T0Y/+OdzRRefoztLxuHDiRTkaT7MGXQvtDiLeYQjmMurpPCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6h2a1U+MCKxeFbEWPke9wfHu4pdGLZ2Lfs/C3Ct8j8M=; b=b/RrcHdugjxJu1Mw2MOyNErh9lrIqRvpnVaNdigHSj303j93hIFaHxLDE3yBJZxljmMNHnLmj6xPJmPqQbWDTnRH31CAf2ima/zP5V39COlNN2UEJHsiL1AgocBTAc6RbxwBs0mL0K0q9+XVXJpZKfKAPVvtly0OxVw3v8U3KxzYHSxIyQBROCetCFX4X3xxyhYJtL/X1hV+edr+WdkZfghfTJKjOiX5ymTXKY4I/kqOalRkU6FN5urJY0IFf9AQ9qumrt3EQj6QdvttlJ8HsSO4+j+cEJQumLRJiCRPFY2BIWuCnBPJMt2VXI9kU+3bVPKTfI/dUcw0XsBPEjUSmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6h2a1U+MCKxeFbEWPke9wfHu4pdGLZ2Lfs/C3Ct8j8M=; b=WuCiAcN5vUMVxQtFhJxqdhElD1f16nGysniaVH/cKnMMjfKfAHqlKqi8XnUe0huwTzupue2rP2Hfb+jwZbvmBmyQ9CMLospy7+FGhnU53ajou/OIV9Ve1yTwprwzfrGYJeNIoj18oDxfs9Zhet6/4Km3Xfh5VzPZMRnxHzU26bZxzcg96btIBVrAFIojcSvJUWpl9RfHHBbekEjHYV9kANBMCj1qU9HOgbhL3Cp4gsIURXj/ZcKi2a/vlFLy9Sa/kGtEr9eFmYDv/1FsrhOO9y3k47v8xkhdJ7UcXUkOMVJKpdG9btSqlaK6WFYvlDYHJz8kyfcyhhFy4JlZYFfwRw== Received: from DM5PR2201CA0024.namprd22.prod.outlook.com (2603:10b6:4:14::34) by MN2PR12MB4255.namprd12.prod.outlook.com (2603:10b6:208:198::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Tue, 1 Mar 2022 14:15:21 +0000 Received: from DM6NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:4:14:cafe::e7) by DM5PR2201CA0024.outlook.office365.com (2603:10b6:4:14::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.13 via Frontend Transport; Tue, 1 Mar 2022 14:15:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT009.mail.protection.outlook.com (10.13.173.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Tue, 1 Mar 2022 14:15:20 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 1 Mar 2022 14:15:19 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 1 Mar 2022 06:15:17 -0800 From: Raja Zidane To: CC: , , Subject: [PATCH] compressdev: fix size of socket ID in device data struct Date: Tue, 1 Mar 2022 16:15:02 +0200 Message-ID: <20220301141502.11209-1-rzidane@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 76302213-61e4-4bd4-62d4-08d9fb8deb55 X-MS-TrafficTypeDiagnostic: MN2PR12MB4255:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jtH90c7WlhK3q47MGGf24L95BFq4pGuLrDxp7M+8ZYFjhdmzL2jc8d0C3vjt7QGsw0usm6EYjVJINZlAXtxSs2R4ha+ievg5DMxZaO0y0VR8+S9cXc8wlPzo4OGMBMqFZ46sSvWJaLoXDRbI/O64No16ob/I08nGGcGgBBYdB1uzf2RmUUq8juKKEaP8vUmUbEevb9qc8TC9lXWIyLjV6QKPD23DSr0bPlZfO4WvCA75kx0eG7tuUwowHWVnFx8rym3ERGsCP+g2RaOaAcO0rB+2GLCevdpyT8IaV9wsqwCaMU2WQbdzKdPNZCOBaIBGSpcfUbJuSvqatGS06nZR2mUC7jWaYW3q92LVZLaC8SNBVNVsIA8p8FDYsh7d+CbDa2SwS6TcjL8ZKfM+ciPEJhBqKP5ewSOYSQs4HrUqs4tT+8hR7t47/58cKl8lv8DQ+Wqpv+qgcMwwko//rm5nPnIrQvcDz4DPl2w5pjFW0L8DX6Rx0ESa8VWWoca4geYxnHxH8/9Xu4q9cQHKCcZHx2hz60lxRhtyftcSofTvgpFD5z1Kaz61gJD8iXWMe59DjkB4FzVEFQOc1KhdIekBZoNJlcm6wpFmes5jDv/vrT4TiJiC9N2x5yhjN4eTek6Rlhbaj3+4eAIq89TkPuRE0Auqr73Ry2gd6LAFjmmIP9SyzwP3Fd+erpU6w3hdJ7nQRJ9ZozBAepo5qdUhgvc6Uw== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(5660300002)(426003)(336012)(356005)(81166007)(36756003)(55016003)(2906002)(83380400001)(2616005)(47076005)(508600001)(54906003)(82310400004)(6916009)(86362001)(8936002)(36860700001)(26005)(16526019)(186003)(6286002)(1076003)(6666004)(316002)(70206006)(70586007)(4326008)(8676002)(40460700003)(7696005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2022 14:15:20.5588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76302213-61e4-4bd4-62d4-08d9fb8deb55 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4255 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 Socket ID is used and interpreted as integer, one of the possible values for socket id is -1 (SOCKET_ID_ANY). here socket_id is defined as unsigned 8 bit integer, so when putting -1, it is interpreted as 255, which causes allocation errors when trying to allocate from socket_id (255). change socket_id from unsigned 8 bit integer to integer. Fixes: ed7dd94f7f66 ("compressdev: add basic device management") Cc: fiona.trahe@intel.com Cc: stable@dpdk.org Signed-off-by: Raja Zidane Acked-by: Matan Azrad --- lib/compressdev/rte_compressdev_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h index 888c8f5c5c..25d8afbfb9 100644 --- a/lib/compressdev/rte_compressdev_internal.h +++ b/lib/compressdev/rte_compressdev_internal.h @@ -98,7 +98,7 @@ struct rte_compressdev { struct rte_compressdev_data { uint8_t dev_id; /**< Compress device identifier */ - uint8_t socket_id; + int socket_id; /**< Socket identifier where memory is allocated */ char name[RTE_COMPRESSDEV_NAME_MAX_LEN]; /**< Unique identifier name */ -- 2.21.0