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 1D2D5A0548 for ; Wed, 10 Nov 2021 09:49:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1321641100; Wed, 10 Nov 2021 09:49:22 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2045.outbound.protection.outlook.com [40.107.101.45]) by mails.dpdk.org (Postfix) with ESMTP id A8A9B40E03; Wed, 10 Nov 2021 09:49:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TRWnCJUS/y89Uh1XfD0i3IBzrYt6ems33WdrzmNeNInRCvGpeJgSEelOfuzntaWKighwFiUHkAoOCReY2SubztRENDWYlyHOTMXjMRwvkvtPmWujHRccrlDOdLdBP730W4FChWY46fKdvy9Ogq1SWFl5Cej5ABMsa3Xgysw5Dia1uY/vYeAK81BSPEPqF2CQpkjRliRFNj+I8Tlld1Ln4P51EJ69nY2mlKnLlbbW/Xl0u3H0f18p9eQmgQSmzM3rOSCS2xaVqZesSHV3P8rkNInelopT2WVwZW+W27B7ep67LPJJ99lPCILPvGF1Gh3eLeTILZHaVMAYp3svD3gpdg== 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=VNK5vYi0Kl8UlPGwLfF6Rz20uptuD4eohmE1bmlKw54=; b=X1ssnpojmV3ncDnGKLVhv7AiD4lg+GFxFVU2rp//regaruxxcaoBDNUv91F0XDQwcUV9MmMZucj6b7VOfr0veinjEWNiTQldi0wtZIzUS2uMFqJ9CBDvOzcBp+7hk6JcKxPcnoEZvmtutAxlbCVsKZcLFJcm180ZE66oScm676iCIi/gCl+Qx11Lmz7nj3v/duA/Y9XQaeUeGpAb1VUomclydawFfLBBiljeR0nm1TdXa6Je/ulVxE/XWERt/fIoEXWT/YEypKSlPrt/aRtN8Zy0B0dY8Dlx+DS4/IrzQ9iWSYnqWJsXIjBSZKDFWgKCGJL3/FEIO571uJyDU0hwSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=VNK5vYi0Kl8UlPGwLfF6Rz20uptuD4eohmE1bmlKw54=; b=e+YEACNv9oRUoLgLlbA+bQB+wMSlwHDq3Zq3U4ws9q8IjKyph0nOLv5h4AIWm6aold72w1NQSRZx2LWmfy6cKG2ceoAJ64GkYXdzeJUyfX+M5DM6kotNA8HVW699H5bQbiZFXs/IMRzl8b8KXzGWeoWikUvUhuSgOHFCGYEEEcHOEj2dqp1qUdo8ZsjoJeGW1Se9g3mj0qz98HG0TFfma9suH/2fxQyQd2AfRHcFBFQYFSYq+8KsbG8A7f+oFhp/H90m8pmnNT0+bG9iyq1hT1PbtXpbi7ELl22SIshyhG7qP05Sk86oRECWBNeGNfH9RLvj2hFHVmepUm1exRmMCA== Received: from DM4PR12MB5312.namprd12.prod.outlook.com (2603:10b6:5:39d::20) by DM4PR12MB5070.namprd12.prod.outlook.com (2603:10b6:5:389::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16; Wed, 10 Nov 2021 08:49:19 +0000 Received: from DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::7cf5:9d34:fc6b:b4a4]) by DM4PR12MB5312.namprd12.prod.outlook.com ([fe80::7cf5:9d34:fc6b:b4a4%7]) with mapi id 15.20.4669.016; Wed, 10 Nov 2021 08:49:19 +0000 From: Raslan Darawsheh To: Matan Azrad , Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] common/mlx5: fix compilation for zero-length array Thread-Index: AQHX1JtTELZXHTIQHkqw38xZjbw+r6v8dljA Date: Wed, 10 Nov 2021 08:49:18 +0000 Message-ID: References: <20211108122204.2225227-1-matan@nvidia.com> In-Reply-To: <20211108122204.2225227-1-matan@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ded13668-aa4a-4e59-ddc5-08d9a426fbd1 x-ms-traffictypediagnostic: DM4PR12MB5070: 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: tYZaCiAciS5+b93praCbKrv6mfHtYamynFzTXrOMlZBjwzqHcWDmIaf0ExuvMG4WV6vuGR0iR/5KPWBjxqW0FyeYtHeISbogLATYniOYA841wk0fPddEAah0C8/Gf4ZgDRoHHcxwmdSCz0GqcNfAAMW98Bn4L0zyb4s4rmoXETnRREZd7on0P8EKLm1+ZHhNAn0i/IpD+l7CLtBu24T3/wTkMHhu+r4f4Dqe0/hAA4VVVavYB9x8N14A1uZvodeClW/LITi66dPrjb2PLN+9tEOHOZSyCAOUQUfJnBf3+AGbarq25XK47xF7b8Q0nWuciKgcFsx/RG9p2b3tmWpFVxhDP4IGMi78r1BovAxAkHIoekdJnkplJpZv+LwZ+jtbZ8S7EZhmSw3GnGhAu/+iSNeVLAGlNWiCm/SDdj+fKotGRTxponWAIY6zKLQpzTMSUdomrWYdiQfS/6Kp4Y/Oe2ep1YoPmVQBLVQ9KbTfS0GmAlUImOsTNUbZWvZedDXw5YvkrzYcvBvpzMCULKyeAVUQV5o7Xsr2OMWY8gFl1Ftep0qcwwKWsJvZ5lqgV5ls2mZ0ZhEIM00MuK2Hkm96XXUf5rfF2Y1QrtfBtryzW0NZ8tjeg2svvFMgja9gAHqDPOmMzA9UtkFYJd1vYdyx5GRnmXHWqe6uqMyT5sDfAFnbeZdmwQu4f3PVWdOSZczAZ/oOpriCPfYKb2/8peggng== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5312.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38100700002)(8936002)(4326008)(8676002)(450100002)(122000001)(55016002)(76116006)(53546011)(86362001)(66476007)(66556008)(66446008)(66946007)(52536014)(110136005)(6506007)(64756008)(33656002)(508600001)(6636002)(9686003)(316002)(7696005)(186003)(26005)(71200400001)(83380400001)(2906002)(38070700005)(5660300002)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8Er5jwQ9WxTkbk2BO056r+3ddATIp0OQBoXeKLurKOMJh4hUqjjGPT0ztV+7?= =?us-ascii?Q?uNj6HgUCAkOvuUVgGAtnYKEi4S9rKeh7OqcJLg7BoI9Qw0mZ6n2Jzln3x9fs?= =?us-ascii?Q?NXdTOlVwh5ykG3WWOgBAPNxlvYcUKsQ2kseh8Ew0cbtk2ZNHB8kbOSmID7sO?= =?us-ascii?Q?hztbJcsUBbQCXl54HhlWrFShv2lpubPtDzfE2ruqV2x6vDG5dtf5tQb4ong7?= =?us-ascii?Q?2wjXqr6efYndTgGme+HsLhmR8JbSJD+VnmFMqpaNGc1kLKCV7LbIqM4Vc68x?= =?us-ascii?Q?Pwmm4vi/SLwrEvTqgVZEoDoHR2hxaBCDjg7FoB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3A3PRIH38yksmjrTlTeqJD5cbiqjktOPecVfR0fj?= =?us-ascii?Q?jmjNoHZt7XS2DHd4MBDao8IeHv8SUr7qKYhi2TNI4f+qxNxYPsnuDT9RIAc2?= =?us-ascii?Q?c5xEpomOMEuDls/0aillXY0AxprT60ymohsI3x/5L7bDF2utQvhCeKHxxKvU?= =?us-ascii?Q?UQdF0TsKZNGlra5gbPOZdz8gCb1lBk9+E5lOR8fPxVmmrRLaUOltjilpbMAt?= =?us-ascii?Q?qphJIozwUG7ReT9YyO5NfcdS4MsriNfrWSShccZL+WydDpwSpUEvYYxqZs4F?= =?us-ascii?Q?uAjJJWC0d7Mf1c1jI9MDV8dhTXdY+Eyw22jTlocSNPoaQxNdiOzocrdyauH9?= =?us-ascii?Q?ML4d9uSxJ7036Shmvcidsl3mNorcP+Q1nxjxnB7bITNEIZaqo3Zq9t4iAANQ?= =?us-ascii?Q?1ZI55rlTu3Wq+uEPwMcsr1s=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5312.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ded13668-aa4a-4e59-ddc5-08d9a426fbd1 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2021 08:49:18.8431 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ofn1izhVHjAIW/zXb4n8xVzLexi4Do5juXXS3VnBh83WCW6V5RVNy3yuAXpsiJt+fIgVCG/uYbWS7LTCvgX6Yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5070 Subject: Re: [dpdk-stable] [dpdk-dev] [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" Hi, > -----Original Message----- > From: dev On Behalf Of Matan Azrad > Sent: Monday, November 8, 2021 2:22 PM > To: Slava Ovsiienko > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] common/mlx5: fix compilation for zero-length > array >=20 > The structure of the striding RQ(MPRQ) buffer includes an array size > defined by the RTE_PKTMBUF_HEADROOM macro added in [1]. >=20 > When RTE_PKTMBUF_HEADROOM is set to 0 in the compilation config file > the > the compilation with debug type failed: >=20 > "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=3Dpedantic]" >=20 > Actually, the array for the first stride headroom is not needed: >=20 > 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). >=20 > The striding RQ buffer is used as an attached buffer to mbuf and have > shared information per stride. >=20 > 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. >=20 > Remove the old headroom memory from the striding RQ buffer. >=20 > Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory") > Cc: stable@dpdk.org >=20 > [1] commit 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support") >=20 > Signed-off-by: Matan Azrad > Acked-by: Viacheslav Ovsiienko Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh