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 AD5FFA32A4 for ; Fri, 25 Oct 2019 17:21:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83F541C241; Fri, 25 Oct 2019 17:21:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 46A621C226 for ; Fri, 25 Oct 2019 17:21:50 +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 x9PFBLhx024615; Fri, 25 Oct 2019 08:21:49 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=EfeQUEWsOg35r+NQ0P/nCBrebPbqcM4zFGT8bvZx3iM=; b=OHFFQtQBo/WtEomMhb5GnOvcZK+zSuaTYV1l5R1+na+wayXFg81x0Is/fHxZZYXpvNoS lXLNHILFRNu06zVj2gDasswpTWOSVbmgtTVwsyn6Q+7wXKsPEh+NsRHcaVDL3JilXcEQ AAEuf8RQaSDyDWm0owqkX6lcU9KyLBXEVu0lL6+6j5SsaH0B0K91V4q6iSv7Pl6q+6Bg zPNKZLzZ9jIByy5wDb4PeBitbAVOcH6M8lLczct0J4vpEL1757ZO3mw61dGHmtMp6ms5 FQz5ikEOWn+eMUPlxWcMvTNYYKQlEy1XEk3VvjSylQUAuZFa+nbqQ3zhZ+rz0kfjJfb/ yg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2vt9ujvbhp-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 25 Oct 2019 08:21:49 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 25 Oct 2019 08:21:47 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 25 Oct 2019 08:21:47 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.85]) by maili.marvell.com (Postfix) with ESMTP id 10B883F703F; Fri, 25 Oct 2019 08:21:43 -0700 (PDT) From: To: , , , John McNamara , "Marko Kovacevic" , Thomas Monjalon , Adrien Mazarguil CC: , Pavan Nikhilesh Date: Fri, 25 Oct 2019 20:51:40 +0530 Message-ID: <20191025152142.12887-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-25_08:2019-10-25,2019-10-25 signatures=0 Subject: [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" 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