This series adds devlink support for the HNS3 ethernet driver.
Hao Chen (4):
net: hns3: add devlink reload support for PF
net: hns3: add devlink reload support for VF
net: hns3: add support for PF setting rx/tx buffer size by devlink
param
net: hns3: add support for VF setting rx/tx buffer size by devlink
param
Yufeng Mo (4):
net: hns3: add support for registering devlink for PF
net: hns3: add support for registering devlink for VF
net: hns3: add support for devlink get info for PF
net: hns3: add support for devlink get info for VF
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 +
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 +-
.../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 2 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c | 239 ++++++++++++++++++++
.../ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h | 22 ++
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 13 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 +
.../net/ethernet/hisilicon/hns3/hns3vf/Makefile | 2 +-
.../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 240 +++++++++++++++++++++
.../hisilicon/hns3/hns3vf/hclgevf_devlink.h | 22 ++
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 11 +
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 3 +
12 files changed, 560 insertions(+), 5 deletions(-)
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.h
--
2.8.1
From: Yufeng Mo <[email protected]>
Add devlink register support for HNS3 ethernet VF driver.
Signed-off-by: Yufeng Mo <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
.../net/ethernet/hisilicon/hns3/hns3vf/Makefile | 2 +-
.../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 54 ++++++++++++++++++++++
.../hisilicon/hns3/hns3vf/hclgevf_devlink.h | 15 ++++++
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 8 ++++
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 3 ++
5 files changed, 81 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.h
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/Makefile b/drivers/net/ethernet/hisilicon/hns3/hns3vf/Makefile
index 2c26ea607a53..51ff7d86ee90 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/Makefile
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/Makefile
@@ -7,4 +7,4 @@ ccflags-y := -I $(srctree)/drivers/net/ethernet/hisilicon/hns3
ccflags-y += -I $(srctree)/$(src)
obj-$(CONFIG_HNS3_HCLGEVF) += hclgevf.o
-hclgevf-objs = hclgevf_main.o hclgevf_cmd.o hclgevf_mbx.o
+hclgevf-objs = hclgevf_main.o hclgevf_cmd.o hclgevf_mbx.o hclgevf_devlink.o
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
new file mode 100644
index 000000000000..55337a975981
--- /dev/null
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright (c) 2021 Hisilicon Limited. */
+
+#include <net/devlink.h>
+
+#include "hclgevf_devlink.h"
+
+static const struct devlink_ops hclgevf_devlink_ops = {
+};
+
+int hclgevf_devlink_init(struct hclgevf_dev *hdev)
+{
+ struct pci_dev *pdev = hdev->pdev;
+ struct hclgevf_devlink_priv *priv;
+ struct devlink *devlink;
+ int ret;
+
+ devlink = devlink_alloc(&hclgevf_devlink_ops,
+ sizeof(struct hclgevf_devlink_priv));
+ if (!devlink)
+ return -ENOMEM;
+
+ priv = devlink_priv(devlink);
+ priv->hdev = hdev;
+
+ ret = devlink_register(devlink, &pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to register devlink, ret = %d\n",
+ ret);
+ goto out_reg_fail;
+ }
+
+ hdev->devlink = devlink;
+
+ return 0;
+
+out_reg_fail:
+ devlink_free(devlink);
+ return ret;
+}
+
+void hclgevf_devlink_uninit(struct hclgevf_dev *hdev)
+{
+ struct devlink *devlink = hdev->devlink;
+
+ if (!devlink)
+ return;
+
+ devlink_unregister(devlink);
+
+ devlink_free(devlink);
+
+ hdev->devlink = NULL;
+}
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.h
new file mode 100644
index 000000000000..e09ea3d8a963
--- /dev/null
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Copyright (c) 2021 Hisilicon Limited. */
+
+#ifndef __HCLGEVF_DEVLINK_H
+#define __HCLGEVF_DEVLINK_H
+
+#include "hclgevf_main.h"
+
+struct hclgevf_devlink_priv {
+ struct hclgevf_dev *hdev;
+};
+
+int hclgevf_devlink_init(struct hclgevf_dev *hdev);
+void hclgevf_devlink_uninit(struct hclgevf_dev *hdev);
+#endif
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index 52eaf82b7cd7..1e03c4d16125 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -8,6 +8,7 @@
#include "hclgevf_main.h"
#include "hclge_mbx.h"
#include "hnae3.h"
+#include "hclgevf_devlink.h"
#define HCLGEVF_NAME "hclgevf"
@@ -3327,6 +3328,10 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
if (ret)
return ret;
+ ret = hclgevf_devlink_init(hdev);
+ if (ret)
+ goto err_devlink_init;
+
ret = hclgevf_cmd_queue_init(hdev);
if (ret)
goto err_cmd_queue_init;
@@ -3431,6 +3436,8 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
err_cmd_init:
hclgevf_cmd_uninit(hdev);
err_cmd_queue_init:
+ hclgevf_devlink_uninit(hdev);
+err_devlink_init:
hclgevf_pci_uninit(hdev);
clear_bit(HCLGEVF_STATE_IRQ_INITED, &hdev->state);
return ret;
@@ -3452,6 +3459,7 @@ static void hclgevf_uninit_hdev(struct hclgevf_dev *hdev)
}
hclgevf_cmd_uninit(hdev);
+ hclgevf_devlink_uninit(hdev);
hclgevf_pci_uninit(hdev);
hclgevf_uninit_mac_list(hdev);
}
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
index d7d02848d674..6f222a3a0bf2 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
@@ -6,6 +6,7 @@
#include <linux/fs.h>
#include <linux/if_vlan.h>
#include <linux/types.h>
+#include <net/devlink.h>
#include "hclge_mbx.h"
#include "hclgevf_cmd.h"
#include "hnae3.h"
@@ -330,6 +331,8 @@ struct hclgevf_dev {
u32 flag;
unsigned long serv_processed_cnt;
unsigned long last_serv_processed;
+
+ struct devlink *devlink;
};
static inline bool hclgevf_is_reset_pending(struct hclgevf_dev *hdev)
--
2.8.1
From: Hao Chen <[email protected]>
Add support for PF setting rx/tx buffer size by devlink param
Signed-off-by: Hao Chen <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 +
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c | 89 +++++++++++++++++++++-
.../ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h | 7 ++
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +
5 files changed, 105 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index e0b7c3c44e7b..14934db9c59a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -763,6 +763,7 @@ struct hnae3_knic_private_info {
u16 num_tx_desc;
u16 num_rx_desc;
u32 tx_spare_buf_size;
+ u32 devlink_tx_spare_buf_size;
struct hnae3_tc_info tc_info;
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index cdb5f14fb6bc..cdb473d26bcc 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -1037,8 +1037,12 @@ static void hns3_init_tx_spare_buffer(struct hns3_enet_ring *ring)
dma_addr_t dma;
int order;
- alloc_size = tx_spare_buf_size ? tx_spare_buf_size :
- ring->tqp->handle->kinfo.tx_spare_buf_size;
+ if (ring->tqp->handle->kinfo.devlink_tx_spare_buf_size)
+ alloc_size = ring->tqp->handle->kinfo.devlink_tx_spare_buf_size;
+ else if (tx_spare_buf_size)
+ alloc_size = tx_spare_buf_size;
+ else
+ alloc_size = ring->tqp->handle->kinfo.tx_spare_buf_size;
if (!alloc_size)
return;
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
index 276a4261bb9b..38a85fe77076 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
@@ -32,6 +32,37 @@ static int hclge_devlink_info_get(struct devlink *devlink,
return devlink_info_version_running_put(req, "fw-version", version_str);
}
+static void hclge_devlink_get_param_setting(struct devlink *devlink)
+{
+ struct hclge_devlink_priv *priv = devlink_priv(devlink);
+ struct hclge_dev *hdev = priv->hdev;
+ struct pci_dev *pdev = hdev->pdev;
+ union devlink_param_value val;
+ int i, ret;
+
+ ret = devlink_param_driverinit_value_get(devlink,
+ HCLGE_DEVLINK_PARAM_ID_RX_BUF_LEN,
+ &val);
+ if (!ret) {
+ hdev->rx_buf_len = val.vu32;
+ hdev->vport->nic.kinfo.rx_buf_len = hdev->rx_buf_len;
+ for (i = 0; i < hdev->num_tqps; i++)
+ hdev->htqp[i].q.buf_size = hdev->rx_buf_len;
+ } else {
+ dev_err(&pdev->dev,
+ "failed to get rx buffer size, ret = %d\n", ret);
+ }
+
+ ret = devlink_param_driverinit_value_get(devlink,
+ HCLGE_DEVLINK_PARAM_ID_TX_BUF_SIZE,
+ &val);
+ if (!ret)
+ hdev->vport->nic.kinfo.devlink_tx_spare_buf_size = val.vu32;
+ else
+ dev_err(&pdev->dev,
+ "failed to get tx buffer size, ret = %d\n", ret);
+}
+
static int hclge_devlink_reload_down(struct devlink *devlink, bool netns_change,
enum devlink_reload_action action,
enum devlink_reload_limit limit,
@@ -80,6 +111,7 @@ static int hclge_devlink_reload_up(struct devlink *devlink,
*actions_performed = BIT(action);
switch (action) {
case DEVLINK_RELOAD_ACTION_DRIVER_REINIT:
+ hclge_devlink_get_param_setting(devlink);
rtnl_lock();
ret = hdev->nic_client->ops->reset_notify(h, HNAE3_INIT_CLIENT);
if (ret) {
@@ -102,6 +134,49 @@ static const struct devlink_ops hclge_devlink_ops = {
.reload_up = hclge_devlink_reload_up,
};
+static int hclge_devlink_rx_buffer_size_validate(struct devlink *devlink,
+ u32 id,
+ union devlink_param_value val,
+ struct netlink_ext_ack *extack)
+{
+#define HCLGE_RX_BUF_LEN_2K 2048
+#define HCLGE_RX_BUF_LEN_4K 4096
+
+ if (val.vu32 != HCLGE_RX_BUF_LEN_2K &&
+ val.vu32 != HCLGE_RX_BUF_LEN_4K) {
+ NL_SET_ERR_MSG_MOD(extack, "Supported size is 2048 or 4096");
+ return -EOPNOTSUPP;
+ }
+
+ return 0;
+}
+
+static const struct devlink_param hclge_devlink_params[] = {
+ DEVLINK_PARAM_DRIVER(HCLGE_DEVLINK_PARAM_ID_RX_BUF_LEN,
+ "rx_buffer_len", DEVLINK_PARAM_TYPE_U32,
+ BIT(DEVLINK_PARAM_CMODE_DRIVERINIT),
+ NULL, NULL,
+ hclge_devlink_rx_buffer_size_validate),
+ DEVLINK_PARAM_DRIVER(HCLGE_DEVLINK_PARAM_ID_TX_BUF_SIZE,
+ "tx_buffer_size", DEVLINK_PARAM_TYPE_U32,
+ BIT(DEVLINK_PARAM_CMODE_DRIVERINIT),
+ NULL, NULL, NULL),
+};
+
+void hclge_devlink_set_params_init_values(struct hclge_dev *hdev)
+{
+ union devlink_param_value value;
+
+ value.vu32 = hdev->rx_buf_len;
+ devlink_param_driverinit_value_set(hdev->devlink,
+ HCLGE_DEVLINK_PARAM_ID_RX_BUF_LEN,
+ value);
+ value.vu32 = hdev->tx_spare_buf_size;
+ devlink_param_driverinit_value_set(hdev->devlink,
+ HCLGE_DEVLINK_PARAM_ID_TX_BUF_SIZE,
+ value);
+}
+
int hclge_devlink_init(struct hclge_dev *hdev)
{
struct pci_dev *pdev = hdev->pdev;
@@ -126,10 +201,20 @@ int hclge_devlink_init(struct hclge_dev *hdev)
hdev->devlink = devlink;
+ ret = devlink_params_register(devlink, hclge_devlink_params,
+ ARRAY_SIZE(hclge_devlink_params));
+ if (ret) {
+ dev_err(&pdev->dev,
+ "failed to register devlink params, ret = %d\n", ret);
+ goto out_param_reg_fail;
+ }
+
devlink_reload_enable(devlink);
return 0;
-
+out_param_reg_fail:
+ hdev->devlink = NULL;
+ devlink_unregister(devlink);
out_reg_fail:
devlink_free(devlink);
return ret;
@@ -144,6 +229,8 @@ void hclge_devlink_uninit(struct hclge_dev *hdev)
devlink_reload_disable(devlink);
+ devlink_params_unregister(devlink, hclge_devlink_params,
+ ARRAY_SIZE(hclge_devlink_params));
devlink_unregister(devlink);
devlink_free(devlink);
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h
index 918be04507a5..e81402e68aa7 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.h
@@ -6,10 +6,17 @@
#include "hclge_main.h"
+enum hclge_devlink_param_id {
+ HCLGE_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX,
+ HCLGE_DEVLINK_PARAM_ID_RX_BUF_LEN,
+ HCLGE_DEVLINK_PARAM_ID_TX_BUF_SIZE,
+};
+
struct hclge_devlink_priv {
struct hclge_dev *hdev;
};
int hclge_devlink_init(struct hclge_dev *hdev);
+void hclge_devlink_set_params_init_values(struct hclge_dev *hdev);
void hclge_devlink_uninit(struct hclge_dev *hdev);
#endif
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index adc20d6a23c3..fdf14470a846 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -11510,6 +11510,9 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
goto err_cmd_uninit;
}
+ hclge_devlink_set_params_init_values(hdev);
+ devlink_params_publish(hdev->devlink);
+
ret = hclge_init_msi(hdev);
if (ret) {
dev_err(&pdev->dev, "Init MSI/MSI-X error, ret = %d.\n", ret);
--
2.8.1
From: Yufeng Mo <[email protected]>
Add devlink get info support for HNS3 ethernet PF driver.
Signed-off-by: Yufeng Mo <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
.../ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
index 03b822b0a8e7..1646e9e234fe 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
@@ -5,7 +5,35 @@
#include "hclge_devlink.h"
+static int hclge_devlink_info_get(struct devlink *devlink,
+ struct devlink_info_req *req,
+ struct netlink_ext_ack *extack)
+{
+#define HCLGE_DEVLINK_FW_STRING_LEN 32
+ struct hclge_devlink_priv *priv = devlink_priv(devlink);
+ char version_str[HCLGE_DEVLINK_FW_STRING_LEN];
+ struct hclge_dev *hdev = priv->hdev;
+ int ret;
+
+ ret = devlink_info_driver_name_put(req, KBUILD_MODNAME);
+ if (ret)
+ return ret;
+
+ snprintf(version_str, sizeof(version_str), "%lu.%lu.%lu.%lu",
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE3_MASK,
+ HNAE3_FW_VERSION_BYTE3_SHIFT),
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE2_MASK,
+ HNAE3_FW_VERSION_BYTE2_SHIFT),
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE1_MASK,
+ HNAE3_FW_VERSION_BYTE1_SHIFT),
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE0_MASK,
+ HNAE3_FW_VERSION_BYTE0_SHIFT));
+
+ return devlink_info_version_running_put(req, "fw-version", version_str);
+}
+
static const struct devlink_ops hclge_devlink_ops = {
+ .info_get = hclge_devlink_info_get,
};
int hclge_devlink_init(struct hclge_dev *hdev)
--
2.8.1
From: Yufeng Mo <[email protected]>
Add devlink get info support for HNS3 ethernet VF driver.
Signed-off-by: Yufeng Mo <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
.../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
index 55337a975981..1cc6e2fac3a3 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_devlink.c
@@ -5,7 +5,35 @@
#include "hclgevf_devlink.h"
+static int hclgevf_devlink_info_get(struct devlink *devlink,
+ struct devlink_info_req *req,
+ struct netlink_ext_ack *extack)
+{
+#define HCLGEVF_DEVLINK_FW_STRING_LEN 32
+ struct hclgevf_devlink_priv *priv = devlink_priv(devlink);
+ char version_str[HCLGEVF_DEVLINK_FW_STRING_LEN];
+ struct hclgevf_dev *hdev = priv->hdev;
+ int ret;
+
+ ret = devlink_info_driver_name_put(req, KBUILD_MODNAME);
+ if (ret)
+ return ret;
+
+ snprintf(version_str, sizeof(version_str), "%lu.%lu.%lu.%lu",
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE3_MASK,
+ HNAE3_FW_VERSION_BYTE3_SHIFT),
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE2_MASK,
+ HNAE3_FW_VERSION_BYTE2_SHIFT),
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE1_MASK,
+ HNAE3_FW_VERSION_BYTE1_SHIFT),
+ hnae3_get_field(hdev->fw_version, HNAE3_FW_VERSION_BYTE0_MASK,
+ HNAE3_FW_VERSION_BYTE0_SHIFT));
+
+ return devlink_info_version_running_put(req, "fw-version", version_str);
+}
+
static const struct devlink_ops hclgevf_devlink_ops = {
+ .info_get = hclgevf_devlink_info_get,
};
int hclgevf_devlink_init(struct hclgevf_dev *hdev)
--
2.8.1
On Tue, 6 Jul 2021 14:41:31 +0800 Guangbin Huang wrote:
> From: Hao Chen <[email protected]>
>
> Add support for PF setting rx/tx buffer size by devlink param
Please document what this parameter does under
Documentation/networking/devlink/ - see the driver
documentation already present there.
On Tue, 6 Jul 2021 14:41:27 +0800 Guangbin Huang wrote:
> + return devlink_info_version_running_put(req, "fw-version", version_str);
Please use one of the existing names instead of "fw-version",
e.g. DEVLINK_INFO_VERSION_GENERIC_FW.
On 2021/7/7 7:14, Jakub Kicinski wrote:
> On Tue, 6 Jul 2021 14:41:27 +0800 Guangbin Huang wrote:
>> + return devlink_info_version_running_put(req, "fw-version", version_str);
>
> Please use one of the existing names instead of "fw-version",
> e.g. DEVLINK_INFO_VERSION_GENERIC_FW.
> .
>
Ok, thanks.
On 2021/7/7 7:16, Jakub Kicinski wrote:
> On Tue, 6 Jul 2021 14:41:31 +0800 Guangbin Huang wrote:
>> From: Hao Chen <[email protected]>
>>
>> Add support for PF setting rx/tx buffer size by devlink param
>
> Please document what this parameter does under
> Documentation/networking/devlink/ - see the driver
> documentation already present there.
> .
>
Ok, thanks.