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 7ADD3A052E; Tue, 21 Jan 2020 07:48:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 98A6A11A4; Tue, 21 Jan 2020 07:48:34 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130045.outbound.protection.outlook.com [40.107.13.45]) by dpdk.org (Postfix) with ESMTP id 969CFFFA for ; Tue, 21 Jan 2020 07:48:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PvmTJZS8ZvMV7YNq3xCWsr0pHcyAPek6PoaFvQ5KX7Mw2qXoILdYe9oKAtkU/anzHI2keuQvGos1dsUHG2ibNIc8l0W24mykdsIv6xRToC65jFnyGbuGxy09/TVpqDgZAqna9t/51OiuJUP9kxlUeBFO90Jvcih0rjQhG1bd7ObL/aLM9cjdXEVVkmtOqgVp/YnmUw53JUu5p3C07GnF6Fb96sZBm4o/ardNcZLb+5o/IEoqDNSr9SKwm+gsYFN+BJevX4ljtO68B/gt2czCKfcTKBgg8QuT8BXAtGhWsLrVl7rXQdDtvKyNCrabmojm6eHwDZK00xXK5r5ihlIWfg== 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=SP9NbekoJe0ihUSxMCpc9os/eQV9cxj1Y5ixygkC3i4=; b=ZvNDJryFDqwsliPEfqncqXm0L3j7sUj/A+cuc5fFCS+axQd06fkktHq4zsKc9aQu6fGjuwV/csRDz1xcixpxAFepPZlXvmdKZ1BOvpzoDwMdBa4lt+KIigkSoPYrGRBksQx+Kg4FXIdRHaNHtMOybBOlwd198jP/UFUMWT99hch2Kj+963uTFDQDiC7tUcQiU68PI3Yky1i3JWIVXctK2LqVxe6+6jWobaG31Fe8IyQ+H4+2jweHXOles6JQGQRVUCOtKF65+akRVnsZhmNYFrpUMgTNejn3aUYbgOYI8nRnJv/kwwQyVVNLN7frxjnenydnuT2jkNJr0ygQxTZ+9g== 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=SP9NbekoJe0ihUSxMCpc9os/eQV9cxj1Y5ixygkC3i4=; b=i/u5C0mi1rYCyw2prSFIWl3NiDNWIYA4Y+oHegqIQnfPakBJH3NuQN6FSJwCc9M9Y1PfMmbeEC6AB+rOP4o4dupkfKRr+ouVuy2fI0EjDjhPgQwdqjWZlscvAlxNmMQyl2Ya+JJP+R++B60Ej7kkCd+EPW8BP1edycC+R02iGcM= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4SPR01MB270.eurprd05.prod.outlook.com (10.171.191.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.18; Tue, 21 Jan 2020 06:48:31 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::68eb:ad79:71f4:110f]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::68eb:ad79:71f4:110f%3]) with mapi id 15.20.2644.024; Tue, 21 Jan 2020 06:48:31 +0000 From: Slava Ovsiienko To: Stephen Hemminger CC: "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , Ori Kam , Shahaf Shuler , "olivier.matz@6wind.com" , "thomas@mellanox.net" Thread-Topic: [PATCH v5 1/5] mbuf: introduce routine to get private mbuf pool flags Thread-Index: AQHVz9JUQbzanLz0f0WVDugMHenrNaf0rYug Date: Tue, 21 Jan 2020 06:48:31 +0000 Message-ID: References: <20191118094938.192850-1-shahafs@mellanox.com> <1579541003-2399-1-git-send-email-viacheslavo@mellanox.com> <1579541003-2399-2-git-send-email-viacheslavo@mellanox.com> <20200120124342.6b308e18@hermes.lan> In-Reply-To: <20200120124342.6b308e18@hermes.lan> 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=viacheslavo@mellanox.com; x-originating-ip: [77.75.144.194] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b1b2a71f-da6f-4a22-3ec2-08d79e3deda2 x-ms-traffictypediagnostic: AM4SPR01MB270:|AM4SPR01MB270: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0289B6431E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(189003)(199004)(71200400001)(316002)(54906003)(33656002)(478600001)(66946007)(66556008)(66476007)(66446008)(64756008)(86362001)(76116006)(7696005)(26005)(53546011)(6506007)(5660300002)(8936002)(52536014)(186003)(4326008)(8676002)(81156014)(81166006)(9686003)(6916009)(2906002)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4SPR01MB270; H:AM4PR05MB3265.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: FMDspkhQ1LXfAbWD6xMX2vMAM8gHMr2ZbbK5XWV02mocLAxoRRLSSfp26Rb5JVEuF36qv1mnG1yWj5dOZ2CwaqITBD9gjq9ZB26l9T7pc5RXmQ7wrsDE85TDCzNOWwPvO5X07FJZYiTQuBJmiaKRDtSbOfhOCorif39PZh/JbVK8XRE0562QHZa5GSBuWRIMUI3Z3xYF9s00Qajsh1h7WIoYbi1MJxhRHL1Y+wOKA3xTaIllm6Jfws9LcAC4i6vSItxd8uVLYoleadWJEiZZjTLrqKO4/9BC1SwlQxWHRjdPtHsuGQvLLh3NJbrmHn9oht6eTJzNWgZL3//NvkABkJM3UrOiPSkXaIb+53Q4Z0gSMskEiZtqt3uSxa0c/XTlSwvzn5VpXPqEQbkuZMkeXi32l0OHJx+NvbinHUBZPJcTnELzrorG2S7j/HwPbVSp 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: b1b2a71f-da6f-4a22-3ec2-08d79e3deda2 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2020 06:48:31.2391 (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: bJ/2ycJO18m/d/A5gxSimscVVnqstck+Yacsy+ECOEogQn1xz+Gw53r9O2SgCLKBdjgZC7mTsnfOwJkWpG0ZT8TMNFC+kgNEbFRz2/YG2hM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4SPR01MB270 Subject: Re: [dpdk-dev] [PATCH v5 1/5] mbuf: introduce routine to get private mbuf pool flags 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, Stephen I'm appreciated for the for reviewing. > -----Original Message----- > From: Stephen Hemminger > Sent: Monday, January 20, 2020 22:44 > To: Slava Ovsiienko > Cc: dev@dpdk.org; Matan Azrad ; Raslan Darawsheh > ; Ori Kam ; Shahaf Shuler > ; olivier.matz@6wind.com; thomas@mellanox.net > Subject: Re: [PATCH v5 1/5] mbuf: introduce routine to get private mbuf p= ool > flags >=20 > On Mon, 20 Jan 2020 17:23:19 +0000 > Viacheslav Ovsiienko wrote: >=20 > > The routine rte_pktmbuf_priv_flags is introduced to fetch the flags > > from the mbuf memory pool private structure in unified fashion. > > > > Signed-off-by: Viacheslav Ovsiienko > > Acked-by: Olivier Matz > > --- > > lib/librte_mbuf/rte_mbuf.h | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > index 2d4bda2..9b0691d 100644 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -306,6 +306,23 @@ struct rte_pktmbuf_pool_private { > > uint32_t flags; /**< reserved for future use. */ }; > > > > +/** > > + * Return the flags from private data in an mempool structure. > > + * > > + * @param mp > > + * A pointer to the mempool structure. > > + * @return > > + * The flags from the private data structure. > > + */ > > +static inline uint32_t > > +rte_pktmbuf_priv_flags(struct rte_mempool *mp) { > > + struct rte_pktmbuf_pool_private *mbp_priv; > > + > > + mbp_priv =3D (struct rte_pktmbuf_pool_private > *)rte_mempool_get_priv(mp); > > + return mbp_priv->flags; > > +} > > + > > #ifdef RTE_LIBRTE_MBUF_DEBUG > > > > /** check mbuf type in debug mode */ >=20 > Looks fine, but a couple of minor suggestions. >=20 >=20 > Since this doesn't modify the mbuf, the arguments should be const. > Since rte_mempool_get_priv returns void *, the cast is unnecessary. Agree, will prepare the dedicated patch. With best regards, Slava