From patchwork Thu Oct 17 12:02:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 61375 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9041D1E8F2; Thu, 17 Oct 2019 14:03:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 563511E569 for ; Thu, 17 Oct 2019 14:03:01 +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 x9HBtatg006934; Thu, 17 Oct 2019 05:03:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=JoieeGxl7WVDu/17jm9GdDN49ubzA6GInX/zYmgWcI4=; b=KnusVdhhJSimPXpyUI09PfIe3Y9FyK0+wS423dzJhvRQEcl8L1SnGHhi3admvyACVbVW r2qgTmnxk8ir4HNGo2UGtCq9p9E99j+dszbi3al01GwN2fwdFFPz4xehiQD3OBzaI1+G Ei2m2T+PYNrUEPIruB2JHz6om9FVnhGWOKQSJCMltstB4UdRB53dyZiJ/1ZRg1g4xBiU MCQQSPssiRpIXciDbxstMO4KGdl8vxiGNLKnQpXy7Bw8HxST+woQhGlgdPSvSCZ9o3Qa vDi6nQrj2vnLUZu4dhjU5YFBztkBeCzXp90dgUpdHWyhqD9JVbdUYJGZO57DFPKlibRY Yw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2vpj9bs21k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2019 05:03:00 -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; Thu, 17 Oct 2019 05:02:58 -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; Thu, 17 Oct 2019 05:02:58 -0700 Received: from BG-LT7430.marvell.com (bg-lt7430.marvell.com [10.28.10.255]) by maili.marvell.com (Postfix) with ESMTP id BC3D13F703F; Thu, 17 Oct 2019 05:02:55 -0700 (PDT) From: To: , , , John McNamara , "Marko Kovacevic" , Thomas Monjalon , Adrien Mazarguil CC: , Pavan Nikhilesh Date: Thu, 17 Oct 2019 17:32:40 +0530 Message-ID: <20191017120245.984-4-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191017120245.984-1-pbhagavatula@marvell.com> References: <20191010105130.3382-1-pbhagavatula@marvell.com> <20191017120245.984-1-pbhagavatula@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-17_04:2019-10-17,2019-10-17 signatures=0 Subject: [dpdk-dev] [PATCH v12 3/7] 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 1653e5b9d..3780cf4dd 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -594,6 +594,18 @@ Allows application to set ptypes it is interested in. * **[provides] mbuf**: ``mbuf.packet_type``. +.. _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 498fdfcdf..cb280d15b 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -167,6 +167,15 @@ New Features * PMDs notify the validity of `rte_mbuf::hash:rss` to the application by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`. +* **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 685b6a9be..f8090fd6f 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -130,6 +130,7 @@ static const struct { RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM), RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM), RTE_RX_OFFLOAD_BIT2STR(RSS_HASH), + 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 68b2a4ba8..249303c90 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1016,6 +1016,7 @@ struct rte_eth_conf { #define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000 #define DEV_RX_OFFLOAD_RSS_HASH 0x00080000 +#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 bcfc06cdc..5c71b9ef4 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -1509,7 +1509,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. */ @@ -1517,7 +1518,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. */