From patchwork Wed Oct 2 03:47:11 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: 60391 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 5AEF94CA6; Wed, 2 Oct 2019 05:47:32 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 00C6B4CA6 for ; Wed, 2 Oct 2019 05:47:29 +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 x923j91Z015162; Tue, 1 Oct 2019 20:47:29 -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=Zkx0CHmxuFYI2RHVisFlEWDXFW2qVp6StcON7oJxUpk=; b=Qds5IiItqSAtIFgiFllwyQYy438rdnJdGHCFk2zByG09/+TJ96e+luVFgevDuXdRu4Jx CZMctMXBwV7td4IhK3SqyBeDLlFzJUfsIKjvS8/8u1sUYBp7PhjffSKo59vlXbzkuM48 iRxsIGsVhW0xC92V3FHWt9svaZqEW9rizf0GsOYZymK8SZAxqF7NcKghFDqkp2Woaigr QnjkGLtQ73WgSIMBohjUKWMGslIt15f9Es/qb0+RRIrt6gMBSGEvsptogo1GBo3FRS3i FBbbsAwh4/gBSZfoGHFb8y56P1Um8qOXKOTkiG8UHMIpkdkLA1+V/t4ZgXR9bkePQtzo 7Q== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2va71mnkk4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2019 20:47:29 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 1 Oct 2019 20:47:27 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 1 Oct 2019 20:47:27 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.20]) by maili.marvell.com (Postfix) with ESMTP id DEFD53F703F; Tue, 1 Oct 2019 20:47:24 -0700 (PDT) From: To: , , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit CC: , Pavan Nikhilesh Date: Wed, 2 Oct 2019 09:17:11 +0530 Message-ID: <20191002034716.6842-3-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191002034716.6842-1-pbhagavatula@marvell.com> References: <20191001185219.5248-1-pbhagavatula@marvell.com> <20191002034716.6842-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-02_03:2019-10-01,2019-10-02 signatures=0 Subject: [dpdk-dev] [PATCH v7 2/7] ethdev: add mbuf RSS 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_RSS_HASH` which can be used to enable/disable PMDs write to `rte_mbuf::hash::rss`. PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`. Signed-off-by: Pavan Nikhilesh Reviewed-by: Andrew Rybchenko --- doc/guides/nics/features.rst | 2 ++ doc/guides/rel_notes/release_19_11.rst | 7 +++++++ lib/librte_ethdev/rte_ethdev.c | 1 + lib/librte_ethdev/rte_ethdev.h | 1 + 4 files changed, 11 insertions(+) diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst index 1756fa73a..f7c6d918f 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -274,6 +274,7 @@ Supports RSS hashing on RX. * **[uses] user config**: ``dev_conf.rxmode.mq_mode`` = ``ETH_MQ_RX_RSS_FLAG``. * **[uses] user config**: ``dev_conf.rx_adv_conf.rss_conf``. +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``. * **[provides] rte_eth_dev_info**: ``flow_type_rss_offloads``. * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``. @@ -286,6 +287,7 @@ Inner RSS Supports RX RSS hashing on Inner headers. * **[uses] rte_flow_action_rss**: ``level``. +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``. * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``. diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst index abb7b6529..724228faa 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -64,6 +64,13 @@ New Features * This scheme will allow PMDs to avoid lookup to internal ptype table on Rx and thereby improve Rx performance if application wishes do so. +* **Added Rx offload flag to enable or disable RSS update** + + * Added new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to + enable/disable PMDs write to `rte_mbuf::hash::rss`. + * PMDs notify the validity of `rte_mbuf::hash:rss` to the application + by enabling `PKT_RX_RSS_HASH ` 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 b1588fe7a..19bd4795e 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(RSS_HASH), }; #undef RTE_RX_OFFLOAD_BIT2STR diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index c577a9172..c3fa69412 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1013,6 +1013,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_RSS_HASH 0x00080000 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ DEV_RX_OFFLOAD_UDP_CKSUM | \