From: Guangbin Huang <huangguangbin2@huawei.com>
To: <davem@davemloft.net>, <kuba@kernel.org>, <wangjie125@huawei.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lipeng321@huawei.com>, <huangguangbin2@huawei.com>,
<chenhao288@hisilicon.com>
Subject: [PATCH net-next 01/15] net: hns3: create new rss common structure hclge_comm_rss_cfg
Date: Wed, 5 Jan 2022 22:20:01 +0800 [thread overview]
Message-ID: <20220105142015.51097-2-huangguangbin2@huawei.com> (raw)
In-Reply-To: <20220105142015.51097-1-huangguangbin2@huawei.com>
From: Jie Wang <wangjie125@huawei.com>
Currently PF stores its rss parameters in vport structure. VF stores rss
configurations in hclgevf_rss_cfg structure. Actually hns3 rss parameters
are same beween PF and VF. The two set of rss parameters are redundent and
may add extra bugfix work.
So this patch creates new common rss parameter struct(hclge_comm_rss_cfg)
to unify PF and VF rss configurations.
These new structures will be used to unify rss configurations in PF and VF
rss APIs in next patches.
Signed-off-by: Jie Wang <wangjie125@huawei.com>
---
| 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.h
--git a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.h b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.h
new file mode 100644
index 000000000000..74bd30b2fcc9
--- /dev/null
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_rss.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+// Copyright (c) 2021-2021 Hisilicon Limited.
+
+#ifndef __HCLGE_COMM_RSS_H
+#define __HCLGE_COMM_RSS_H
+#include <linux/types.h>
+
+#include "hnae3.h"
+
+struct hclge_comm_rss_tuple_cfg {
+ u8 ipv4_tcp_en;
+ u8 ipv4_udp_en;
+ u8 ipv4_sctp_en;
+ u8 ipv4_fragment_en;
+ u8 ipv6_tcp_en;
+ u8 ipv6_udp_en;
+ u8 ipv6_sctp_en;
+ u8 ipv6_fragment_en;
+};
+
+#define HCLGE_COMM_RSS_KEY_SIZE 40
+
+struct hclge_comm_rss_cfg {
+ u8 rss_hash_key[HCLGE_COMM_RSS_KEY_SIZE]; /* user configured hash keys */
+
+ /* shadow table */
+ u16 *rss_indirection_tbl;
+ u32 rss_algo;
+
+ struct hclge_comm_rss_tuple_cfg rss_tuple_sets;
+ u32 rss_size;
+};
+
+#endif
--
2.33.0
next prev parent reply other threads:[~2022-01-05 14:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 14:20 [PATCH net-next 00/15] net: hns3: refactor rss/tqp stats functions Guangbin Huang
2022-01-05 14:20 ` Guangbin Huang [this message]
2022-01-05 14:20 ` [PATCH net-next 02/15] net: hns3: refactor hclge_comm_send function in PF/VF drivers Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 03/15] net: hns3: create new set of common rss get APIs for PF and VF rss module Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 04/15] net: hns3: refactor PF rss get APIs with new common rss get APIs Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 05/15] net: hns3: refactor VF " Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 06/15] net: hns3: create new set of common rss set APIs for PF and VF module Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 07/15] net: hns3: refactor PF rss set APIs with new common rss set APIs Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 08/15] net: hns3: refactor VF " Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 09/15] net: hns3: create new set of common rss init APIs for PF and VF reuse Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 10/15] net: hns3: refactor PF rss init APIs with new common rss init APIs Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 11/15] net: hns3: refactor VF " Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 12/15] net: hns3: create new set of common tqp stats APIs for PF and VF reuse Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 13/15] net: hns3: refactor PF tqp stats APIs with new common tqp stats APIs Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 14/15] net: hns3: refactor VF " Guangbin Huang
2022-01-05 14:20 ` [PATCH net-next 15/15] net: hns3: create new common cmd code for PF and VF modules Guangbin Huang
2022-01-05 14:50 ` [PATCH net-next 00/15] net: hns3: refactor rss/tqp stats functions patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220105142015.51097-2-huangguangbin2@huawei.com \
--to=huangguangbin2@huawei.com \
--cc=chenhao288@hisilicon.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=wangjie125@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®