From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE402A034C for ; Fri, 30 Sep 2022 09:24:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F6DE42BBB; Fri, 30 Sep 2022 09:24:21 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 85C3842B8E; Fri, 30 Sep 2022 09:24:16 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Mf1p41tCPzlXQw; Fri, 30 Sep 2022 15:19:56 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 15:24:14 +0800 From: Dongdong Liu To: , , , CC: , , , , , Subject: [PATCH 13/19] net/hns3: fix fail to enable IPV4 or IPV6 packet RSS Date: Fri, 30 Sep 2022 15:22:14 +0800 Message-ID: <20220930072220.20753-14-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220930072220.20753-1-liudongdong3@huawei.com> References: <20220930072220.20753-1-liudongdong3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Huisong Li Currently, hns3 driver use 'ipv4-other' and 'ipv6-other' as the flag of IP packets to judge if enable RSS tuple field. But user may use 'RTE_ETH_RSS_IPV4' or 'RTE_ETH_RSS_IPV6' as the flag. So this patch adds the processing of these macros. Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rss.c | 14 ++++++++++++++ drivers/net/hns3/hns3_rss.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index fc912ed2e8..e7e114727f 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -102,6 +102,10 @@ static const struct { BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) }, { RTE_ETH_RSS_NONFRAG_IPV4_SCTP | RTE_ETH_RSS_L4_DST_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) }, + { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_SRC_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, + { RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_L3_DST_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) }, { RTE_ETH_RSS_NONFRAG_IPV4_OTHER | RTE_ETH_RSS_L3_DST_ONLY, @@ -134,6 +138,10 @@ static const struct { BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) }, { RTE_ETH_RSS_NONFRAG_IPV6_SCTP | RTE_ETH_RSS_L4_DST_ONLY, BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) }, + { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_SRC_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, + { RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_L3_DST_ONLY, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_SRC_ONLY, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) }, { RTE_ETH_RSS_NONFRAG_IPV6_OTHER | RTE_ETH_RSS_L3_DST_ONLY, @@ -159,6 +167,9 @@ static const struct { BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) | BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER) }, + { RTE_ETH_RSS_IPV4, + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, { RTE_ETH_RSS_NONFRAG_IPV4_OTHER, BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D) }, @@ -177,6 +188,9 @@ static const struct { BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_D) | BIT_ULL(HNS3_RSS_FILED_IPV6_SCTP_EN_SCTP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER) }, + { RTE_ETH_RSS_IPV6, + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | + BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) }, { RTE_ETH_RSS_NONFRAG_IPV6_OTHER, BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S) | BIT_ULL(HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D) } diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 55aafedcba..8e8b056f4e 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -9,11 +9,13 @@ #include #define HNS3_ETH_RSS_SUPPORT ( \ + RTE_ETH_RSS_IPV4 | \ RTE_ETH_RSS_FRAG_IPV4 | \ RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ RTE_ETH_RSS_NONFRAG_IPV4_UDP | \ RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \ RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \ + RTE_ETH_RSS_IPV6 | \ RTE_ETH_RSS_FRAG_IPV6 | \ RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ -- 2.22.0