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 96EC7A04F1; Mon, 13 Jan 2020 18:07:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B1CC41D15C; Mon, 13 Jan 2020 18:07:06 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10049.outbound.protection.outlook.com [40.107.1.49]) by dpdk.org (Postfix) with ESMTP id 2EFE51D159 for ; Mon, 13 Jan 2020 18:07:05 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OMsf+p2+iSaSEeHBwv4DIIPQQ5Lp8TIkTrSTu1pmbJ0gwYFezO0boDA1UnNpRkNMVV2Mz7vRaAVsxCveicCBQr7phN/nZzvqfqEm+tVfjH0ajJ/SjIvYTH2qsLs9PkISDBtx/rxJVk0qMdu7A3VIeDZEkuWXV+n+S2ZTqXucFIeMJlmZ4R+EKcGG72j2oii5NrgyVUY3GCh4m+Ij8OMtDjMGZY1ez8x9r9gD6KHXyomLNkQmRsR7AA4nCeNzdtRIjFeowlfLl6bkuV7h+DzTiGurdgc8/PTciAaLVr+aHHpHqqX1RIZUE94CE/ARX6GcUoeRRoVKtnk1X6xnfCkC6w== 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=2ZXpUwRAnXRd8jWv0J6+nVaIvx9SNQx93eDZlX005TA=; b=FXMsLNuQRV4h495zbpBkMfZ5kRgv2WefALe4m10bvvppJqpBbUaKY02oeoYvaRiDbckMn5wlSuC9zyLNUYC3N3XBPo6kE1KnNX87vdi1VMizDG6iHPa6/IdnWIBR5biDekXOGs1Qt40ZrvHP34NRFVWj1n6N91ExvSITzW3PT+0mbavlbL8v5Daq8SrkSFNJ3Qysq+vrEWXNx8AnV0p8wYfnVagW8dCiPPtgEWRJbyHddhHdq8OmezeYyN/3WIzXFQITnsmBEtCDQPeDzjy932ifxQaySyvPNb3fkNLEH4V36zQRBt5QhFoeNylN2Cw3XR5PE5I4HeDprX1/cC7hsw== 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=2ZXpUwRAnXRd8jWv0J6+nVaIvx9SNQx93eDZlX005TA=; b=NuwSNnTpjCEsTt+1BNxgC5oDjQ3rUUu6h3PXS7ssTbrqZNG1OBSZeupXEfCTfvB7H1bCd097bJ37sLVqXm22tqzdMJqQXkV4EK/jbOVV/xKl47kKQBHmW3+hx0iyLn3i8tKxd8X1CDX7m9ydftqDUXNvqA5vd24haYriJMbyyzM= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3506.eurprd05.prod.outlook.com (10.171.186.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9; Mon, 13 Jan 2020 17:07:04 +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.2623.015; Mon, 13 Jan 2020 17:07:03 +0000 From: Slava Ovsiienko To: Stephen Hemminger CC: "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , Ori Kam , Shahaf Shuler Thread-Topic: [dpdk-dev] [PATCH 1/4] mbuf: detach mbuf with pinned external buffer Thread-Index: AQHVx99ypQnoxboGnUCj1dm+iRHglKfkNoGAgASgCaA= Date: Mon, 13 Jan 2020 17:07:03 +0000 Message-ID: References: <20191118094938.192850-1-shahafs@mellanox.com> <1578679022-25344-1-git-send-email-viacheslavo@mellanox.com> <1578679022-25344-2-git-send-email-viacheslavo@mellanox.com> <20200110102359.680cdcdb@hermes.lan> In-Reply-To: <20200110102359.680cdcdb@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: ffeebd7d-7bb9-4149-a102-08d7984b032d x-ms-traffictypediagnostic: AM4PR05MB3506:|AM4PR05MB3506: 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:9508; x-forefront-prvs: 028166BF91 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(71200400001)(8936002)(8676002)(107886003)(66946007)(4326008)(9686003)(81156014)(81166006)(66476007)(66556008)(64756008)(66446008)(55016002)(316002)(52536014)(7696005)(2906002)(478600001)(26005)(86362001)(54906003)(6916009)(186003)(76116006)(5660300002)(6506007)(53546011)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3506; H:AM4PR05MB3265.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: Ko8Um3X2j7pn7QWwS6uq7OKmfKCOwGIxBkN+fV3dNazxMvvE+XMa9YUkEiSngDbmwHMSKZbH4sdIdrnvqnRn8v3ocjZHwKSSun6it5zYXdKul8lcIEt9fozrE7rfyE7upwJs0HXfOxSYMwP9hRTuXUIuBFgMhpfZBCltySwHwVM3q0waDId1jGba0cMBBfhbSc9/P8p+gIM5fW08YvvKO2Ad9GI3EaD6RH/LvsFqgtwlQizgwBn2Oa+/0elQqdlKFN7d8XExszCey2oOdfSbYz2Aiiw3APmcf4GrGhWy/QcuVdhJ0StZDfLkglUXfOvIgKSvxy+fYSyUBrmQWyzTd8T0+fLRoOjXI2Tu502OpBNCfDx3vWYtr/qMykOdcRdvAqnQ3XixzmYX2wPbJoSXPgczU2GmME9hCh50CvrtEw8iiOQblTHe+E79utAGdl8f 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: ffeebd7d-7bb9-4149-a102-08d7984b032d X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2020 17:07:03.7766 (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: 9GD+W8emttG8J7O6YtWVXY1+F8B9JmbZQE2JA8HEWW4LjeZ+wkfVhBP11EacZz4/R08Wm/Jn2XgwRY1O88+I6C5bVYW4WwDRxVLMmM+Q/z0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3506 Subject: Re: [dpdk-dev] [PATCH 1/4] mbuf: detach mbuf with pinned external buffer 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 Thanks a lot for the comment. > -----Original Message----- > From: Stephen Hemminger > Sent: Friday, January 10, 2020 20:24 > To: Slava Ovsiienko > Cc: dev@dpdk.org; Matan Azrad ; Raslan Darawsheh > ; Ori Kam ; Shahaf Shuler > > Subject: Re: [dpdk-dev] [PATCH 1/4] mbuf: detach mbuf with pinned externa= l > buffer >=20 > On Fri, 10 Jan 2020 17:56:59 +0000 > Viacheslav Ovsiienko wrote: >=20 > > + > > +static inline uint64_t > > +rte_mbuf_has_pinned_extbuf(const struct rte_mbuf *m) { > > + if (RTE_MBUF_HAS_EXTBUF(m)) { > > + /* > > + * The mbuf has the external attached buffer, > > + * we should check the type of the memory pool where > > + * the mbuf was allocated from. > > + */ > > + struct rte_pktmbuf_pool_private *priv =3D > > + (struct rte_pktmbuf_pool_private *) > > + rte_mempool_get_priv(m->pool); > > + > > + return priv->flags & > RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF; > > + } > > + return 0; > > +} >=20 > New functions need to be marked experimental. > The return value should be boolean not uint64_t Will be fixed in v2. >=20 > Why does this need to be inlined (and thereby create new ABI burden)? > Also having it inline makes making pktmbuf_pool_private really private in > future. Due to performance reasons. This routine potentially might be used in datap= ath. With best regards, Slava