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 51FADA034F; Wed, 13 May 2020 10:04:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D4B91C22E; Wed, 13 May 2020 10:04:28 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2131.outbound.protection.outlook.com [40.107.92.131]) by dpdk.org (Postfix) with ESMTP id 49C9B1C225 for ; Wed, 13 May 2020 10:04:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eHcgYFjMppSgnyCHhCBWAVcIP/ASLJgoedMWe924M3k6jHh/YBjtTfURy0+oHcE+Xbd3io2qwKAP15TkQjWaIig3FikuLhMitujKwhOml+Sf0rAYrmLHI/Map5UCjfG0kwA6re0OXjmtJSNNi7HzygfpE0BPDYD9Msj9hM8Mnz6YaNtF7ayAfOBcQN1kTasA1TKbPbJue3SWM0Dc/98DvgPDq5uqgU1xPuSgLOUMuunYaiWa9EgEk/GLHrbD+3WBVL4cuBJmmjLuOdzWtGedyBhCfyWLBt6oCHzxxh+1h/lTud9ZNWY0HnWlg/ZfVvoQ0I+EspuvZWYADQFHgkfP6A== 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=JFpR8k05EMMvQYlpUXlzllaP1z4eCrKnMx5CLFlRtKk=; b=PMZxCRqFdI7uHTBZcQo0UZEyXoBIjKKd1C5UTmwwo08yudP5GRPQRFppddnkhdtb/YXNkoG/Zbee5mUT5NAD78bBmQ0lwnIJJvXJSXtmHtq44VVfDvhoPzOjD4vVu6WTLBGV11gf84NnqGEnJuc+XF4LUnb6A6FaWezQesc9lw9r02EAZ8r++9naLZMlpzE+PCb8afGzgJ46scGz1pUM1BwvJcnY+n1lB7j3j3CYsrtVhIQjNt0cuQN5pH5TXHcixy6PWmwe+WbwR/Z/DdLTZoIhi56E0JMYFwM/lSbaXEZEnCSUD6Ccons/BfykJpMXjimA9ZDH9PPqZUAn97LaeA== 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=JFpR8k05EMMvQYlpUXlzllaP1z4eCrKnMx5CLFlRtKk=; b=f1KvGxkXP6W9AU1nKfF80T8YXnOsl7aYBcVzNotwErTALKtfrbTsWim0h3PBqH2VDPkOpJj/DKLBG3Ctfsk4s9nBQoe/tY8v9Uqd9hnQrRPKGyfY9GXMPYd02yGatTO0wh6f/Q9d+xxjrzMGAxduFtVB042hC6cdDGqKxwjiN4o= 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:04:24 +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:04:24 +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/RnLiCwnzR0mr81TSHf2mvAAAZ5Yg Date: Wed, 13 May 2020 08:04:24 +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: 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: 2fd8aee9-8646-4f50-7f11-08d7f7144073 x-ms-traffictypediagnostic: CY4PR21MB1540: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: k+MDJwmIHsmorWl+Edq1BdOQD7U4678yprvQk1bhnZKc8i1oc0zXx7IT3uaCixUflEmIAbLZBmS56Q//oV0S1shLGOnj83t6480vFKEuC6oDxy/0xMcXYxo8NbemRznNT1+snf2Q4oa/vZ9DwdO5CFzISv5itnvBq9zL5wKATaFFxIHgChpK0oqcacMc2O/+m0uaV9hcN64cjSc0tQd7H9459yVZ9r63ABXV7kp2E7GTaNgqpih9FDASRGOMfirpBVFoRx6VNwQVZtIovyJwFQjibMT8EpS0kotmjuxAc3HRCSJaxTstkp23ROZmcbN1eoG/af1y/fpld5uvPkWkdYtPVhjss+Vao4oe3JhXGYtXpEvoauz1PFAhOMukSPLHJ4b/9saMo+tu4sryn5yh+nqCNUhdqIEihXV9DRP/E29DjQEgVoS1GDrewF0WLwIvFjGvthbfmk+PgdmZ20PFT/6tzkbv8z6st44M+Z0SnvLA8itu3IEiafvAAdZAkRPNq/WZpuIaLHxOY2aCyJs+UQ== 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)(33440700001)(316002)(7696005)(966005)(186003)(86362001)(8676002)(5660300002)(10290500003)(33656002)(110136005)(9686003)(52536014)(76116006)(66946007)(55016002)(66446008)(64756008)(6636002)(66476007)(6506007)(478600001)(53546011)(4326008)(2906002)(66556008)(8990500004)(8936002)(71200400001)(82960400001)(82950400001)(921003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: EJdfdbrvP3OZIOI+RIgfKm0NQmnRsplgcR63l90UfNekS0Zv7X0c8p7UwfGUCjSFOfHHHjJt093pSz9xlbVJ1dEwslD5zsMs4jDkEEL9RStK2UG/Sx5fZOGOgswmVLEUqw+3llagJ2XMvbGfM16J39WmCftvN3KU9XguHKkDj9tlrWgmXc1P6h8fHBWzDlF/oRRZqpHsPB4b04wMT2r6ZqfKT2SXI/wkJCdvoWNW9ASqk5zt9GGerrZkurFtU5IsDQV9hjIoakiBRzdfveBB6uJdr2KL1SYhVLvgEQ2bu6GOFKrCSqY5qwTpRlbvWR0vQKDRRsNX7V2oKjBTAAOre0P4RmfJDOPOpLWGLpZ6ST2PWpNCDU+t4HrgwUmdYBaVsIIlJUdWT/0lkCV2IdLD2WtCLXE4KtbywL6AGPOnkhXaSg3oHj8PbmRRkDwXQqOdnhP/ynipbnZduzv6I8OWbxqBT1aY0CxQaU+tHu6QYlpn6CqkAzDLSEpKLTAjKOLxoPH7QAWXZzbk9bcQ0slPuSs/NGfMGU8nVe12LzbBbvE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2fd8aee9-8646-4f50-7f11-08d7f7144073 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 08:04:24.7132 (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: rzfrPoZus24rsNQa3raOl0ZaOhBkNgQ3MzttmSFKDylDYz6uGcN3TaXgFGzwNDTei6fhjxfY4qH/zihOlpoxqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB1540 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" 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