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 1F476A034F; Wed, 13 May 2020 10:07:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 157BC1C2A0; Wed, 13 May 2020 10:07:38 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2135.outbound.protection.outlook.com [40.107.92.135]) by dpdk.org (Postfix) with ESMTP id 4912A1C23E for ; Wed, 13 May 2020 10:07:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTlpEfnkppRBgIbFMNWiz2/0L1txv7kxUigit7Ed0Qmv+B1OOOm8SLq36AVdNQ1ArEICCuChdX6gp3f5snkvnlG/wBE0ZUomgXKhddQqxuXaiSbhzt3ChpJSg/kgKRadDFacoBmITsAiL1rSlyv6wRMOdqVPX3pZQrhKpADaEezo17usX4kbot3dlPITuLFyjsqb6jwR08ggJPJHc+wjhRK+Dmp+vt68wJfEnT4q06/XOJDbLDcmFZlJuGbCY8kzpn6BuBNwCkX58o7KGVoyubYy806BtfeXYlY7CTFaiiHESmaZvCqHaAn9dm6Y8D+ARD+c7paU8gflLrT7jdhcpQ== 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=5iV2ha7dxbYf9+u6cm6bIm5A5LfEQZvZUXUP1nrDA1M=; b=Xrtowe8+CvOMTuXcww+lCx5erN6v2j3mZ2X90e9J6nhWcZMzc+LjDmh4s4z5gQ0o9rMAcrjFJvRnJP4Vu55luwoxHLYfnmtuKyW9TLb4aQRy4wY2a+g8c5k9IMeUFQY5GtEOMSTMJhTH2w1wVITkFjVdpmjzoUJZeBRraPkcX7WDnyYcoDaEQ3IMBSnRjxzChJ4/j+LYHEnkMpU7tc7E5XHtQWnTw10Hwae93MbepJ6uO8VX+gDwsW49VH1ZQZ1RQxzlDdtwpUVrzNy78Q+L2cSDGIYbGfi8iVZ780Zr0vkjHEB7c0Djgz8eoGBMPySgRB/HFXRP+b3JFosYjgtftw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5iV2ha7dxbYf9+u6cm6bIm5A5LfEQZvZUXUP1nrDA1M=; b=OC5Vk2VpffucCZKyuZY+juj6uM+0/Bx6ni8oDaRk53u0lwIQJ5EQ94hepKPzG+sqK3yJcf8XwYDeHgUJ5K2VWGanQjM9PBX8VkiOWRxZkQJzYu7FHXsFq+26UwD+arr73I0zYyItDVm3SZfzyv56xk8FwU9p7xFm1PuqKze+9tc= Received: from CY4PR21MB0277.namprd21.prod.outlook.com (2603:10b6:903:bb::15) by CY4PR21MB1540.namprd21.prod.outlook.com (2603:10b6:910:8a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2; Wed, 13 May 2020 08:07:34 +0000 Received: from CY4PR21MB0277.namprd21.prod.outlook.com ([fe80::837:8efe:4987:e1a0]) by CY4PR21MB0277.namprd21.prod.outlook.com ([fe80::837:8efe:4987:e1a0%12]) with mapi id 15.20.3021.002; Wed, 13 May 2020 08:07:34 +0000 From: Omar Cardona 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" Thread-Topic: rte_mbuf structure size in Windows Thread-Index: AdYo+zM/RnLiCwnzR0mr81TSHf2mvAAAZ5YgAAAl92A= Date: Wed, 13 May 2020 08:07:34 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes 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: mellanox.com; dkim=none (message not signed) header.d=none; mellanox.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2001:4898:80e8:1:f500:e02:9747:152d] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3e0833b1-28ee-474b-fefa-08d7f714b197 x-ms-traffictypediagnostic: CY4PR21MB1540: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3631; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AsMuPTSkfrfsiEDMuIjv1mb01eWlxU3BgHXzAzLtqKLxYlvzwLdUEa785eTfJMCCc6c+3oY8UT1Bso5Ux1zsvUSKT/HeJrXxTMTSpjgizWNzDiNO4/2YgtbqsmfbJF5sFz2eoj8OXHqtrMCAWRND/QGpuhgDQ3sAko5RJsnsSG0VPiTiRCc3DxIIp/J0xEivzryf29o38muqeut+6evzf5OABrl+thU1572KiaR9KQP7arE3yhfWNb879piSjgQXkS3ayYXwA3mJ32o+zGmK+kIjlFovTgM6AZcZLSAI8ofHkzPPnhYESPNUd4HKkh3d/vwfa3TzGjBZs+ZSD5BhvK9D+J4dv4N8/p7IVujfaZtWx3tTtsDE+mZc3SuzAOy5LDsJp8Yxd7TKhsT9qw7sUmSbUt4TT6HkkQ0qvxbCRjmV5H0RrjGD1R9/QHicMJAaKhk0XU0TLd1TuvFX68pRB7qBm0ZOT+yCP3dtSK4GGHmLvigEkiqBM3aeFCLclXdROGYUlrkiX/4fYZuRxhwGqQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR21MB0277.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(396003)(346002)(39860400002)(376002)(366004)(33430700001)(2940100002)(33440700001)(316002)(7696005)(966005)(186003)(86362001)(8676002)(5660300002)(10290500003)(33656002)(110136005)(9686003)(52536014)(76116006)(66946007)(55016002)(66446008)(64756008)(6636002)(66616009)(66476007)(6506007)(478600001)(53546011)(4326008)(2906002)(66556008)(8990500004)(8936002)(71200400001)(82960400001)(99936003)(82950400001)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: bUUbyMZ26BB8aiCh/3HAMxbXURs9/WPlQobGPK43ysd9A3byjp/VAK4VAU5G4AIR7vKDXAW/LdwHdOlBHODUg4DETlFhVTPgmTbaTiGiM33uagzuNiiTyTo9io6yan0czdsu96MZh0GdV+zf1qD+hKLGE96H195kCFaeTO0vUtOJ9xzaE/76vIC72jDwBaaYA0KfdClD7Pr6CxnIQXJ2R3rmnIC5YrEJntsGPk5ZSgz0pWn2vZmUitlBWZYhzvCofQw0HGX70gQ81wfxjvmXwwk30abVLOqYweQYPEdKXUG6/xw0G2xsnhYbtESKtWKpKv55Jpekqq94CNAvN9AXwGBUX/bb6k/ALxpeAtVB2LiEq0AhUu9mQVf3Y8C/GRhuIA3jTUQ9Xrxa/HJimXAu1NIkKQ7ULGYlbumlkPp2gIaemugE9qtb6cT1h3e6adu5cWlRKI/CM0coKj2FaxLNTzp+BHGmxlqQYmwJXAW9WH/1ylKbNkqp3cfFXQYTr/nmGlOnnnFfIRZ0Y6vwcgIjCEOHHSmqEc70fz9/Sqv/BA8= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e0833b1-28ee-474b-fefa-08d7f714b197 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 08:07:34.5450 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: c8sbm7D5pz91ZCIuyuF+wnHTAfejk0F5z9BeuRLU30N5duTXrIPKxkgy+g/2+WeJma8j8TZFZu89cGIHTgnP6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB1540 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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" Tal,=20 See attached compiler bug section for details. -----Original Message----- From: Omar Cardona=20 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 <= Harini.Ramakrishnan@microsoft.com>; Dmitry Malloy (MESHCHANINOV) ; Yohad Tor ; Jie Zhou Cc: dev@dpdk.org Subject: RE: rte_mbuf structure size in Windows IIRC, it's this issue. https://bugs.llvm.org/show_bug.cgi?id=3D24383 -----Original Message----- From: Tal Shnaiderman =20 Sent: Wednesday, May 13, 2020 12:55 AM To: Dmitry Kozlyuk ; Thomas Monjalon ; pallavi.kadam@intel.com; navasile@linux.microsoft.com; ranjit.me= non@intel.com; Harini Ramakrishnan ; Oma= r Cardona ; Dmitry Malloy (MESHCHANINOV) ; Yohad Tor Cc: dev@dpdk.org Subject: [EXTERNAL] rte_mbuf structure size in Windows Hi, I've noticed that there is a difference between the size of rte_mbuf in a U= nix build comparing to Windows. 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_SIZ= E * 3. Looks like the diff results from the usage of bit fields inside rte_mbuf, f= rom my testing it looks to me like the usage of 2 different bit fielded typ= es inside rte_mbuf causes additional padding in Windows. For example from rte_mbuf, the following unions have the same size in Windo= ws and Linux: union { uint32_t packet_type;=20 // bit fields of type uint32_t will follow ... };... 4 bytes both in Unix and Windows. union { uint64_t tx_offload; // bit fields of type uint64_t will follow ... }; 8 bytes both in Unix and Windows. However when creating a struct containing both unions I'm getting sizeof 16= bytes in Unix and 24 bytes in Windows. Did someone faced this issue before? Is this a result of different alignmen= t between gcc and clang when bit fields are used?=20 Thanks, Tal