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 57A31A04FD; Tue, 2 Jun 2020 16:26:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A7A11BF76; Tue, 2 Jun 2020 16:26:01 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 879E01BF73; Tue, 2 Jun 2020 16:25:59 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 052EGAcc014347; Tue, 2 Jun 2020 07:25:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=BAxhE8VciW/i3NTRwD1nUxyIWSb4Cy3R4B5jiKg+VEs=; b=kkp1TAsAwE284GwQKm3U7WNRP3YbnM2MaueM14KkAqmSGEjmH+/GzRXbotsPBdmZsX7Q U5VakRIEMGz5Tg8jI6wkxbNfFEYozceBvQgensnEe5P+eWO4zh79YMC5qjl74WxcBkW3 +g2+7OTGc5yGFnUwGkTaQkCjIHAVtWJO+JC2qJTTXoQC8CKPras+l1ucoENlMKAMdIZS RAFKwDPSxymbpSI8jt+h/rfhMb5lm2TV3FWoTeTCq5UjBVK1N7Hrrepcj04ebzBlLQIS SNgsgvyiYKCjE1+Ik/YUcygBPAd7YC4Z/eZUPRD9vupkFTg8OcsP3jo97Pxdk+t0Wdi9 jA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 31bq0mtsrg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 02 Jun 2020 07:25:58 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Jun 2020 07:25:56 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 2 Jun 2020 07:25:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrtfbVWUoyBQO3pBwjzRx6vT/kjSINXxf2MFUhkqN+bugaDNeic1WYaL5zkjTO2c0Zz413e4HljMPGeDY9ZFlY6WCvy6Y+SIOKP5RMKjPGWA7ZiRyOETlpQxBeZmB/GeEjsMOUsrHFS5p+6Gf/h5X1ko4EWiAKH3pQFFKfzg3SU7qc8vZ2QtfNRvBkyidQrYP37aWDYahy0Qo1E3Yenb1jzO/QgRzBym6A/8G04EAPd/TB26h+y9wor0me+5SIqjNV4bDKde70L3TG+E7GI4Yz8PLwF7zwU59KFy57jD0a16CoUSFiWdNbh9gNUavQTIkhAb/IoH5guDggt0FG3SOg== 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=BAxhE8VciW/i3NTRwD1nUxyIWSb4Cy3R4B5jiKg+VEs=; b=IaxTpKOsATiGx5nD6FGkDpVXmdImrVJ7+dDw6hoffFbAdYN/wzl3ufewOLfQ2MwLW21o2qmLrO1tmdoQWP16kat9++9OBPsLU11RjgXoqYG1dxnILCE3jTDb9Lhum7vaQxDdpEE11YoJWouzBl0Zqqb7stxnxpMjHCpcFqWMLUI00BSK70nkXsmZFlGlAwXYnwjdJdnmKyRlGG8czleRy7ZlrJtkACAIHWXfvO7fX18lEEB+6GDW5rUrBRFEJiehUlk4/VW7PNXGRK8RSSPs5wd8dqW+r05gF55Tt+Fm9xL3ZP2B18AgqwLLs6wIiLcamGVTv7WmZFtzgZsgJ+sbsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BAxhE8VciW/i3NTRwD1nUxyIWSb4Cy3R4B5jiKg+VEs=; b=EUxqequlKqq1KJUOBEvSjwa7PLBNF+pP7JHRtIT/xl31FRh+10EPhde21xqeKVR7fTg2NTEeU4jJQy/UgpqoNwFU6JUc8Qf5ysj1RA0Pp3YCmaMYo0ftqs/MlrCO2ii0l2/TWm+1lUqM0VQ4GSDA9VfZr3x19dm274JdMrX3fwg= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; Received: from BYAPR18MB2917.namprd18.prod.outlook.com (2603:10b6:a03:105::19) by BYAPR18MB3048.namprd18.prod.outlook.com (2603:10b6:a03:102::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18; Tue, 2 Jun 2020 14:25:55 +0000 Received: from BYAPR18MB2917.namprd18.prod.outlook.com ([fe80::a1ec:e959:77df:cd58]) by BYAPR18MB2917.namprd18.prod.outlook.com ([fe80::a1ec:e959:77df:cd58%5]) with mapi id 15.20.3045.024; Tue, 2 Jun 2020 14:25:54 +0000 Date: Tue, 2 Jun 2020 19:55:37 +0530 From: Nithin Dabilpuram To: "Ananyev, Konstantin" 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" Message-ID: <20200602142537.GA6274@outlook.office365.com> 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> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: PN1PR0101CA0002.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::12) To BYAPR18MB2917.namprd18.prod.outlook.com (2603:10b6:a03:105::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by PN1PR0101CA0002.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19 via Frontend Transport; Tue, 2 Jun 2020 14:25:49 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d1b74da-7cdc-4b1e-38db-08d80700dbfc X-MS-TrafficTypeDiagnostic: BYAPR18MB3048: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1443; X-Forefront-PRVS: 0422860ED4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s6dPm0PQ5Em/WKe1dJ/qgmQiBmG6QDQbbuWnAZpaqp6TXIkZIzAmk4yY98ppY17tnhnLzcbeBqCdFDX5soXDFbCru1OROVu3lJMhWxteHdkvDjMaY66zcyaYo8f1pMa7Jb2Bz9AgrYnHPfn0/P1DscvMSbuZCv1Htbyu5wCzZmiDZaxTHSBsNHIDRwVBBOSZixUVLicel/lNgiu8Uj8LIiKvY13aJV4w/8gJZZmQG7Kd1OXhoItXiBXe6w0d2ZZRPaxHDvzzaB3zgl1pM9qxBa/0Bmk/HgfsYDT24z6YtvOJm5j7FcSzv0EQGiiJ31l6ifCeLZuAbwnz7d4hosU2M03ZnsI3EZT/TcY8FLgU4BS93CbAmsMH+mT9w04dy0cRFU0NHHgI+FgoYyiI1I8TDw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2917.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(33656002)(8936002)(186003)(6666004)(83380400001)(956004)(54906003)(1076003)(16526019)(9686003)(26005)(66556008)(66476007)(5660300002)(498600001)(66946007)(7696005)(86362001)(52116002)(7416002)(55016002)(2906002)(8676002)(6916009)(6506007)(4326008)(55236004)(966005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: hhcyEky8CLqq5v25IOcmYQYpaSQh7w3aDR0fKDoFSQCKDIC9dYeKuC/1hB5d582u3dGvNxTcG8DmBT+uWtt1DO4TfxvXM7Lhxll6XkjJhrDcbNBG0mxk8BbmVR7q4xVA+mzoBPlLf4PF72osJCRCYjwyWoQlKlUXVZZNVPgqdSx/O1ydoiReS+4SrwP1CI3GeI6gUCuPXAMsJ7nElTRRiIK4OveMBv6kx5KQ0Zdop+JTL3AirC4sgNm3WPaAvYRJdZoBnLdFtqOdOzqQ+h3/d7vsn4CNdOHNv2PDXaR6dOOUPfXSLkBJSjVGJuZ9AOkrB/1pfBIbo/Ax0AtdZaU/Ngdr48zIEUWDTNax4sYEJcjQo2teu4Zxs+4psq36ne1Mp3TRmsglORoSgIDPDMswvh6S8S8yAvI8I89lCcAKlUKR5cQBx59GWmSL8uhkB6Zu3wJCuz2I/9lglbgas8kKHGOEMA32dbR9Moiyz+zk0jg= X-MS-Exchange-CrossTenant-Network-Message-Id: 9d1b74da-7cdc-4b1e-38db-08d80700dbfc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2020 14:25:54.7658 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Kaszkp2oLh58No/Bk97GNjwK70ylATLC4nipX6xAqzGdwKqbOC7tvsdGoWGyjuuV8YaLSxtG12a8Ajf+ygSHKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB3048 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-02_13:2020-06-02, 2020-06-02 signatures=0 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" On Tue, Jun 02, 2020 at 10:53:08AM +0000, Ananyev, Konstantin wrote: > Hi Jerin, > > > > > > I also share Olivier's concern about consuming 3 bits in ol_flags 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 offloads 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). Ok. Adding a union field at packet_type field is also fine like below. @@ -187,9 +187,10 @@ extern "C" { /* add new RX flags here, don't forget to update PKT_FIRST_FREE */ #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) /** * Outer UDP checksum offload flag. This flag is used for enabling @@ -461,6 +462,14 @@ enum { #endif }; +/* 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; + }; }; Please correct me if this is not what you mean. > > > > > + Techboard > > > > There is a related thread going on > > https://urldefense.proofpoint.com/v2/url?u=http-3A__mails.dpdk.org_archives_dev_2020-2DMay_168810.html&d=DwIGaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=nyV4Rud03HW6DbWMpyvOCulQNkagmfo0wKtrwQ7zmmg&s=VuktoUb_xoLsHKdB9mV87x67cP9tXk3DqVXptt9nF_s&e= > > > > If there is no consensus on email, then I would like to add this item > > to the next TB meeting. > > Ok, I'll add that to tomorrow meeting agenda. > Konstantin >