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 55605A034F; Wed, 13 May 2020 09:55:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA4021C225; Wed, 13 May 2020 09:55:09 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70071.outbound.protection.outlook.com [40.107.7.71]) by dpdk.org (Postfix) with ESMTP id 3419C1C1C6 for ; Wed, 13 May 2020 09:55:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmMZhNSF9+069G8lqfmmZ66OD0yDx8priR02ftLne7A6u046doybkslM2uFE8XHt8LEkxQxG5U/bQw2CdYrP8YoYNtu41VsHlZSseGKVt0QbBnysAPracIKmkiF9eHB/AAZPdiBGe1oF+XBsGleHu2ofqF+koTx1RcLAcwehgfT5k9UGaLDJtU0fnFcV3MnHcVYbjBLpznsQO+0GvkeXCA1BSq22k8KxZ8UY5dU3MRrVahm1ULiq7reQHXrOWzARrVmharO8U9Qy1Jf+k7kmVkaoHPkJ3N5mn+4swcuLh9N7RSgz5aZZp/v3ZbcEdDN9zbHzbjhe0Xt66y73fhihGA== 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=W+06DuysHG2jsHUiDVeaurIXDLblJCxvd+gux1n+Ejw=; b=Qxu/nKSx76JT1FVk3kEOVUj9hgsTEa2JfjRgvAy8e5jatn2IlN2MXgb0/viHzZQY00cbugpn8wggCMhwH4esaYDISdqRWqMFqjl8SE/s+Tn6w07tjuykKR8RXcGsuXA5TeDwAZbofABuZKu5Q2QOxxAXyHVH6VkWeBw8deOwA005bd5zbyo3usdZXPOWNfahHILIeTf5KVSl9WJo5IB9eXinCyuNzhjjMqf5wbcp5mYoZbbQX8k6qNwruEE9dm1Mf85SDbHVFuL5/wou8Odaarm2uWs/2y3rZuBJMXjxEOAxQBdwZSt4A5Z08kcBiArTJ9Kc/F4+3nqV/nvQGu/NLg== 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=W+06DuysHG2jsHUiDVeaurIXDLblJCxvd+gux1n+Ejw=; b=VHmPfFJXK3fnyuMIXgWfWSKLTS9XVt77671lKBSN/Kt0D9WL2gWdB6cYR2ODlkeNgdWqeWa1YKGdo7OaDkbtYf25OvW+GEgzWGMj5bYwLtsgAOaA68bvIKUzRxcqG6bdJqTe8y/JIc9tkUaC5MFm6SiR8ccK1mUHNlQc5HZiRL0= Received: from AM0PR05MB5313.eurprd05.prod.outlook.com (2603:10a6:208:f2::28) by AM0PR05MB6260.eurprd05.prod.outlook.com (2603:10a6:208:cd::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Wed, 13 May 2020 07:55:07 +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 07:55:07 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk , Thomas Monjalon , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "ranjit.menon@intel.com" , "harini.ramakrishnan@microsoft.com" , "ocardona@microsoft.com" , "Dmitry Malloy (MESHCHANINOV)" , Yohad Tor CC: "dev@dpdk.org" Thread-Topic: rte_mbuf structure size in Windows Thread-Index: AdYo+zM/RnLiCwnzR0mr81TSHf2mvA== Date: Wed, 13 May 2020 07:55:07 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.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: c061e6f3-faa7-44ef-fd07-08d7f712f42c x-ms-traffictypediagnostic: AM0PR05MB6260: 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:8882; x-forefront-prvs: 0402872DA1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vnfHdKwp7JDBjb/56HjzM4chhItyvJ4DK8LHNM+w5VfTkMrW4pAP7w6nL+p9FUiTrye10H9NwNDWNzgUduV8Xj88f9h412tuihF+DCeHeXkPkoz/I1QzbFV1xbIwUcvrnOJLkYCm/QlYLlCnU8o11zsIqKn2UvbaT1hib//PDT0Sf7W1tLiRXTirkSNPwCJwB2N2zQ0saSxGCT7q8R5Ne/FGPLzxCZ5ROgoV0WtgOm3ujRtPdML8GIsOMzj7vDbryImlt1pscEbqaVc6H9gG9UL5zJzK/+V0XW8jr45B1U12Ely8EUHmJ6osGmu/wDF0jbIaDeERPHHT0drypmqffGVbj5xaBIewcpxnUKXC16bDefteKQOJ/S1imwdVHpwDeKcFJMpbW4osaywKJXYy2IbcOMBDDlMHFYIzpdyLy2++0loa7pdvLJ4Va2Is/+XKXbhI0cBbtT+Lt4kcs2BB60blzWTf1OtS8TxOwMiumkOOq8DrOeZtdZJ+GCjtvNMqJcPJTS8v6jrGddyNfLCNaw== 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)(376002)(366004)(39860400002)(396003)(346002)(136003)(33430700001)(4326008)(52536014)(9686003)(55016002)(76116006)(6636002)(33656002)(66946007)(66446008)(66556008)(66476007)(110136005)(478600001)(64756008)(316002)(33440700001)(6506007)(186003)(7696005)(26005)(71200400001)(5660300002)(8676002)(86362001)(2906002)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 9hGOLGCC3/MLjwoXzoh2/5YQV0ccQzKAHUMnRDSxiHgAWYW1jQ7V+ixBhn9s9qrMom/qgsHjWpYrKaT4OlJnCcBVS8YzoipdiwQ97mrWWlKIRz8nlCdtdKCa0k/9G8BZGlEsPPtE9mjGupzRsiRI7XSizuv/z1MoerZ1jk1tqJwLzvzNx5OLL4oG/wrf/5/MpeI+Oadg2YAiEKYDyaQdxpZPWBOfEu8X171BmAQ7XFdijC3o3AWBnX27vl8JASavs+xbeoV1nkfcxqp/GONVzj9sxd3Q7gWFsYFwyY1grXg2lVY9cpSgu5AnVUyF1WaUp+iOBEqr1HRpgegJWzXmrta+tMQspznYsrddE6LDDwU82BJgjqMt2YBV+Vm/ffD+YRSEuXxp/+ijbFCBPXH6h41PpXgjHYNQbvWdU7c9NNnwnvTRJSuy/MMnmY1MhPFF3HTwOTBqIxz2J20bNm55k+e6Cnj6zK/ksYTJhj/K+LE= 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: c061e6f3-faa7-44ef-fd07-08d7f712f42c X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2020 07:55:07.3595 (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: W1DJrSyMsiTCgMMakIVuu8wajzIbkyIFGXiDzLnNbBDBpaPprebhrXbwZccKcvCw98C8M1KdIshLwMJJSB/ooQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6260 Subject: [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" 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