From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60046.outbound.protection.outlook.com [40.107.6.46]) by dpdk.org (Postfix) with ESMTP id 827A31B19A for ; Fri, 5 Oct 2018 20:20:15 +0200 (CEST) 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=m1KSoISXVWtxdoYLUqReggUrgHD0/lup/kPU7L3E+I8=; b=DScw4NH2BPk0prdRVEhKSLeUsekkYlksAHEVOMfqGoiWScVtza5XfIQofE/pnrqiGPbQSroXUwSH131TGIg9A68WWQQO5ShpHmoMkgRL7NsXf7jtwAdO93AhU/d9YouQcfiOa8xrN4i1pJCX0dUTxcT7dwBIapogVH2JKQeLmgY= Received: from AM0PR0502MB3971.eurprd05.prod.outlook.com (52.133.40.151) by AM0PR0502MB3985.eurprd05.prod.outlook.com (52.133.40.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.23; Fri, 5 Oct 2018 18:20:13 +0000 Received: from AM0PR0502MB3971.eurprd05.prod.outlook.com ([fe80::f599:3e55:5958:e29f]) by AM0PR0502MB3971.eurprd05.prod.outlook.com ([fe80::f599:3e55:5958:e29f%2]) with mapi id 15.20.1185.027; Fri, 5 Oct 2018 18:20:13 +0000 From: Yongseok Koh To: Andrew Rybchenko CC: Ferruh Yigit , Dekel Peled , Wenzhuo Lu , "Wu, Jingjing" , "bernard.iremonger@intel.com" , dev , Olivier Matz , Adrien Mazarguil , Thomas Monjalon , Shahaf Shuler , Ori Kam Thread-Topic: [dpdk-dev] [PATCH v3 1/3] ethdev: support metadata as flow rule criteria Thread-Index: AQHUVmphkNoRtiV0m06Iz4gJ8+sWqKUQsqUAgAACVYCAAE5NAA== Date: Fri, 5 Oct 2018 18:20:13 +0000 Message-ID: References: <1537108670-11380-1-git-send-email-dekelp@mellanox.com> <1538056677-33846-2-git-send-email-dekelp@mellanox.com> <0d34ba46-336c-6853-55d3-19b8f46d2db9@intel.com> <3f173f88-3206-911c-4330-57a84201a71b@solarflare.com> In-Reply-To: <3f173f88-3206-911c-4330-57a84201a71b@solarflare.com> 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=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR0502MB3985; 6:sPoW3x4XhPPbjSMjFUxXZTHeUDUwZoZyk5hzCGCcgXiyGCSNXZ6hN4XA4dZcjOKL22VVym41zYHce5+0awiISiJYb+1UTH2ORnxH7FuOYEgBQBHNFJ+sTrd9E6GXb7IoNEzdR/hdF+ktspg40iqbkTj6ctDnw86UY2U+gLhpAcpmsJoHVsy3Uyz+h8S4hzTD1SMP9+gVB/A1993Ad0S/GvuNbzMAQoa5P5iCXhgml+qscY5pFSyNejXVW5/+owUJs9llmjlUuE1aSGdQShrXK0gz8sgpu7QATAB+GuKCnxDkNtwmo526uS2kmH2oLUeQ5kTTYhnh9NxON67VQMWKonKVPoiwG+ewkMvAqVAFuSbmc6eXSGuIEbWMomHik30q3tsHeXIY3uNnHZZACWq6XAK8Yg1QYsG0EpIth+aV665ZIrc8M8YYIWdYs24L7ySnBi7yzfyTdnbbF/PUggLSvQ==; 5:EOe6pjTdMUYtcjSzqViWlOE81T9I5fvb1SL91D8rnIL9EDO9hcTuMAFNHSm34tkPtfM+0t201uefW5p7iAKzNpf4VCVhW0WX3SLEKTTLCG8Rf5mQ6wwc/sHn1kvnY9YTT/S0I4sChbyV8jUwb1Bende6t9bhteGKE1Cj1Ob/TJc=; 7:slbYvKOcbJ7lPk/hGYRZZTvo/EpIH/JghJUemkhpM3qlQ+dAOajKnD+0yF9n+xKhryQF0b2SML9xNqQbJ3fDssrGo+eJGUCFVEW4tH9FHKl8DMgIaAogDhpuceSB1v0/ktq4YDaoqRUm+YE+MhL+s2Dbp3SGm7W8Y0QQT1IsaFiY7QUdla1rkmBxmZo8toLPKvapkOjx6o7B1W4NionqbZGipYwzGcUeJQdxX02TFgEAZFCciV8X+1JHoSORe/TE x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 3712d0ad-f7fa-4e9b-5a90-08d62aef31b7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3985; x-ms-traffictypediagnostic: AM0PR0502MB3985: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(45079756050767)(189930954265078); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231355)(944501410)(4982022)(52105095)(10201501046)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051); SRVR:AM0PR0502MB3985; BCL:0; PCL:0; RULEID:; SRVR:AM0PR0502MB3985; x-forefront-prvs: 0816F1D86E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(396003)(136003)(39860400002)(69234005)(189003)(199004)(45080400002)(476003)(2616005)(6116002)(966005)(106356001)(7736002)(3846002)(486006)(5250100002)(305945005)(14454004)(76176011)(53936002)(53546011)(6506007)(68736007)(81156014)(6246003)(86362001)(575784001)(4326008)(36756003)(81166006)(107886003)(229853002)(5660300001)(26005)(82746002)(33656002)(6486002)(99286004)(93886005)(83716004)(6916009)(25786009)(71200400001)(71190400001)(8936002)(6306002)(186003)(66066001)(2906002)(54906003)(2900100001)(14444005)(6512007)(11346002)(105586002)(97736004)(478600001)(256004)(316002)(102836004)(6436002)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3985; H:AM0PR0502MB3971.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-microsoft-antispam-message-info: viEk6l+tABev6UJV8tpowVhnapQ6jpakpEnIlk9m0GDhw8yzy5G92xDxsDyEOQmoHZeZJ0t+MTp32cB3wH7q5RrCeCYgPn3NLBJ6OGvaWIuvA7tJfBaJcNBA2E91rdFiuk821ZG5lI3ydPihg22tRjbrbc4tsWQaNoALwcsQfM1DxYiCr/fa6HHKGYwJnkV75kkin2KraMvmzKBkdO+nOe9Ds0wmarwx1Qkz3i5BaAqRqhjsC0agHgEnZepMX+IfzBcSFMIVf0q6fPBBnvFmqCOqxHIqgzUyPrRBaIPzIp32M+3IzNxEYE37eDOKSKGAgYIiVbpgSVM6DEWfhvMQZV3FKq4Uu7SXCVXqlkMfK/s= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <8B7B504310175E4C9FED0F90FC45202F@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3712d0ad-f7fa-4e9b-5a90-08d62aef31b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2018 18:20:13.8060 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3985 Subject: Re: [dpdk-dev] [PATCH v3 1/3] ethdev: support metadata as flow rule criteria 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: , X-List-Received-Date: Fri, 05 Oct 2018 18:20:15 -0000 > On Oct 5, 2018, at 6:39 AM, Andrew Rybchenko = wrote: >=20 > On 10/5/18 4:31 PM, Ferruh Yigit wrote: >> On 9/27/2018 2:57 PM, Dekel Peled wrote: >>> As described in [1], a new rte_flow item is added to support metadata >>> to use as flow rule match pattern. >>> The metadata is an opaque item, fully controlled by the application. >>>=20 >>> The use of metadata is relevant for egress rules only. >>> It can be set in the flow rule using the RTE_FLOW_ITEM_META. >>>=20 >>> In order to avoid change in mbuf API, exisitng field buf.hash.fdir.hi >>> is used to carry the metadata item. This field is used only in >>> ingress packets, so using it for egress metadata will not cause >>> conflicts. >>>=20 >>> Application should set the packet metadata in the mbuf dedicated field, >>> and set the PKT_TX_METADATA flag in the mbuf->ol_flags. >>> The NIC will use the packet metadata as match criteria for relevant >>> flow rules. >>>=20 >>> This patch introduces metadata item type for rte_flow RTE_FLOW_ITEM_MET= A, >>> along with corresponding struct rte_flow_item_meta and ol_flag >>> PKT_TX_METADATA. >>>=20 >>> [1] "[RFC,v2] ethdev: support metadata as flow rule criteria" >>> https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2= Fmails.dpdk.org%2Farchives%2Fdev%2F2018-August%2F110194.html&data=3D02%= 7C01%7Cyskoh%40mellanox.com%7Cefd5b454b5ac4c84947108d62ac82a8c%7Ca652971c7d= 2e4d9ba6a4d149256f461b%7C0%7C0%7C636743436575292609&sdata=3D2WbhDkF89hU= V16zER4sfhvD5qDjw6geFQqE0kJQgdyM%3D&reserved=3D0 >>>=20 >>> Signed-off-by: Dekel Peled >> <...> >>=20 >>> @@ -526,6 +532,12 @@ struct rte_mbuf { >>> uint32_t hi; >>> /**< First 4 flexible bytes or FD ID, dependent on >>> PKT_RX_FDIR_* flag in ol_flags. */ >>> + /** >>> + * Above member has optional use on egress: >>> + * Application specific metadata value >>> + * for flow rule match. >>> + * Valid if PKT_TX_METADATA is set. >>> + */ >>> } fdir; /**< Filter identifier if FDIR enabled */ >> Any objection/comment to use hash.fdir.hi for this new "metadata" meanin= g? Olivier? >=20 > As for me, I'd prefer to see dedicated union member something like > it was suggested in [1]. >=20 > Andrew. >=20 > [1] https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fm= ails.dpdk.org%2Farchives%2Fdev%2F2018-September%2F111954.html&data=3D02= %7C01%7Cyskoh%40mellanox.com%7Cefd5b454b5ac4c84947108d62ac82a8c%7Ca652971c7= d2e4d9ba6a4d149256f461b%7C0%7C0%7C636743436575292609&sdata=3DQbrBkMWIWV= MlKb8839FG3U72VfLhRo%2BjGSHkTXT8ocQ%3D&reserved=3D0 FYI, I also mentioned that when I reviewed mlx5 part of this patchset and D= ekel acked. He'll make the change and submit a new version once he's back to the office= . Thanks, Yongseok