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 36541A0C4E for ; Mon, 8 Nov 2021 13:22:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B54841134; Mon, 8 Nov 2021 13:22:34 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2052.outbound.protection.outlook.com [40.107.95.52]) by mails.dpdk.org (Postfix) with ESMTP id C6D5940151; Mon, 8 Nov 2021 13:22:30 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IMSgGZlxcnUlHktSnyAQI3zp7gxUap6SRFKlEjFFMqSbqkduE7JjdcZgRml1/IImTuQu4FviIFaOxUzwW3gkGgnN7pdi3Q7xSvDRKjn93NnOt9oEAqlAhKcicdBcJa5VcoXES4kdUIhTcmV87Oo+eeUzmwvTO8GuSv+wzXGprQo9HXFo6IR0+GfF1dxOMjUd/YdEQMquyjc8BuGqwDCUBiXPfoOn3gyCDC2k9w7kpELaq4eRSxPeZs4VGD5l0aSRp3GcastkaXGaptYcz4QLKgrJw1GGCnBhLJs0mOopivNOTeuF6wvAvuln9/qLYl+slbx5vfHt5M4vJlJScQBACg== 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=R3D24EKlFmVV7UQ8Tzfn/4B9imsem8Letpwkn7Bd6Zk=; b=ACGdnq+l06+OjxzjFIz4jFey9+YF4wpiTQvjJOkOYBqzOn3Cps2nT3RasSZNobndawvp0ZQ0wLADtFDt4S0NiRkyaWnetHgmkQPBfjCWHTXQEDD64HAle+tTFMTPX0Rt2FmHKY2hJmq/V4syWDGxV85NquPnQklV3lFdVaBBV7xm/UISJ06EufYWCH2rHct4dWB0QcAJ6DhXlm2lxD8Zj5p2VAdUVymbvNjbb5xD3iKkHOk7RrB1vWehRJbiLzYLcpr1Cc/18DNkqQLEnZFWJKFBA4TKAY7HxriBl9a56LN9xt0bYeC2SfzBhpxjBzB7deZKjNoTtE9PV7DIjt1Nmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=R3D24EKlFmVV7UQ8Tzfn/4B9imsem8Letpwkn7Bd6Zk=; b=GA7rMsY4PI2IY9XMn8+kuSjELC9Bwf6vsJ2UfD59fzPMgtLICU4Tb4BFuRPBsEz27AgtNbuxLtwbogsyBvrgSDpkMTdBkaTCBe2XXm4ebdbQnGT1KlzcCxMJWwjxxjHPvgIO0vsyFvBjTBajgADBAPZrAqOMkvvkZRqkiNEjaUEEkrSpHwMnUQ2DVVPtigI4UQPvbw63dC+XDfCb/82YNXiKMFev2xrxT1TD5LxneQOp0hDRFBflo98brUp1oLI83ZMrWDD5S/hiZr9Pw/2xz436JjpxE51KSxtAwsoxmD2gq4eCbssayGIQv5/k9+bMmry48rS4qqJYkrzQI/SprA== Received: from BN9PR03CA0203.namprd03.prod.outlook.com (2603:10b6:408:f9::28) by BYAPR12MB3224.namprd12.prod.outlook.com (2603:10b6:a03:137::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.15; Mon, 8 Nov 2021 12:22:29 +0000 Received: from BN8NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f9:cafe::93) by BN9PR03CA0203.outlook.office365.com (2603:10b6:408:f9::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Mon, 8 Nov 2021 12:22:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT004.mail.protection.outlook.com (10.13.176.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Mon, 8 Nov 2021 12:22:28 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 8 Nov 2021 12:22:25 +0000 From: Matan Azrad To: Viacheslav Ovsiienko CC: , Date: Mon, 8 Nov 2021 14:22:04 +0200 Message-ID: <20211108122204.2225227-1-matan@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 222c6318-ebba-4ab6-e9b0-08d9a2b26e17 X-MS-TrafficTypeDiagnostic: BYAPR12MB3224: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +BNW6NeJfs/ChHQ91o8W3uywzZt7dpcA52nfSpz1T2g2Y5es92yMYJ2QtCPisY4Dwt4A3yzDRtwMx2jDzq3/9HehcF32CsAOWDaENrAyLGFQSbzSd3sP4Y6UNEdkZKgl1oGOYTjMQzOQwMn5WG2GPqJwAJby9hpY2WERwkesAt6XHMSAFwu1PGxy9GxQCEaDgeq2hRoqz0mOjvr+go+RJdaNe6hHb8mN0KzX82zEb/N0tSLavza1cwOVq165dBVbdquHekYeR/vWT/RdHMthgS6o3AHHWzKpXkC5lQes8mzlIUAALXMcZuwFqgSW7Qz8Vl7JC5QK3oJwoJSFnFRMQXZeOMdF5O3oMosBgal9m/bgTJpo3FcZtO5dn2qbYbqxL0RKFBcUnOwoE1297o+9Ol62jxjHKGjfJfb13N/4Bm9vsMyXQSIJUxGuA+b3KDlKOQ7YDFG78kd1gEk/FH0RXyyzvqD6gwX7GCXq/IQZhBn6S/EASv57dIC3Np3MyCQ6eO5UDHWrtlTvwSowSvIsAgnrZeeIRTARwJSGr43CjKYYZX0sS1ZW7n4JzCxeRlW39wnL1o3/mBcy2CUbxjnoZIcyMzOyK0n7r6JQFG8Jdpa1yUFPviuM+Rg83flPz1dfZpgHeMr7ZHL/3e1UW9GHh/pE9x9oaGMLpSpBS2u3Tsr9Sh+fpR/88mUgY2wDfgld7LXJVx1FcALglvtNEEui+A== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(5660300002)(54906003)(82310400003)(47076005)(6636002)(1076003)(356005)(336012)(4326008)(55016002)(16526019)(450100002)(2616005)(86362001)(426003)(26005)(37006003)(70586007)(70206006)(36860700001)(316002)(6666004)(7696005)(508600001)(8936002)(83380400001)(8676002)(36756003)(2906002)(186003)(6862004)(6286002)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2021 12:22:28.2906 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 222c6318-ebba-4ab6-e9b0-08d9a2b26e17 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3224 Subject: [dpdk-stable] [PATCH] common/mlx5: fix compilation for zero-length array X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The structure of the striding RQ(MPRQ) buffer includes an array size defined by the RTE_PKTMBUF_HEADROOM macro added in [1]. When RTE_PKTMBUF_HEADROOM is set to 0 in the compilation config file the the compilation with debug type failed: "In file included from ../drivers/common/mlx5/mlx5_common.h:25, from ../drivers/common/mlx5/linux/mlx5_nl.h:12, from ../drivers/common/mlx5/linux/mlx5_nl.c:22: ../drivers/common/mlx5/mlx5_common_mr.h:96:10: error: ISO C forbids zero-size array 'pad' [-Werror=pedantic]" Actually, the array for the first stride headroom is not needed: Each stride in the striding RQ buffer includes the headroom of the next stride, so the headroom of the first stride should be allocated before the starting point of the buffer posted to the HW(HW buffer). The striding RQ buffer is used as an attached buffer to mbuf and have shared information per stride. The LRO support moved all the strides shared information to the top of the buffer before the first stride headroom but didn't remove the old memory of this headroom from the buffer. Remove the old headroom memory from the striding RQ buffer. Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory") Cc: stable@dpdk.org [1] commit 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support") Signed-off-by: Matan Azrad Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_common_mr.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h index e74f81641c..748dfc68b0 100644 --- a/drivers/common/mlx5/mlx5_common_mr.h +++ b/drivers/common/mlx5/mlx5_common_mr.h @@ -93,7 +93,6 @@ struct mlx5_mr_share_cache { struct mlx5_mprq_buf { struct rte_mempool *mp; uint16_t refcnt; /* Atomically accessed refcnt. */ - uint8_t pad[RTE_PKTMBUF_HEADROOM]; /* Headroom for the first packet. */ struct rte_mbuf_ext_shared_info shinfos[]; /* * Shared information per stride. -- 2.25.1