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 627C2A0512; Wed, 3 Jun 2020 12:31:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B60D1C439; Wed, 3 Jun 2020 12:31:53 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B1A741C2A0; Wed, 3 Jun 2020 12:31:51 +0200 (CEST) IronPort-SDR: qPVE7ohA1cIL5/09npeXis9OAvK+oB1opOJhks57hJ+tSa9yeRtcNkWmKmE4CSUNBoK8vSSOUX qeWmDBTRTEVg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 03:31:50 -0700 IronPort-SDR: /04PHz1RkU5MV67WzTWF6yY1u+6J5vf+nC8TnJUv1EDmjk2RYQzttz+rsZGAd4aWqS5O7/dJRE 5CSbaiprhXZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,467,1583222400"; d="scan'208";a="286994662" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 03 Jun 2020 03:31:49 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 3 Jun 2020 03:31:49 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 3 Jun 2020 03:31:49 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 3 Jun 2020 03:31:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+Ws2x5Q0ElM05JCkns5Hzav6jIwbdM4v8eM7M7wMqYqBlXacafVE+kFhswdwUApq/dHv60nxKemhPtfTfDCUmB5VlxLvBHB3v+HtX4nqMU+AxrkdeQZx6shedT39s3+PPAy4aId2soRfVUd3z6Z16BSHXqJOvdxyfKbDZhP2x8zIBNlJBk72YwnYr/gdc6m9kQBAOtD3hJ1jZuPnvxXfPsbrA5LIgcmdgJHK0mmO3JKqr8F5dtxhflarVU5M+Uz1XT6gt4vA513g2R0KnIwZ1etH+YOakbWTxkMULwAdOoUWV8Aeymn3HWTnBMBNcFtjhRegRZeeWEH7B8doLRp+A== 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=I0LgX893/aoCdYKmykO6bKJ5we4Za5zDOt5rsj41kdY=; b=P9ygxgotnehx+4C+wSmQQqFU9qmOab23GHeXbUp16ZWj637LOW/FWv7OWY2jg7B/TBgqCqZAlpj9IUcHWdaauWLR8r6CH9gIBF4D2W/Tu9gy/th5FX0ejhxF42B8PV/3lZnUUBGXHaAYrgbuDl5m/Ob9/enddX9Pp97Mv/pm240YntrriP2VQ5h5mjGW7axCtn6sY5jzKrdxysS+SBs2mpaX0wNnyTdGqAnxKYxDyaLw1AeljrJwfUhrOzC8HMNDtMbzolq5X+/DEj+jyk3mxr5peHZc3+XIQbVtjtgLnr28gGd5JMR30VZbPwo/veGWt8oiiqOrDjy5yaJAEcQ6dQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I0LgX893/aoCdYKmykO6bKJ5we4Za5zDOt5rsj41kdY=; b=VyquaM/hyTBaMODXpWUHiSIwmX1hXpv5+YHHlP/ruqnGOqxXgIUzlsSClLOA6jCMe9uKBaGsfybryDyjkrKRUzj7oiwYG6bvNocD2LfYmD4VP0i3l6M5WGIb6AHfEERNEE+kgJJS/7Xkn/2J8ymRH84dATsaB4zmOcaIcuonkT0= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB3592.namprd11.prod.outlook.com (2603:10b6:a03:fb::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Wed, 3 Jun 2020 10:31:36 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f160:29ab:b8f9:4189]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f160:29ab:b8f9:4189%6]) with mapi id 15.20.3045.024; Wed, 3 Jun 2020 10:31:36 +0000 From: "Ananyev, Konstantin" To: Nithin Dabilpuram CC: Jerin Jacob , "Dumitrescu, Cristian" , Olivier Matz , Nithin Dabilpuram , Thomas Monjalon , "Yigit, Ferruh" , "Andrew Rybchenko" , Ori Kam , "Burakov, Anatoly" , "Mcnamara, John" , "Kovacevic, Marko" , dpdk-dev , Jerin Jacob , Krzysztof Kanas , "techboard@dpdk.org" Thread-Topic: [dpdk-dev] [EXT] Re: [PATCH 1/3] mbuf: add Tx offloads for packet marking Thread-Index: AQHWIe33/V2xjjpXt0OMZlTB1q3216iXpZQAgAANfYCAACfagIABK3IAgA8ShYCAAOTkgIAABD/ggAA7vgCAFIvXAIADHCWAgARtiuCAADw5gIABUJ4g Date: Wed, 3 Jun 2020 10:31:35 +0000 Message-ID: References: <20200504100457.GB6153@outlook.office365.com> <20200504122735.GD6327@platinum> <20200505061920.GA1705@outlook.office365.com> <20200514202931.GF1739@platinum> <20200515100845.GA19989@outlook.office365.com> <20200515135746.GB9696@outlook.office365.com> <20200528154328.GA3029@outlook.office365.com> <20200602142537.GA6274@outlook.office365.com> In-Reply-To: <20200602142537.GA6274@outlook.office365.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.180] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e92e2062-c59a-48ce-100e-08d807a94af0 x-ms-traffictypediagnostic: BYAPR11MB3592: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 04238CD941 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YY6+rfZ9WIBkwaOksEaKCY+pQfsaMNjOdtTjsFWXYdwOjjmY5ikLBv+H8YHgL8ZX2JYgu8twzi/a8cClsn9dgpQc9w9ZFYdkjb5L7sP7ubHgAeVzaYRKoaFhkc/VHtqOrD9ThX4NN+DVgsjXc+I6wFYOKm9Ovc32I5akaR6179MUnF/ne0NF3UdDYufPok7qEODpjDVqvxNO6Rw2fZ1B99bJTPuq4tepDJnZtPcOxFosb/OWjL/jz0vWsvm4XaNEU4Wwu6uORrzHAewWgDxzSmUfmWwKTk+DoLVYjCbKBmsIpnSmowwB9zyo0oLY04y0 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(396003)(376002)(39860400002)(366004)(346002)(136003)(7696005)(33656002)(6916009)(7416002)(2906002)(186003)(478600001)(54906003)(4326008)(5660300002)(52536014)(86362001)(316002)(71200400001)(6506007)(9686003)(8936002)(55016002)(66446008)(66556008)(64756008)(8676002)(66946007)(76116006)(83380400001)(26005)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: t+jixc7sS1rMF96Ta3R8MOGw8YROy/2bMzkQ4l0jdnAOg/ccVV/QBNDPY88uQ+SmOuBtmdGhU2sOCMDNrRBnM3gRFeUoS9ouNvmu7NlgUOsx9YKT/vZTSTc6n8AJgku+f481Fntz+RkxTAeBBGd8IjuQE7JVufQIcrFpJEq3/2eqRE7dvBoTGeL8ymJgvhmnrjXZiwZv9sR78h6So99jb9sN2+P5yMNroPzxZCFQ5n38MC+kAuEjUd0OhJN4UHCUO7TYbQgevsMVLvMh7p1YExtOsWWqzG5/ogTlTtxeo42ueoQGlqzxRxfxrxy6ymY4DU22dr9Eg8Z+AXNIRm0S1SUKaWlUmf59GwT2YvJWm4gqhMeScLo1wbS36DJTxxmFHuhIZEBw2e+WqNIKbTwaaUhf6QMGIRNEpe+ayFWQFUX9LsgH6qpJC7wZYreTzFYsyXLStWvpwILWlI/i/Mca7vkx8n62jDsHvzxhNx20pVLuMnD2vHxBT/JP8aQwQZub Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e92e2062-c59a-48ce-100e-08d807a94af0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2020 10:31:35.8550 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Xr+TxWe0ZKV/jk2oJ8aJ/EBoCttveEc7cY9B4shNfgNVEwd/jS6Frg2M2zGdenMgFDsdRDJjuyLAQErIVaNsZ4WFiM8xIbnCrXs3nxW4PKU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3592 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [EXT] Re: [PATCH 1/3] mbuf: add Tx offloads for packet marking 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" > > > > > > I also share Olivier's concern about consuming 3 bits in ol_fla= gs for that feature. > > > > > > Can it probably be squeezed somehow? > > > > > > Let say we reserve one flag that this information is present or= not, and > > > > > > re-use one of rx-only fields for store additional information (= packet_type, or so). > > > > > > Or might be some other approach. > > > > > > > > > > We are fine with this approach where we define one bit in Tx offl= oads for pkt > > > > > marking and and 3 bits reused from Rx offload flags area. > > > > > > > > > > For example: > > > > > > > > > > @@ -186,10 +186,16 @@ extern "C" { > > > > > > > > > > /* add new RX flags here, don't forget to update PKT_FIRST_FREE = */ > > > > > > > > > > +/* Reused Rx offload bits for Tx offloads */ > > > > > +#define PKT_X_TX_MARK_VLAN_DEI (1ULL << 0) > > > > > +#define PKT_X_TX_MARK_IP_DSCP (1ULL << 1) > > > > > +#define PKT_X_TX_MARK_IP_ECN (1ULL << 2) > > > > > + > > > > > #define PKT_FIRST_FREE (1ULL << 23) > > > > > -#define PKT_LAST_FREE (1ULL << 40) > > > > > +#define PKT_LAST_FREE (1ULL << 39) > > > > > > > > > > /* add new TX flags here, don't forget to update PKT_LAST_FREE = */ > > > > > +#define PKT_TX_MARK_EN (1ULL << 40) > > > > > > > > > > Is this fine ? > > > > > > > > Any thoughts on this approach which uses only 1 bit in Tx flags out= of 18 > > > > and reuse unused Rx flag bits ? > > > > My thought was not about re-defining the flags (I think it is better to= keep them intact), > > but adding a union for one of rx-only fields (packet_type/rss/timestamp= ). >=20 > Ok. Adding a union field at packet_type field is also fine like below. >=20 > @@ -187,9 +187,10 @@ extern "C" { > /* add new RX flags here, don't forget to update PKT_FIRST_FREE */ >=20 > #define PKT_FIRST_FREE (1ULL << 23) > -#define PKT_LAST_FREE (1ULL << 40) > +#define PKT_LAST_FREE (1ULL << 39) >=20 > /* add new TX flags here, don't forget to update PKT_LAST_FREE */ > +#define PKT_TX_MARK_EN (1ULL << 40) >=20 > /** > * Outer UDP checksum offload flag. This flag is used for enabling > @@ -461,6 +462,14 @@ enum { > #endif > }; >=20 > +/* Tx packet marking flags in rte_mbuf::tx_mark. > + * Valid only when PKT_TX_MARK_EN is set in > + * rte_mbuf::ol_flags. > + */ > +#define TX_MARK_VLAN_DEI (1ULL << 0) > +#define TX_MARK_IP_DSCP (1ULL << 1) > +#define TX_MARK_IP_ECN (1ULL << 2) > + > /** > * The generic rte_mbuf, containing a packet mbuf. > */ > @@ -543,6 +552,10 @@ struct rte_mbuf { > }; > uint32_t inner_l4_type:4; /**< Inner L4 type. */ > }; > + struct { > + uint32_t reserved:29; > + uint32_t tx_mark:3; > + }; > }; >=20 >=20 >=20 > Please correct me if this is not what you mean. >=20 Yes, I thought about something like that.