From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11878A034F; Wed, 13 May 2020 10:50:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E138F1D181; Wed, 13 May 2020 10:50:24 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80048.outbound.protection.outlook.com [40.107.8.48]) by dpdk.org (Postfix) with ESMTP id 1FFE81BF26 for ; Wed, 13 May 2020 10:50:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K7+yE51YgN6B14Bcp+yJxk4fL6p9DymRtfwCFSAEd2aRaqnfMyAN4YJwO1nc8uZOKf6c/FARekPRN6/UuZFggHXO65IPFuRwUFgRN3t7CeXrmixP7+uTbD/zRnzfPv82zjRraez6qVTn8m+Pwbzk3ohXPyXoMtAOAXjuBAdIezzpsXFi08P4iQ55vOXV9a6yLd6oh2zeq5NCp4yRYYxrfCszAAf28vnkAvFW+S82tyXvzL8u0HyCT6zqtv7NADZVDMB8CgBHStSHoI9lOUm93h1HKvOc5VKlUUQqA+l42TSP4lfwB7J0++Ekg/FAcEzAKmmD6KQDrI4c1yFI2u3uTQ== 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-SenderADCheck; bh=VPm/X7xvNIdwm1SvrqVoWb2r/po9Ji5+fmF0UrjOjoE=; b=RqlxFq/liW4F0XWCWY7aZXpKWHpEF+GdgeSDXyp/dx5ka8Twre6zWDnLcpLgl8wCjDwB2Bt7XC7NFhBg71jLhh64j4m688mSQVpqZ8gFTEB7+pmqz/pT7Jl+muomxYpmSC6PXuPiTK9m6yfhV2hH9CydL/Zkq7ymxs32IzsOjJQYuPQjZsECiCcx8X8A3KEeTRkHFzm88vH6lC5utp+m9Mqyk6qGVL0Ni8YMVM4nbvKgIWOPkeLS6LLzRVvx2KAA4x+FfzErbhHI9VwQt+P5WjTOh2guXVqcRLTA0jTlsnmjzgLvlMN+B27/SpC7QbH1a7jpAwQG0D7TXgee3AtuxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VPm/X7xvNIdwm1SvrqVoWb2r/po9Ji5+fmF0UrjOjoE=; b=LdEgQPF42ITYCmC/FCE/RaG4bV8w73XqxMeKPOKsc0wJ+V3NsUR5aasb2z0bsSFSXiQoxtaKk/QPObPwlpzzHCkDpPWuafL0HEDgKz/kMVYobTFtx/9Bp1WqiSnq73DLEBlPcwX9A+BLYUjKwSgca7FryfrgBTnwvMwgwQUTEt0= Received: from AM0PR05MB5313.eurprd05.prod.outlook.com (2603:10a6:208:f2::28) by AM0PR05MB5826.eurprd05.prod.outlook.com (2603:10a6:208:120::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Wed, 13 May 2020 08:50:18 +0000 Received: from AM0PR05MB5313.eurprd05.prod.outlook.com ([fe80::3069:d8f4:fadc:4d7]) by AM0PR05MB5313.eurprd05.prod.outlook.com ([fe80::3069:d8f4:fadc:4d7%5]) with mapi id 15.20.2979.033; Wed, 13 May 2020 08:50:18 +0000 From: Tal Shnaiderman To: Omar Cardona , Dmitry Kozlyuk , Thomas Monjalon , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "ranjit.menon@intel.com" , Harini Ramakrishnan , "Dmitry Malloy (MESHCHANINOV)" , Yohad Tor , Jie Zhou CC: "dev@dpdk.org" Thread-Topic: rte_mbuf structure size in Windows Thread-Index: AdYo+zM/RnLiCwnzR0mr81TSHf2mvAAAZ5YgAAAl92AAAXSSMA== Date: Wed, 13 May 2020 08:50:18 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=ocardona@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-05-13T08:04:23.6198216Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=fb2b8add-2fb7-4ca8-975f-9dd46bce3add; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic authentication-results: microsoft.com; dkim=none (message not signed) header.d=none; microsoft.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [37.142.1.17] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b9e6a9e8-f9d1-4ac2-7ec2-08d7f71aa9e3 x-ms-traffictypediagnostic: AM0PR05MB5826:|AM0PR05MB5826: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lq47tp3xwJf6G2SxveZp/cLB2Thi+HLMkO95fD4tH3Fgrwg8XCkCl0oYc6xrqOMnqon4TzEzaJr/hY9pJOX6p63A1Qmji9UJIjYRL4WybxgL5140/XAkVRRdc35ItMfkuw7sFmLnPB2oohJWBLKhsqmnFGZqm/WfMSmgr1DUI0F5DqWIWbcv+StL9RJXyF/P7VibojJVGItfGHX0pIPenjnN1dHR7qmtNxwu+mb12d20PnN3cZxLvcy35RdaBppNVTfTh3emB9yeY+VaK0D8lUWj6CRrZVzU3m7B8R8guAznwoWoN7Olpatss4wD3UdwPwE0kcVHfsiiW35QGt3dDPUsVQPrkO6So/tvhCttfG2eXs7aj+HnsPXldwj/eno57E218heeuF4wis/T6wZ9toQaGzWTvTTX9ZosrNxBOBkbrGHtGQuXj5UXMzjPlmDhrx/gnFOYY0cAQflp4qXWlkfOWhl0l71Xz3sdfpPtqk0vmFl1kOWBXQnTNQSk0KYWYhpnrsTUu1Yisup/EQ3dDE5La+Gz+EX+kPCxRuL/liUjeiKomliqtjxQXM4irVV6/1p7ug4w1xlJSXndN4o9KMnEYFvuqsmjWzjRC0Dwz+Ah4LgZuJpTKdcLY3WGTV3K x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB5313.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(396003)(376002)(366004)(346002)(33430700001)(8676002)(66946007)(76116006)(5660300002)(66476007)(66446008)(478600001)(33440700001)(7416002)(316002)(2906002)(52536014)(71200400001)(8936002)(55016002)(110136005)(83080400001)(33656002)(45080400002)(64756008)(66556008)(7696005)(186003)(966005)(53546011)(86362001)(26005)(6506007)(9686003)(4326008)(921003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: dVS5+9OlSwXMsKPbULdhduHrITFHaIBsT1qC8egXh7L6JKhFyfCHL27TmupqLlggNmPtriN6B8lfq0kqXJkujGGdKO/NX3EfOD5v7cLCYebVKASTlHsViB5sBO8VFcTSZUq/kScWnONrl4ScqImUsWYdlqvfWku4Utp+mTzk2xud14XvgPlC9mI4lgfuyWUwGMUwdPMSi8l2C7pnVSWgTGcy8qddWFZt6p1vlqOq8DSaz5Bl4ANFcbfdwxERKwJVtKcsgZHPJfQwlXZ1km+sOwnxzHcB2fKy6p/PppcOj8iR6N0WFp87O1o0aVpL3QsWeeZjFRTfVkZONjLRe9ebAQ3lBBu88t1Yr+wosV9cEfwXdotIavR0qALiP1YBM9AghmCy/DK395Z/+YjQQPC5K84Sc/8IS9HSKY1kMa4hXA8UC1uif2vEfT8t50z1NftXVu/hIqLPxNF/yEeYEfqyNjfIIYlUCTd/gVego72ih54= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9e6a9e8-f9d1-4ac2-7ec2-08d7f71aa9e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 08:50:18.6814 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EolbCb5oSYYyS74Pq9wQkQdzpgnTjCkRUjA88MFsUmQgPqf+EwuY4SD6UyPg4JyUVyxeCf71H5MZH/B1d1+csg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5826 Subject: Re: [dpdk-dev] rte_mbuf structure size in Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thank you Omar, this is indeed the same issue. > -----Original Message----- > From: Omar Cardona > Sent: Wednesday, May 13, 2020 11:08 AM > To: Tal Shnaiderman ; Dmitry Kozlyuk > ; Thomas Monjalon ; > pallavi.kadam@intel.com; navasile@linux.microsoft.com; > ranjit.menon@intel.com; Harini Ramakrishnan > ; Dmitry Malloy (MESHCHANINOV) > ; Yohad Tor ; Jie Zhou > > Cc: dev@dpdk.org > Subject: RE: rte_mbuf structure size in Windows >=20 > Tal, > See attached compiler bug section for details. >=20 > -----Original Message----- > From: Omar Cardona > Sent: Wednesday, May 13, 2020 1:04 AM > To: Tal Shnaiderman ; Dmitry Kozlyuk > ; Thomas Monjalon ; > pallavi.kadam@intel.com; navasile@linux.microsoft.com; > ranjit.menon@intel.com; Harini Ramakrishnan > ; Dmitry Malloy (MESHCHANINOV) > ; Yohad Tor ; Jie Zhou > > Cc: dev@dpdk.org > Subject: RE: rte_mbuf structure size in Windows >=20 > IIRC, it's this issue. > https://eur03.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugs. > llvm.org%2Fshow_bug.cgi%3Fid%3D24383&data=3D02%7C01%7Ctalshn%4 > 0mellanox.com%7C2987047b646b4854350e08d7f714b2ea%7Ca652971c7d2e4 > d9ba6a4d149256f461b%7C0%7C0%7C637249540596603575&sdata=3D83m > NExOvXtXpKIt%2FZaqkoZadkuGpX1olQE3Scc1xOAQ%3D&reserved=3D0 >=20 > -----Original Message----- > From: Tal Shnaiderman > Sent: Wednesday, May 13, 2020 12:55 AM > To: Dmitry Kozlyuk ; Thomas Monjalon > ; pallavi.kadam@intel.com; > navasile@linux.microsoft.com; ranjit.menon@intel.com; Harini > Ramakrishnan ; Omar Cardona > ; Dmitry Malloy (MESHCHANINOV) > ; Yohad Tor > Cc: dev@dpdk.org > Subject: [EXTERNAL] rte_mbuf structure size in Windows >=20 > Hi, >=20 > I've noticed that there is a difference between the size of rte_mbuf in a= Unix > build comparing to Windows. >=20 > The requirements is for rte_mbuf is to be RTE_CACHE_LINE_MIN_SIZE * 2 > bytes however when I'm building it in Windows the size is > RTE_CACHE_LINE_MIN_SIZE * 3. >=20 > Looks like the diff results from the usage of bit fields inside rte_mbuf,= from > my testing it looks to me like the usage of 2 different bit fielded types= inside > rte_mbuf causes additional padding in Windows. >=20 > For example from rte_mbuf, the following unions have the same size in > Windows and Linux: >=20 > union { > uint32_t packet_type; > // bit fields of type uint32_t will follow > ... > };... >=20 > 4 bytes both in Unix and Windows. >=20 > union { > uint64_t tx_offload; > // bit fields of type uint64_t will follow > ... > }; >=20 > 8 bytes both in Unix and Windows. >=20 > However when creating a struct containing both unions I'm getting sizeof = 16 > bytes in Unix and 24 bytes in Windows. >=20 > Did someone faced this issue before? Is this a result of different alignm= ent > between gcc and clang when bit fields are used? >=20 > Thanks, >=20 > Tal