From: Hao Lan <lanhao@huawei•com>
To: <davem@davemloft•net>, <kuba@kernel•org>
Cc: <yisen.zhuang@huawei•com>, <salil.mehta@huawei•com>,
<edumazet@google•com>, <pabeni@redhat•com>,
<richardcochran@gmail•com>, <shenjian15@huawei•com>,
<wangjie125@huawei•com>, <netdev@vger•kernel.org>
Subject: [PATCH net-next 1/2] net: hns3: add hns3 vf fault detect cap bit support
Date: Fri, 13 Jan 2023 10:08:28 +0800 [thread overview]
Message-ID: <20230113020829.48451-2-lanhao@huawei.com> (raw)
In-Reply-To: <20230113020829.48451-1-lanhao@huawei.com>
From: Jie Wang <wangjie125@huawei•com>
Currently hns3 driver is designed to support VF fault detect feature in
new hardwares. For code compatibility, vf fault detect cap bit is added to
the driver.
Signed-off-by: Jie Wang <wangjie125@huawei•com>
Signed-off-by: Hao Lan <lanhao@huawei•com>
---
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 4 ++++
.../net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c | 1 +
.../net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h | 1 +
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 3 +++
4 files changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index 17137de9338c..cd85c360335d 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -98,6 +98,7 @@ enum HNAE3_DEV_CAP_BITS {
HNAE3_DEV_SUPPORT_MC_MAC_MNG_B,
HNAE3_DEV_SUPPORT_CQ_B,
HNAE3_DEV_SUPPORT_FEC_STATS_B,
+ HNAE3_DEV_SUPPORT_VF_FAULT_B,
HNAE3_DEV_SUPPORT_LANE_NUM_B,
};
@@ -164,6 +165,9 @@ enum HNAE3_DEV_CAP_BITS {
#define hnae3_ae_dev_fec_stats_supported(ae_dev) \
test_bit(HNAE3_DEV_SUPPORT_FEC_STATS_B, (ae_dev)->caps)
+#define hnae3_ae_dev_vf_fault_supported(ae_dev) \
+ test_bit(HNAE3_DEV_SUPPORT_VF_FAULT_B, (ae_dev)->caps)
+
#define hnae3_ae_dev_lane_num_supported(ae_dev) \
test_bit(HNAE3_DEV_SUPPORT_LANE_NUM_B, (ae_dev)->caps)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
index f671a63cecde..2c2d8c7b4e2a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
@@ -155,6 +155,7 @@ static const struct hclge_comm_caps_bit_map hclge_pf_cmd_caps[] = {
{HCLGE_COMM_CAP_FD_B, HNAE3_DEV_SUPPORT_FD_B},
{HCLGE_COMM_CAP_FEC_STATS_B, HNAE3_DEV_SUPPORT_FEC_STATS_B},
{HCLGE_COMM_CAP_LANE_NUM_B, HNAE3_DEV_SUPPORT_LANE_NUM_B},
+ {HCLGE_COMM_CAP_VF_FAULT_B, HNAE3_DEV_SUPPORT_VF_FAULT_B},
};
static const struct hclge_comm_caps_bit_map hclge_vf_cmd_caps[] = {
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h
index b1f9383b418f..ca3692dc2848 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.h
@@ -344,6 +344,7 @@ enum HCLGE_COMM_CAP_BITS {
HCLGE_COMM_CAP_GRO_B = 20,
HCLGE_COMM_CAP_FD_B = 21,
HCLGE_COMM_CAP_FEC_STATS_B = 25,
+ HCLGE_COMM_CAP_VF_FAULT_B = 26,
HCLGE_COMM_CAP_LANE_NUM_B = 27,
};
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
index 66feb23f7b7b..cf86ba96716b 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
@@ -408,6 +408,9 @@ static struct hns3_dbg_cap_info hns3_dbg_cap[] = {
}, {
.name = "support lane num",
.cap_bit = HNAE3_DEV_SUPPORT_LANE_NUM_B,
+ }, {
+ .name = "support vf fault detect",
+ .cap_bit = HNAE3_DEV_SUPPORT_VF_FAULT_B,
}
};
--
2.30.0
next prev parent reply other threads:[~2023-01-13 2:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 2:08 [PATCH net-next 0/2] add some vf fault detect patch for hns Hao Lan
2023-01-13 2:08 ` Hao Lan [this message]
2023-01-13 2:08 ` [PATCH net-next 2/2] net: hns3: add vf fault process in hns3 ras Hao Lan
2023-01-13 6:51 ` Leon Romanovsky
2023-01-17 7:04 ` wangjie (L)
2023-01-17 11:21 ` Leon Romanovsky
2023-01-18 12:34 ` wangjie (L)
2023-01-20 17:12 ` Leon Romanovsky
2023-01-31 12:04 ` wangjie (L)
2023-01-31 13:24 ` Leon Romanovsky
2023-02-02 13:08 ` wangjie (L)
2023-02-06 13:36 ` Leon Romanovsky
2023-01-17 8:04 ` Paolo Abeni
2023-01-18 12:36 ` wangjie (L)
2023-01-18 12:36 ` wangjie (L)
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=20230113020829.48451-2-lanhao@huawei.com \
--to=lanhao@huawei$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=richardcochran@gmail$(echo .)com \
--cc=salil.mehta@huawei$(echo .)com \
--cc=shenjian15@huawei$(echo .)com \
--cc=wangjie125@huawei$(echo .)com \
--cc=yisen.zhuang@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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