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 C8E97A04FD; Tue, 14 Jan 2020 08:19:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAC6E1C0DC; Tue, 14 Jan 2020 08:19:32 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10041.outbound.protection.outlook.com [40.107.1.41]) by dpdk.org (Postfix) with ESMTP id 8DBB71C0D9 for ; Tue, 14 Jan 2020 08:19:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RInrPhFA1mSiT5OSOhqBPFMQQOI2ihIAHRHcb+E8tk9Zo+u+paJDUYYg43Pus6yMx63I0b1/cUCEHnbfxLp1osLE1vx4Z6n5L1mDhQLr4Wgqt3Xn2l8FxKybZdDCyTlh0CYj4/4h/oBGmycdHjKHyUBWJ9Ic1YNJj0xXC3p+kgkNVy+VDpgPfFLVYGa9Dp08uol/eivqLthK+abQGitxoWphIO2q/5T4/f9m3f6FL/lU3y+7I3IA5fpfOna6mX4aMk1AO/OswaEeLOyHXjsCg4DbNIxTvV5fKJb9sXxQUo2JNXmmu13T/EOrRV7HpsPZrNgNe+vuLLDTn15umiVdRQ== 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=QeMOjXLyotaddtKjcA1gb5aWiif8brGo1giPb3LfBm4=; b=jU200dZpE00dxMtgEB1H1gGZGT4iT9nVMqvKelaR2P7ezhfyZKe2eqQVjHb4e+XsAzjJUyRGQzj8y3iNXhSgCU4uEXpjrzjmqeHL7BLaQVXAM+BmyIWYA2F0JdNQCtW6LH5aNdxM4lQvtw5koTHni0uLjPVr7ro8JvtlQRL0jVFG8ZkKk7iDsRkcBEbsYlUIzyXRffF29KztX2jDjRLoruU1enJ8azDGO4I5dajVisRnw3sMs0LY3onontummRyMihl0UxyjgjAPGWK+gXGou/jwkPNLk24GjUW27EcJYpzRLJ9fdkiAnQusA35qa2kb5BAqCjZZPnqTd9PDOWflVg== 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=QeMOjXLyotaddtKjcA1gb5aWiif8brGo1giPb3LfBm4=; b=nZoeu/XVfG5JE1gWfDwb+M1fsQEFH3SwsmgqdLx68Ijv2wIprnBBPNWGIz0dd/Wfqp+/aAx8zjm+eqrI/s3vFzjMZimQLxodjFOlDDR5HXb1biPI2VORxrOYqvWmacv6PJe4jSxRNVT57x6zYOUeiReTZYrmY1zUSbcn0CHN6P4= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3473.eurprd05.prod.outlook.com (10.170.126.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.9; Tue, 14 Jan 2020 07:19:30 +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; Tue, 14 Jan 2020 07:19:30 +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+iRHglKfkNoGAgAWNpOA= Date: Tue, 14 Jan 2020 07:19:30 +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: c59b8d98-046d-4f14-e657-08d798c218d1 x-ms-traffictypediagnostic: AM4PR05MB3473:|AM4PR05MB3473: 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: 028256169F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(366004)(346002)(39860400002)(376002)(189003)(199004)(107886003)(186003)(7696005)(4326008)(33656002)(478600001)(6506007)(26005)(53546011)(2906002)(9686003)(81166006)(81156014)(8676002)(8936002)(52536014)(86362001)(55016002)(5660300002)(66946007)(64756008)(66556008)(66446008)(6916009)(71200400001)(316002)(76116006)(66476007)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3473; 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: fzjldJptmvFYAet/amxU1PjTusvps5PDyBde75698IQn0SPnDpmSSilUP9yIzL8UAwKBybsdY5xr8S8oZYubP/+f2RURKTMQn/ecoq0BdkLGYrFnJ+8pSup9CIrvKrJEclOeDitpWr0hB/A9TtKNMlYHC49SDCAcKW0e48OkjL0ckuuvZqGAPYI3JA80LcNsIKtINz84TgXGb8c7giYhyKemd4ifgLYSAl2pVQxslONx7hrhF1b+T++mtRiFYpnGHjtBvp4WWYhCsE/kLXEXfae5AarzOpUkx7a9q45idWW8YqXgX0+JE3W2iUdSoAaNis687WVoIbDHBfLwYmSp2BfIwO3DwGg56VPDwJ3nNMomKzDcfUQZDHVrj66p4yEw////8R7tfM7CPy+Rt/Y0DOjsYsyJsvlVLoXsElnmA5plnmoLnCBinRe1Sd6HKiHU 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: c59b8d98-046d-4f14-e657-08d798c218d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2020 07:19:30.1792 (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: osVuMz8uUI6+pkRBPWlJDhR06D3hPgkpEYLUngRxEVearz51vVzFb/IaPvXeqjJTq7HtBUBp00FeVOm/jZAWqY9m+xl8NTQrbcZc/piusB8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3473 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" > -----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. >=20 > The return value should be boolean not uint64_t I intentionally avoided the "bool" in v1. This is not native C type, requires the extra header (stdbool.h at least) and has poor portability - we would run into conflict with AltiVec - "bool" becomes reserved keyword. So, I'm going to change return value type to uint32_t (as private flag fiel= d has). With best regards, Slava