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 6A250A00C4; Thu, 31 Oct 2019 17:07:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 061AA1C2F3; Thu, 31 Oct 2019 17:07:45 +0100 (CET) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00049.outbound.protection.outlook.com [40.107.0.49]) by dpdk.org (Postfix) with ESMTP id 1A6781C2A3 for ; Thu, 31 Oct 2019 17:07:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a2x8N07J8+saVfcjkKoGKukaKmpGbZw1cNIRTt6TzyYfOTVxQrqYFDUMrXHIuMvOeliCiIrfrWHeV4XQVogF54B+T8FTlImz/2IJWy5l9BkBzW5J/8AVjPYvPYKJwwAerFu9lthzOALFkmCNM2KX1GxrGPdBg43iIPd96zy6tjndEZSZIe4eKfbmWwq0VuDk1jKZSq0ZAyQ0iLbX2OLu+yH77V8yb2AXa/pbT8eg/BT/NDd4MXAg/P2fBVK8LXiS4CLjuelYhdiDj+gMCh+XZEDNsPIxTcNpV/nGPjyVSaSx4iiYqofZxBNIVLxyfI8QU1IWZzxbgZ8dW/6t5TZbwg== 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=3tVDOAtTsz+CLjQ21m078uRUhoxAhDeM3uSrzpzNH+8=; b=G3EmPSgjrGbfcQmuI8b/z8WsHmRL7Ke7QZZq7s2ZXK4SidaiBAAnoTifQ+SoEEvi8BptXjiwOWWcgEdFOtscsDxhrxcLTITdmfc+U7p0cchadsY6AFFnTDwAQ/mV6Qvt2O0Xuv/oKYsUZ2L4QIeHyY43uXSFunv2JWg9GaQGWn+JdYZ0n4QO7hLkPO4IIU2fMiUeEa4nYMNJ7NP5Z9rOaEYa5ykkVND4gqAE2O5Qf48d/hfmsu4K10aTZ6ZB/h4KV4lk8APMm65Bz7KWdOux8Yqz8szhGmo5J8EY0oTV6c6MD54CPEWIh4BVuRys/OukZRMcSCIgvOTXPXyRGuXkTQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3tVDOAtTsz+CLjQ21m078uRUhoxAhDeM3uSrzpzNH+8=; b=e5ywMlkJLxusXWyYHUTzibv9eJ04XAEF1o+NISWdpXIdm4B1Dy4CD6AOUFBfOyZV9A061zRf9mfRE3xXrjKzoHtKXzVjhYoKnLLxz+HixrfL+WeidJWGXJxX4IK0lMNgXzCxgDpclVafmULaohlGF+DB8QzdlWgkHSKeDz0AHNQ= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3186.eurprd05.prod.outlook.com (10.171.191.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.24; Thu, 31 Oct 2019 16:07:42 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::edab:529f:d14e:d3b]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::edab:529f:d14e:d3b%7]) with mapi id 15.20.2387.028; Thu, 31 Oct 2019 16:07:42 +0000 From: Slava Ovsiienko To: Olivier Matz CC: "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , Thomas Monjalon , "arybchenko@solarflare.com" , Ori Kam Thread-Topic: [PATCH v7 2/2] ethdev: move egress metadata to dynamic field Thread-Index: AQHVkAMOYYjXr32p/kW01tyDPKG6Oqd05qew Date: Thu, 31 Oct 2019 16:07:41 +0000 Message-ID: References: <1572455548-23420-2-git-send-email-viacheslavo@mellanox.com> <1572527121-13133-1-git-send-email-viacheslavo@mellanox.com> <1572527121-13133-3-git-send-email-viacheslavo@mellanox.com> <20191031155123.dtreo5stjznxzidt@platinum> In-Reply-To: <20191031155123.dtreo5stjznxzidt@platinum> 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: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 040afb6b-0efa-4102-400d-08d75e1c75a1 x-ms-traffictypediagnostic: AM4PR05MB3186:|AM4PR05MB3186: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(346002)(366004)(39860400002)(396003)(13464003)(189003)(199004)(8676002)(14454004)(81156014)(81166006)(8936002)(476003)(107886003)(7696005)(229853002)(6916009)(102836004)(478600001)(66066001)(76116006)(55016002)(26005)(6116002)(76176011)(52536014)(6246003)(186003)(99286004)(86362001)(66946007)(3846002)(5660300002)(66476007)(305945005)(33656002)(316002)(14444005)(25786009)(64756008)(66446008)(66556008)(74316002)(71200400001)(4326008)(256004)(7736002)(2906002)(486006)(71190400001)(6436002)(446003)(11346002)(9686003)(6506007)(54906003)(53546011)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3186; 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: RQNr6W3NweH7zwDP6W+MSPUhMVRL7qsWVXSnGCgoYnj47dYw3GeBfr+2yF2ldTeD5umMq/8jjN2t7ro9Q2PRyd6Ba5a0mK6LymefZ5E42Eh+9imZoBRjv4g3zr4xuzc0pn8GC6e6tgYxPk51xdqTUFUYROC87pfEP5CIAyGsfDBCriwinT23urSmyWlOMGJardzuwEbYdhixTBoWD/hiAg+brWMMuPfqNgPTYyDwT38gBp/FziWAH82JmnNtUY31hn8xwG6Hui6CFnyCy/i0jIaZaB4/d2t9oY5L3syZDbTepWc5ZsPuGjHcwXLO0JimEbBNPYs4bRdvvj2esiel1fcOQnneM5xxVUTxyjxEHYsrQKGWAJqKHsLZ2hfb7ppd077qx8ZPAR9NK+1ezKh6NyAO9REkF+ual/sI6pSYN/imLsP7bHtrRawijYrfjY4r 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: 040afb6b-0efa-4102-400d-08d75e1c75a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 16:07:42.0432 (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: aPOPIUSIRebxnpHtzp5BtFe4S3mqAKojcv97CDAA1RAF6cgSw5YY/XvcjgcWMG5oHnO7OzNl+m9Y2RjhtWEZ4yeaYYtKjo/etkKpEorIQhY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3186 Subject: Re: [dpdk-dev] [PATCH v7 2/2] ethdev: move egress metadata to dynamic field 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,=20 > -----Original Message----- > From: Olivier Matz > Sent: Thursday, October 31, 2019 17:51 > To: Slava Ovsiienko > Cc: dev@dpdk.org; Matan Azrad ; Raslan > Darawsheh ; Thomas Monjalon > ; arybchenko@solarflare.com; Ori Kam > > Subject: Re: [PATCH v7 2/2] ethdev: move egress metadata to dynamic field >=20 > Hi, >=20 > On Thu, Oct 31, 2019 at 01:05:21PM +0000, Viacheslav Ovsiienko wrote: > > The dynamic mbuf fields were introduced by [1]. The egress metadata is > > good candidate to be moved from statically allocated field tx_metadata > > to dynamic one. Because mbufs are used in half-duplex fashion only, it > > is safe to share this dynamic field with ingress metadata. > > > > The shared dynamic field contains either egress (if application going > > to transmit mbuf with tx_burst) or ingress (if mbuf is received with > > rx_burst) metadata and can be accessed by RTE_FLOW_DYNF_METADATA() > > macro or with > > rte_flow_dynf_metadata_set() and rte_flow_dynf_metadata_get() helper > > routines. PKT_TX_DYNF_METADATA/PKT_RX_DYNF_METADATA flag will be > set > > along with the data. > > > > The mbuf dynamic field must be registered by calling > > rte_flow_dynf_metadata_register() prior accessing the data. > > > > The availability of dynamic mbuf metadata field can be checked with > > rte_flow_dynf_metadata_avail() routine. > > > > DEV_TX_OFFLOAD_MATCH_METADATA offload and configuration flag is > removed. > > The metadata support in PMDs is engaged on dynamic field registration. > > > > Metadata feature is getting complex. We might have some set of actions > > and items that might be supported by PMDs in multiple combinations, > > the supported values and masks are the subjects to query by perfroming > > trials (with rte_flow_validate). > > [snip] > > +/* Mbuf dynamic flags for metadata. */ > > #define PKT_RX_DYNF_METADATA (rte_flow_dynf_metadata_mask) > > +#define PKT_TX_DYNF_METADATA (rte_flow_dynf_metadata_mask) >=20 > Should we have 2 defines pointing to the same mask? Shall we use > PKT_DYNF_METADATA for both? It is just a style issue, we have two sets of PKT_RX_xxxx and PKT_TX_xxx fl= ags, it just looks nice to use appropriate flags in RX/TX parts of datapath. > > > > __rte_experimental > > static inline uint32_t > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > > index 8c51dc1..35df1c4 100644 > > --- a/lib/librte_mbuf/rte_mbuf.c > > +++ b/lib/librte_mbuf/rte_mbuf.c > > @@ -670,7 +670,6 @@ const char *rte_get_tx_ol_flag_name(uint64_t > mask) > > case PKT_TX_SEC_OFFLOAD: return "PKT_TX_SEC_OFFLOAD"; > > case PKT_TX_UDP_SEG: return "PKT_TX_UDP_SEG"; > > case PKT_TX_OUTER_UDP_CKSUM: return > "PKT_TX_OUTER_UDP_CKSUM"; > > - case PKT_TX_METADATA: return "PKT_TX_METADATA"; > > default: return NULL; > > } > > } > > @@ -707,7 +706,6 @@ const char *rte_get_tx_ol_flag_name(uint64_t > mask) > > { PKT_TX_SEC_OFFLOAD, PKT_TX_SEC_OFFLOAD, NULL }, > > { PKT_TX_UDP_SEG, PKT_TX_UDP_SEG, NULL }, > > { PKT_TX_OUTER_UDP_CKSUM, > PKT_TX_OUTER_UDP_CKSUM, NULL }, > > - { PKT_TX_METADATA, PKT_TX_METADATA, NULL }, > > }; > > const char *name; > > unsigned int i; > > diff --git a/lib/librte_mbuf/rte_mbuf_core.h > > b/lib/librte_mbuf/rte_mbuf_core.h index 3022701..edfc7e9 100644 > > --- a/lib/librte_mbuf/rte_mbuf_core.h > > +++ b/lib/librte_mbuf/rte_mbuf_core.h > > @@ -192,11 +192,6 @@ > > /* add new TX flags here, don't forget to update PKT_LAST_FREE */ > > > > /** > > - * Indicate that the metadata field in the mbuf is in use. > > - */ > > -#define PKT_TX_METADATA (1ULL << 40) > > - > > -/** >=20 > You should also update PKT_LAST_FREE just above. >=20 Yes, my bad, will fix. [snip]=20 With best regards, Slava