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 51E98A04B6; Sun, 24 Nov 2019 19:10:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3593437AF; Sun, 24 Nov 2019 19:10:37 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150050.outbound.protection.outlook.com [40.107.15.50]) by dpdk.org (Postfix) with ESMTP id B690EA3 for ; Sun, 24 Nov 2019 19:10:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JG2yy3DO4+c6F0I/4QG6s/RLpr9Hbe0U9P4A1/A9OiQCF0eg0J5vQj8eDUGWUjQNSiEiqOf07ye1CkkVlNNtjSHTWfPtaWqdgubYGa8iWS0XR4oBDn0dhMNdcKqEg3YO/MDLaqdgwqD5Aku/XoMRnb5sgzaGxEx2KK9D7o56D4x9Fs2EFd5RshQLvWTle4b3DH4R+TmCx9bwBtLKp/LQFKTwb/eUJ98fpLgGnCWWW4BWJXgPasjFkA3CGEk4vlEAHsRoMtWzEdPviwsaczDGreikI5KikY89jTDR158HV65r74TSQbhLjDb4cuuUVurivEJr8i2apvW+7dgYdfrp8A== 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=Td6TS8FPhbPHz2ZK5icOA0lxibO0U4DmTtERmiQ1w6A=; b=n/WLY9KVIWfvoHW2iITCr8dZtjdZcSSeImHmGY7A9+UehjUyKeWjFZJXTrBk1lPQ9rjsgrvkObQhE7oZFTKU8bVQJXgK/8nnLfmStD5WSuxdxzXZF8t0VmE8JTqqfvuu79lpq0MRBkY4znDbPsDtwylLcj0/VPBiDUQLQLlWiy1xiA7Xk3NW1yH/osPbi2w8cgldADCyOAIgf2834YjAM9IOljnlyDed4CgIqW3/C6y8pRlZHDe0ZRaSvSBnkpni1AxG+OcytD2+cvl+a4jt7ayWdhsYWcM5phPT3HGcNyiRudU5RbINejWE1oq7WeVpelG/akMzeeGHUa5/VhqhFA== 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=Td6TS8FPhbPHz2ZK5icOA0lxibO0U4DmTtERmiQ1w6A=; b=mXOv5D2x67BDVui2xk7w38o4Q9849bSpwmkBYkZGSlcnf1LWYDmTxgyzDh3HmQUCU6TK277NTl8kqveWPRXjVG32S6diwuC+HIYBZ3v2tDP+Heo/kO4+nLZAuw/vPsk3J6nIc00gjhA86NklsZf8bohw3Bph1Udh7VK9o2P0BHo= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB4018.eurprd05.prod.outlook.com (52.133.37.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.16; Sun, 24 Nov 2019 18:10:34 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::2441:6a62:ee55:bf6f]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::2441:6a62:ee55:bf6f%7]) with mapi id 15.20.2474.023; Sun, 24 Nov 2019 18:10:34 +0000 From: Shahaf Shuler To: Thomas Monjalon , Stephen Hemminger CC: "dev@dpdk.org" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v3] mbuf: extend pktmbuf pool private structure Thread-Index: AQHVoouJlMPgBAyq2EylyMCDrrk7e6eamisAgAAEIYCAAAFWEA== Date: Sun, 24 Nov 2019 18:10:34 +0000 Message-ID: References: <20191121122810.147351-1-shahafs@mellanox.com> <20191124055336.129527-1-shahafs@mellanox.com> <20191124095016.7a5fe320@hermes.lan> <2629536.neMm6mQGvd@xps> In-Reply-To: <2629536.neMm6mQGvd@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: bec99874-e424-469a-0d31-08d7710999fa x-ms-traffictypediagnostic: AM0PR0502MB4018: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 02318D10FB x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(376002)(39860400002)(396003)(136003)(346002)(189003)(199004)(76116006)(81156014)(81166006)(66946007)(8936002)(66556008)(54906003)(71190400001)(66446008)(71200400001)(110136005)(66476007)(64756008)(5660300002)(52536014)(2906002)(316002)(3846002)(6116002)(66066001)(26005)(8676002)(256004)(6436002)(14454004)(99286004)(446003)(11346002)(229853002)(86362001)(6246003)(25786009)(478600001)(6506007)(33656002)(4326008)(55016002)(76176011)(305945005)(7736002)(9686003)(74316002)(7696005)(102836004)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB4018; H:AM0PR0502MB3795.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: W0ktoivvh4drSuXctpPrF5rEfRoSIfj5KKZ9rWaJgkRQfV0gpkPHCgK/m2Gw7WhelQuVsfHnqzRMV9Z1+V58MJf4Pvsb2V+HfjamDpKV99J+h7ck4KNTAucDA33TJyrJcNrsu8WRNszDiotKtM9MOswspDrxpt4dmthf9jGQWTLxMVB3gO4k/QlbCwTJIS7A8rP6Gbaxtno2w+syCBFMZefRimkV1wnHuJ4mvtu884WKVj8e7S/lJcEEDOymXLsSxhqSyj/6oXFiBHwGB5bR6UVcJKEP+/yyilg3HKqeaUgWwgeULtHs3YD72rdu4FfUpWiDvDV3rBgHW71WOIm+LAV5kybCFOFkNE4F5GabGSRu7NenpBPWrAAoeV5+sfKrkIhuX7vI47sBzmjdu5kkpzM0UBhySwXWkWYsmVqpNZd9ZmLm15/0IO7qfHdf3Rym x-ms-exchange-transport-forked: True 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: bec99874-e424-469a-0d31-08d7710999fa X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2019 18:10:34.6091 (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: FX8ghpmpsANcLKUaVITf4qXitgqFoXjJTq1Qle+KS6+JhzjshD9ND/bm67Wm13KUp8yO4b6zuHjfHAByFKA4ig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4018 Subject: Re: [dpdk-dev] [PATCH v3] mbuf: extend pktmbuf pool private structure 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" Sunday, November 24, 2019 8:05 PM, Thomas Monjalon: > Subject: Re: [dpdk-dev] [PATCH v3] mbuf: extend pktmbuf pool private > structure >=20 > 24/11/2019 18:50, Stephen Hemminger: > > On Sun, 24 Nov 2019 05:53:46 +0000 > > Shahaf Shuler wrote: > > > > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > > > index 35df1c4c38..8fa7f49645 100644 > > > --- a/lib/librte_mbuf/rte_mbuf.c > > > +++ b/lib/librte_mbuf/rte_mbuf.c > > > @@ -49,7 +49,7 @@ rte_pktmbuf_pool_init(struct rte_mempool *mp, > void *opaque_arg) > > > /* if no structure is provided, assume no mbuf private area */ > > > user_mbp_priv =3D opaque_arg; > > > if (user_mbp_priv =3D=3D NULL) { > > > - default_mbp_priv.mbuf_priv_size =3D 0; > > > + memset(&default_mbp_priv, 0, sizeof(default_mbp_priv)); > > > > An alternative would be to use structure initialization. > > > > struct rte_pktmbuf_pool_private default_mbp_priv =3D { }; >=20 > I think we used to have issues with such structure initialization. > If I remember well, icc was not always happy with such construct... Yes. Some versions of clang also didn't like it.=20 > memset is safe >=20 +1.=20