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 4E03AA00B8; Mon, 28 Oct 2019 11:50:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B59A9E4; Mon, 28 Oct 2019 11:50:29 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30041.outbound.protection.outlook.com [40.107.3.41]) by dpdk.org (Postfix) with ESMTP id 3D3A91BEE3 for ; Mon, 28 Oct 2019 11:50:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Szq6DaY/qnVxNz5wSku+0E2Nbj3TxgvPob4903aUll3JMgJcKkGWZYGMAtJfnQkr/8MBHFDk6/Ut1b3e6DxEwTV2vrg+K8ENLbCBbAvVXXJEpkDJ902EH/85cacLP7b/h7q5aVg6HEZHsfiHT6VyO1ZBZxE38TG66aHyHPptcgrAjmIW1uZYJBKZojwdu544St4KNs81g71yexlgODXR3tm9LF+XU1a3MCqdD8HylL5xllKCki9Z715jmNEm1hbC0IJ3+6d6p/23NI6SzhUn6D60icziMgPRj3GKtaLU9yxlQZKdX/02DF5FJMoAIIg3uuBsGY7cw/V4gtear+0fPA== 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=3iU3gkcVlJPr1EYpYzB7t0Ov0GfoxMYfyt7Cs2BZ1XE=; b=lGBQYk9BbAKdafWecclKx67lQvwbmoiLqCT9fqv4sICrTbckL3APdXlYseGvfVN9wMoIR0XvqwoH+tzeIjQ84TouusC0iJZDXJ1zglhxW+vR3zyFQ+4PHFe/RgAbkBHvh3NWbQT0olcBXeZrRV/iDa86BIheqx5kb7XErCXxGzlT+CGad21aAK1wQh9TV1nBcyIzU1XDS9D8BAgywhjGn/zmtyaR9AB3vqyTvIkun5NIWkks7pnUYtLCjvNe2La8H7T/xDFa2zCpL4TRxiKErKWFT1U7KkH2kSxjp1Z3h9Fezda9yYAb1KXIbboaOfVK9vj+4k+VThKs5eFEzPHQKg== 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=3iU3gkcVlJPr1EYpYzB7t0Ov0GfoxMYfyt7Cs2BZ1XE=; b=O1+dm/4RPkF6+YyNmdLrEqbIiGgiDdqkXaXLn6yIgk7GF0AYEzLPMg0hJHNupSwaH5paOXRIwjSJZQcIXmN/DWyLfY/doYW2OJOfdJycXtfwJOhaqojbVVLaF97/OhHBQFC7eBCe9fv8M5d0f9H5bJmDby3jAz14J+aOvNxH/Pw= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3122.eurprd05.prod.outlook.com (10.170.125.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Mon, 28 Oct 2019 10:50:26 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::70a7:a312:cbc6:d178]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::70a7:a312:cbc6:d178%7]) with mapi id 15.20.2387.025; Mon, 28 Oct 2019 10:50:26 +0000 From: Ori Kam To: "pbhagavatula@marvell.com" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "jerinj@marvell.com" , John McNamara , Marko Kovacevic , Thomas Monjalon , Adrien Mazarguil CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an offload Thread-Index: AQHVi0fvuy6mlWgF9kCW4y22U4izC6dv32Pg Date: Mon, 28 Oct 2019 10:50:26 +0000 Message-ID: References: <20191025152142.12887-1-pbhagavatula@marvell.com> In-Reply-To: <20191025152142.12887-1-pbhagavatula@marvell.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=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 38df6c5b-7777-48e5-654e-08d75b94a423 x-ms-traffictypediagnostic: AM4PR05MB3122: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0204F0BDE2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(376002)(396003)(366004)(136003)(199004)(189003)(13464003)(81166006)(102836004)(55016002)(8936002)(3846002)(2906002)(15650500001)(6246003)(74316002)(33656002)(6116002)(7736002)(305945005)(14444005)(256004)(5024004)(5660300002)(110136005)(6436002)(14454004)(2501003)(316002)(229853002)(76176011)(2201001)(9686003)(478600001)(64756008)(66446008)(476003)(26005)(7696005)(86362001)(71200400001)(71190400001)(186003)(66556008)(66476007)(25786009)(66946007)(76116006)(99286004)(486006)(6506007)(52536014)(53546011)(11346002)(4326008)(446003)(81156014)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3122; H:AM4PR05MB3425.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OiCIUMNgUPELNxV4kythHvqpNbsy5O4Rd7islFXPmnv59lOSTkanQa8nM41rAGrVBnxsRRkcr/GyVBXcyIqAnpTkHgP4I/Ru+D8Us6DdeOX60hFdThDj7XTDR6MiX2/1Xk1anR9C/3zU2HMiz9wpkLCXgg6Y9WBJ4nFuliZ/lif4sRdCy51AHq0rIokJz+gNVG2mVm62g6Co9tYux5GitkYUqqyPkLmUjD+FJDXps7GV0HSUERDWdwDX3ZDj5fduyNmhATEDAmcafCpX9q+q1m/rzKGxRgYPlrocfvZDyKf0soVXmZYTNuFiFNPhT0Q0P28NbG/8DtUeCeNU4ai+c4OAPbk5ygAf8SUfaPFDk7WXDxWSOwhq08jdBnaOxEWISiMqIfaUtdOIN4/sHfi4yUlDX3bRpt7HJDdVzOoTUxe9F/YtV+jhUi68P8Ao29pP x-ms-exchange-transport-forked: True 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: 38df6c5b-7777-48e5-654e-08d75b94a423 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2019 10:50:26.0676 (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: Yp4J7eXSamYQlJvg1/2LdA5yJMrknA65O2wkE3n7ByNPaNJrF8xUViAu8QIxnvnEXZmdoLv8XWXyv/yElGzxGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3122 Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an offload 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 Pavan, Sorry for jumping in late. I don't understand why we need this feature. If the user didn't set any flo= w with MARK then the user doesn't need to check it. Also it breaks compatibility.=20 If my understanding is correct the MARK field is going to be moved to dynam= ic field, and this=20 will be way to control the use of MARK. Other option is inside the PMD if one flow uses mark only than copy the mar= k to mbuf. Please also not that we have deprecation notice on the FDIR. Thanks, Ori > -----Original Message----- > From: dev On Behalf Of pbhagavatula@marvell.com > Sent: Friday, October 25, 2019 6:22 PM > To: ferruh.yigit@intel.com; arybchenko@solarflare.com; jerinj@marvell.com= ; > John McNamara ; Marko Kovacevic > ; Thomas Monjalon ; > Adrien Mazarguil > Cc: dev@dpdk.org; Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH 1/2] ethdev: add flow action type update as an > offload >=20 > From: Pavan Nikhilesh >=20 > Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to > enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and > `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and > `RTE_FLOW_ACTION_FLAG` are enabled. >=20 > PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation > by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`. >=20 > Signed-off-by: Pavan Nikhilesh > Reviewed-by: Andrew Rybchenko > --- > doc/guides/nics/features.rst | 12 ++++++++++++ > doc/guides/rel_notes/release_19_11.rst | 9 +++++++++ > lib/librte_ethdev/rte_ethdev.c | 1 + > lib/librte_ethdev/rte_ethdev.h | 1 + > lib/librte_ethdev/rte_flow.h | 6 ++++-- > 5 files changed, 27 insertions(+), 2 deletions(-) >=20 > diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst > index d96696801..0d8d08c18 100644 > --- a/doc/guides/nics/features.rst > +++ b/doc/guides/nics/features.rst > @@ -588,6 +588,18 @@ Supports packet type parsing and returns a list of > supported types. > * **[related] API**: ``rte_eth_dev_get_supported_ptypes()``. >=20 >=20 > +.. _nic_features_flow_flag_mark: > + > +Flow flag/mark update > +--------------------- > + > +Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fd= ir.hi``. > + > +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: > ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``. > +* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, > ``mbuf.ol_flags:PKT_RX_FDIR_ID;``, > + ``mbuf.hash.fdir.hi`` > + > + > .. _nic_features_timesync: >=20 > Timesync > diff --git a/doc/guides/rel_notes/release_19_11.rst > b/doc/guides/rel_notes/release_19_11.rst > index faf69b0d9..8593fea0e 100644 > --- a/doc/guides/rel_notes/release_19_11.rst > +++ b/doc/guides/rel_notes/release_19_11.rst > @@ -185,6 +185,15 @@ New Features > * Added a console command to testpmd app, ``show port (port_id) ptypes= `` > which > gives ability to print port supported ptypes in different protocol l= ayers. >=20 > +* **Added Rx offload flag to enable or disable flow action type update** > + > + * Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be > used to > + enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and > + `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and > + `RTE_FLOW_ACTION_FLAG` are enabled. > + * PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applic= ation > + by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`. > + >=20 > Removed Items > ------------- > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index 7743205d3..f70065043 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -129,6 +129,7 @@ static const struct { > RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC), > RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM), > RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM), > + RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK), > }; >=20 > #undef RTE_RX_OFFLOAD_BIT2STR > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethde= v.h > index c36c1b631..c4e626da7 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -1048,6 +1048,7 @@ struct rte_eth_conf { > #define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000 > #define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000 > #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000 > +#define DEV_RX_OFFLOAD_FLOW_MARK 0x00100000 >=20 > #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ > DEV_RX_OFFLOAD_UDP_CKSUM | \ > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > index 4fee10559..6698640fb 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -1538,7 +1538,8 @@ enum rte_flow_action_type { >=20 > /** > * Attaches an integer value to packets and sets PKT_RX_FDIR and > - * PKT_RX_FDIR_ID mbuf flags. > + * PKT_RX_FDIR_ID mbuf flags when > + * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled. > * > * See struct rte_flow_action_mark. > */ > @@ -1546,7 +1547,8 @@ enum rte_flow_action_type { >=20 > /** > * Flags packets. Similar to MARK without a specific value; only > - * sets the PKT_RX_FDIR mbuf flag. > + * sets the PKT_RX_FDIR mbuf flag when > + * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled. > * > * No associated configuration structure. > */ > -- > 2.17.1