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 3355DA00C1; Mon, 28 Oct 2019 12:54:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 966B41BEDD; Mon, 28 Oct 2019 12:54:02 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 791C41BED4 for ; Mon, 28 Oct 2019 12:54:01 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us5.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 656CB40062; Mon, 28 Oct 2019 11:53:59 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 28 Oct 2019 11:53:52 +0000 To: Ori Kam , "pbhagavatula@marvell.com" , "ferruh.yigit@intel.com" , "jerinj@marvell.com" , "John McNamara" , Marko Kovacevic , Thomas Monjalon , "Adrien Mazarguil" CC: "dev@dpdk.org" References: <20191025152142.12887-1-pbhagavatula@marvell.com> From: Andrew Rybchenko Message-ID: Date: Mon, 28 Oct 2019 14:53:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-25006.003 X-TM-AS-Result: No-18.129800-8.000000-10 X-TMASE-MatchedRID: oll/cJ/dUC4eimh1YYHcKPZvT2zYoYOwC/ExpXrHizxi0lpUl7/Asehb EupXu7iyqCtBjYa0JVE5R4Mv7LLUzTGi1lRd/AuUbRZGrsoeW/i3xwqfnvnKHggVZKzCW5eCdYJ 3pC9XNt7sTpACFtVzIgH339goFEJ3uBKKB37nRtosisyWO3dp2wI36ueCT29vjrJ98XSDYeoo0E qA13zQc8qMIot8FPFfBEmpoGQQfL7eyYs3+FVYBaoNIG7S1SGvOHhqIXe4Izahpj2O74VkxJGBU qaaGDn0SjVIFO5E44AQUGa2djGd7juXLKOGHxDs9VjtTc1fwmBR3sGN+j7mNGKBXlPtOqqXr8Hn 7ZZFawhmcf3CW+t325CoQkBz+MIbikLATHHwCKmcxB01DrjF91IOc8QjxyVtx6C6dcifNxjE41B h6hF6ceEJ2JCAucbFFgUmZ2eVaM97rjItHwarhX01rxt6Vy+EaeMaKzvXUplTHhSneq8wp7QNIj vzOe3LfGzuoVn0Vs6PQi9XuOWoOPOTgUfCPZn7MgcjIsJOvt77H53q49PMQyBQRBOQhaJiHEKEy gixNPVTU2hij/DhlmRT/6s0+hMlM1QB8oJDIeTPkJgNw33Um8BDOqHwPghjVI7KaIl9NhenZgID Mjh+2GVGlOYPPhaoPWDr1YELPqUAwBSptxetrk+zv2ByYSDQK1PH96GPPGBrcJNgdknK/qPFjJE Fr+olA9Mriq0CDAgBi3kqJOK62e54vhk1EvsRxEHRux+uk8h+ICquNi0WJGxJ4OfUysfyZmnG4O GVd5xBIcgVUnB6fOr+706CZWH5ftwZ3X11IV0= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--18.129800-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-25006.003 X-MDID: 1572263641-q-kWpcq3s9sF 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 Ori, On 10/28/19 1:50 PM, Ori Kam wrote: > Hi Pavan, > > Sorry for jumping in late. > > I don't understand why we need this feature. If the user didn't set any flow with MARK > then the user doesn't need to check it. There is pretty long discussion on the topic already, please, read [1]. [1] http://inbox.dpdk.org/dev/3251fc00-7598-1c4f-fc2a-380065f0a435@solarflare.com/ > Also it breaks compatibility. Yes, there is a deprecation notice for it. > If my understanding is correct the MARK field is going to be moved to dynamic field, and this > will be way to control the use of MARK. Yes and I think the offload should used to request dynamic field register. Similar to timestamp in dynamic mbuf examples. Application requests Rx timestamp offload, PMD registers dynamic filed. > Other option is inside the PMD if one flow uses mark only than copy the mark 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 >> >> From: Pavan Nikhilesh >> >> 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 applcation >> by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`. >> >> 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(-) >> >> 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()``. >> >> >> +.. _nic_features_flow_flag_mark: >> + >> +Flow flag/mark update >> +--------------------- >> + >> +Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.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: >> >> 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 layers. >> >> +* **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 application >> + by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`. >> + >> >> Removed Items >> ------------- >> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.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), >> }; >> >> #undef RTE_RX_OFFLOAD_BIT2STR >> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.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 >> >> #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 { >> >> /** >> * 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 { >> >> /** >> * 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