From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50061.outbound.protection.outlook.com [40.107.5.61]) by dpdk.org (Postfix) with ESMTP id 90A424C92 for ; Sun, 21 Oct 2018 15:49:32 +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=3IuF73QK7D67pew8phtjcNZXMB76kyYLDrmCuy0RmpQ=; b=PyNKXIH6Do+cLl4PbhVfeII6zOdlT8pMYQDoK94QqjnjvfxNSGfppKvmM0i7zozEqKrJw553UGJ6/Fp0LHMvMmZ0zYGTNDV9MZCmXFzgRFhTWUn86CvzhXtPFQHJFzRBroEypKLzroOv+G+AwT7a3XYIiB6QIO23b5Dq7aNNSg4= Received: from VI1PR05MB4224.eurprd05.prod.outlook.com (52.133.12.13) by VI1PR05MB1455.eurprd05.prod.outlook.com (10.164.85.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.24; Sun, 21 Oct 2018 13:49:30 +0000 Received: from VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::345d:803:9e2:679c]) by VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::345d:803:9e2:679c%3]) with mapi id 15.20.1250.028; Sun, 21 Oct 2018 13:49:30 +0000 From: Dekel Peled To: Ori Kam , "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , "olivier.matz@6wind.com" , Adrien Mazarguil , Thomas Monjalon , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" CC: Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5 2/3] app/testpmd: support metadata as flow rule item Thread-Index: AQHUZhGaiybP5jSk7kWbNDPqiHhwBKUk72+AgAAF8mA= Date: Sun, 21 Oct 2018 13:49:30 +0000 Message-ID: References: <1539254998-8555-1-git-send-email-dekelp@mellanox.com> <1539777829-64412-3-git-send-email-dekelp@mellanox.com> In-Reply-To: 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=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1455; 6:s/INgWO9Jkd1hiL8qnfWBbjm/aDy7sJskAu65P6x17UFqJl0wv3ahkMcWKAM25cvINeSwh+2iOnjIuXakuzmTvlVHk61mTfbc1qeDMv37NKtFzRoz8L37zpDnACgf+Z89s+bO0uAyg2qlD3jiNUZmzr4CDZWHtQiuAHI9Am/eL0wsazamrJ9sVYNRPXI+Ialrtlb6FhsszRNFY6biOnZm690EjiSJhNVqoczMaju9oXIyRl2bpsYoqGZsHqiPHWpHd4zkX5JILXz5P0RKutxr6cBIhKT+kolUDV+sCRsDVX7BCalQEC9+TIZbozGyKSzwI5PzudjmJPATgYsaatpNuK8wuse5r2ENq7e6J+Pdf8vCmUnxTF4X1uA8LezLlzGxSEdDcC0sc1w304DXZIfGArBe8Pmj/6kuqlQMcic+qAUkRY41G213FlSiscyETAlAujPtfmsQ7HMrvYH9e5etw==; 5:acmziXR6Zk9loklhbZ7fssCNo+a3UeRiozg73SSTY4SNbpQo1LoFse0JvsXBASPuDiXanBS4Sk0MB/NxWQQNb5aFPzSEpoTC2cLMjcV8kjwxJ7slrNzj5QUfgKabSuoKdHYOtWhK50HNh+9m8SC0kJmmwPH8shI0Ep3MbjqFMJE=; 7:oqyC/Kimcm/7JJu2d3dBB+0A6WliJ4sqDBR/JOB+HdU3wKRxdwtsyBbBTAgyxCo9Subvk9UwF3n6/ii6SwoWFyLtyi/fNsbF1+3X0xfeco0+4KE34yh5FEnV0nqtHPvBpMAb3ja43xUaZMxCgUCXV0Aqu7HIjb5B0vrLWknQE1B/TUHfkXmXHgx0GtEI4BukNsC2L41upSVR2NY819iB2QF6lB//ffqbxfoD5fRi8Wok8yIXSMMh4+6TbQk4wI5s x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b1aa683e-2f3b-4534-90c0-08d6375c0661 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB1455; x-ms-traffictypediagnostic: VI1PR05MB1455: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231355)(944501410)(52105095)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:VI1PR05MB1455; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1455; x-forefront-prvs: 083289FD26 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(346002)(136003)(396003)(39860400002)(199004)(13464003)(189003)(229853002)(99286004)(7736002)(76176011)(8936002)(66066001)(97736004)(26005)(86362001)(6246003)(81156014)(186003)(53546011)(6506007)(102836004)(14454004)(81166006)(7696005)(446003)(110136005)(54906003)(476003)(11346002)(316002)(2201001)(478600001)(6116002)(3846002)(14444005)(68736007)(256004)(2900100001)(71200400001)(71190400001)(9686003)(55016002)(53936002)(2906002)(486006)(5250100002)(6436002)(5660300001)(305945005)(74316002)(4326008)(2501003)(33656002)(25786009)(106356001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1455; H:VI1PR05MB4224.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zB69vovkdrR/k8G09hwDW0cFObGE0NZnSevVAa6IZd/hOXKWn7LBRuXgyLD5V5dzF2HIoqc56mGC9wW93NTZo3e7STzcYJehv+SHs1rAyiZeUFV6v2l9OrxdYzNb76awv/kuQUVYom2JGj1PHoHKLrv6kv9PA2ANXaOaCrhfQw7XGs6+/em2kKhor7h2nbI1xPknZTty+yYOnXqR7KfZdn6Ax/fsPq8mm4j5tpKLt04UaSSYHE0Hb6GwIy+RTf9uvrrONc5db/X0MS0Aq25e24uRV7lOUdGJvnBa2Pwf/mbSKZJh+3UbM82PXgrs3Tw6AGJYuw3pqVk+wkYc+JTsnb2akPh7IUI4H3/V8uo5gc4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: b1aa683e-2f3b-4534-90c0-08d6375c0661 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2018 13:49:30.2455 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1455 Subject: Re: [dpdk-dev] [PATCH v5 2/3] app/testpmd: support metadata as flow rule item 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: Sun, 21 Oct 2018 13:49:32 -0000 Thanks, PSB. > -----Original Message----- > From: Ori Kam > Sent: Thursday, October 18, 2018 3:26 PM > To: Dekel Peled ; wenzhuo.lu@intel.com; > jingjing.wu@intel.com; bernard.iremonger@intel.com; > olivier.matz@6wind.com; Adrien Mazarguil ; > Thomas Monjalon ; ferruh.yigit@intel.com; > arybchenko@solarflare.com > Cc: Shahaf Shuler ; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v5 2/3] app/testpmd: support metadata as > flow rule item >=20 >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Dekel Peled > > Sent: Wednesday, October 17, 2018 3:04 PM > > To: wenzhuo.lu@intel.com; jingjing.wu@intel.com; > > bernard.iremonger@intel.com; olivier.matz@6wind.com; Adrien Mazarguil > > ; Thomas Monjalon > ; > > ferruh.yigit@intel.com; arybchenko@solarflare.com > > Cc: Shahaf Shuler ; dev@dpdk.org; Ori Kam > > > > Subject: [dpdk-dev] [PATCH v5 2/3] app/testpmd: support metadata as > > flow rule item > > > > As described in [1], this series adds option to set metadata value as > > match pattern when creating a new flow rule. > > > > This patch introduces additional options in testpmd commands. > > New item type "meta" "data", new offload flag "match_metadata". > > > > [1] "ethdev: support metadata as flow rule criteria" > > > > Signed-off-by: Dekel Peled > > --- > > app/test-pmd/cmdline.c | 10 +++++----- > > app/test-pmd/cmdline_flow.c | 25 +++++++++++++++++++++= ++++ > > app/test-pmd/testpmd.c | 4 ++++ > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 +++++- > > 4 files changed, 39 insertions(+), 6 deletions(-) > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > > 6e14345..28bbd80 100644 > > --- a/app/test-pmd/cmdline.c > > +++ b/app/test-pmd/cmdline.c > > @@ -18124,7 +18124,8 @@ struct > cmd_config_per_port_tx_offload_result { > > > "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#" > > "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#" > > "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#" > > - > "mt_lockfree#multi_segs#mbuf_fast_free#security"); > > + > "mt_lockfree#multi_segs#mbuf_fast_free#security#" > > + "match_metadata"); > > cmdline_parse_token_string_t > > cmd_config_per_port_tx_offload_result_on_off > > =3D > > TOKEN_STRING_INITIALIZER > > (struct cmd_config_per_port_tx_offload_result, > > @@ -18205,8 +18206,8 @@ struct > cmd_config_per_port_tx_offload_result { > > "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|" > > "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|" > > "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|" > > - "mt_lockfree|multi_segs|mbuf_fast_free|security " > > - "on|off", > > + "mt_lockfree|multi_segs|mbuf_fast_free|security|" > > + "match_metadata on|off", > > .tokens =3D { > > (void *)&cmd_config_per_port_tx_offload_result_port, > > (void *)&cmd_config_per_port_tx_offload_result_config, > > @@ -18309,8 +18310,7 @@ struct > cmd_config_per_queue_tx_offload_result { > > "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|" > > "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|" > > "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|" > > - "mt_lockfree|multi_segs|mbuf_fast_free|security " > > - "on|off", > > + "mt_lockfree|multi_segs|mbuf_fast_free|security > on|off", >=20 > Is this relevant for your patch? Removed. >=20 > > .tokens =3D { > > (void *)&cmd_config_per_queue_tx_offload_result_port, > > (void *)&cmd_config_per_queue_tx_offload_result_port_id, > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > > index 1c72ad9..7ee9b7c 100644 > > --- a/app/test-pmd/cmdline_flow.c > > +++ b/app/test-pmd/cmdline_flow.c > > @@ -178,6 +178,8 @@ enum index { > > ITEM_ICMP6_ND_OPT_SLA_ETH_SLA, > > ITEM_ICMP6_ND_OPT_TLA_ETH, > > ITEM_ICMP6_ND_OPT_TLA_ETH_TLA, > > + ITEM_META, > > + ITEM_META_DATA, > > > > /* Validate/create actions. */ > > ACTIONS, > > @@ -599,6 +601,7 @@ struct parse_action_priv { > > ITEM_ICMP6_ND_OPT, > > ITEM_ICMP6_ND_OPT_SLA_ETH, > > ITEM_ICMP6_ND_OPT_TLA_ETH, > > + ITEM_META, > > ZERO, > > }; > > > > @@ -819,6 +822,12 @@ struct parse_action_priv { > > ZERO, > > }; > > > > +static const enum index item_meta[] =3D { > > + ITEM_META_DATA, > > + ITEM_NEXT, > > + ZERO, > > +}; > > + > > static const enum index next_action[] =3D { > > ACTION_END, > > ACTION_VOID, > > @@ -2087,6 +2096,22 @@ static int comp_vc_action_rss_queue(struct > > context *, const struct token *, > > .args =3D ARGS(ARGS_ENTRY_HTON > > (struct rte_flow_item_icmp6_nd_opt_tla_eth, > tla)), > > }, > > + [ITEM_META] =3D { > > + .name =3D "meta", > > + .help =3D "match metadata header", > > + .priv =3D PRIV_ITEM(META, sizeof(struct > rte_flow_item_meta)), > > + .next =3D NEXT(item_meta), > > + .call =3D parse_vc, > > + }, > > + [ITEM_META_DATA] =3D { > > + .name =3D "data", > > + .help =3D "metadata value", > > + .next =3D NEXT(item_meta, NEXT_ENTRY(UNSIGNED), > > item_param), >=20 > Do you support all the options? (mask, last ...) Changed to provide 'is' option only. >=20 > > + .args =3D ARGS(ARGS_ENTRY_MASK_HTON(struct >=20 > This means that the value is in network byte order. Yes, will note in variables type. >=20 > > rte_flow_item_meta, > > + data, > > + "\xff\xff\xff\xff" > > + "\xff\xff\xff\xff")), > > + }, > > > > /* Validate/create actions. */ > > [ACTIONS] =3D { > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > > d550bda..75e960a 100644 > > --- a/app/test-pmd/testpmd.c > > +++ b/app/test-pmd/testpmd.c > > @@ -1060,6 +1060,10 @@ struct extmem_param { > > DEV_TX_OFFLOAD_MBUF_FAST_FREE)) > > port->dev_conf.txmode.offloads &=3D > > ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; > > + if (!(port->dev_info.tx_offload_capa & > > + DEV_TX_OFFLOAD_MATCH_METADATA)) > > + port->dev_conf.txmode.offloads &=3D > > + ~DEV_TX_OFFLOAD_MATCH_METADATA; > > if (numa_support) { > > if (port_numa[pid] !=3D NUMA_NO_CONFIG) > > port_per_socket[port_numa[pid]]++; > > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > index 8d60bf0..c97f26b 100644 > > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > @@ -3671,11 +3671,15 @@ This section lists supported pattern items and > > their attributes, if any. > > > > - ``sla {MAC-48}``: source Ethernet LLA. > > > > -- ``icmp6_nd_opt_sla_eth``: match ICMPv6 neighbor discovery target > > Ethernet > > +- ``icmp6_nd_opt_tla_eth``: match ICMPv6 neighbor discovery target > > +Ethernet > > link-layer address option. >=20 > Is this relevant to your patch? Removed. >=20 > > > > - ``tla {MAC-48}``: target Ethernet LLA. > > > > +- ``meta``: match application specific metadata. > > + > > + - ``data``: metadata value. >=20 > Should show what value to add. > Also missing the documentations for enabling the offload. Added. >=20 > > + > > Actions list > > ^^^^^^^^^^^^ > > > > -- > > 1.8.3.1 > Thanks, > Ori