161 lines
5.6 KiB
Diff
161 lines
5.6 KiB
Diff
From efbdf2cedadf8a944d2af44f90ece0fa46284868 Mon Sep 17 00:00:00 2001
|
|
From: Hao Chen <chenhao288@hisilicon.com>
|
|
Date: Tue, 28 Sep 2021 11:52:18 +0800
|
|
Subject: [PATCH 125/283] net: hns3: add some required spaces
|
|
|
|
mainline inclusion
|
|
from mainline-v5.15-rc1
|
|
commit c74e503572ea0dbfa6ef3449944a286354f9f9b4
|
|
category: feature
|
|
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8EMYT
|
|
CVE: NA
|
|
|
|
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c74e503572ea0dbfa6ef3449944a286354f9f9b4
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
Add some required spaces to improve readability.
|
|
|
|
Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
|
|
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Reviewed-by: Yongxin Li <liyongxin1@huawei.com>
|
|
Signed-off-by: Junxin Chen <chenjunxin1@huawei.com>
|
|
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
|
|
Signed-off-by: Xiaodong Li <lixiaodong67@huawei.com>
|
|
|
|
Conflicts:
|
|
drivers/net/ethernet/hisilicon/hns3/hnae3.h
|
|
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
|
|
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
|
|
---
|
|
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++-
|
|
.../ethernet/hisilicon/hns3/hns3_debugfs.c | 10 ++++-----
|
|
.../net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
|
|
.../net/ethernet/hisilicon/hns3/hns3_enet.h | 13 +++++++++--
|
|
.../hisilicon/hns3/hns3pf/hclge_main.c | 22 +++++++++----------
|
|
5 files changed, 30 insertions(+), 20 deletions(-)
|
|
|
|
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
|
|
index db061ca74d31..1e53128787f9 100644
|
|
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
|
|
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
|
|
@@ -68,7 +68,8 @@
|
|
#define HNAE3_KNIC_CLIENT_INITED_B 0x3
|
|
#define HNAE3_UNIC_CLIENT_INITED_B 0x4
|
|
#define HNAE3_ROCE_CLIENT_INITED_B 0x5
|
|
-#define HNAE3_DEV_SUPPORT_ROCE_DCB_BITS (BIT(HNAE3_DEV_SUPPORT_DCB_B) |\
|
|
+
|
|
+#define HNAE3_DEV_SUPPORT_ROCE_DCB_BITS (BIT(HNAE3_DEV_SUPPORT_DCB_B) | \
|
|
BIT(HNAE3_DEV_SUPPORT_ROCE_B))
|
|
|
|
#define hnae3_dev_roce_supported(hdev) \
|
|
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
|
|
index fd2debdb517c..3ec72f8b2d87 100644
|
|
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
|
|
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
|
|
@@ -840,11 +840,11 @@ static const struct hns3_dbg_item tx_bd_info_items[] = {
|
|
{ "SIZE", 2 },
|
|
{ "T_CS_VLAN_TSO", 2 },
|
|
{ "OT_VLAN_TAG", 3 },
|
|
- { "TV", 5 },
|
|
- { "OLT_VLAN_LEN", 2},
|
|
- { "PAYLEN_OL4CS", 2},
|
|
- { "BD_FE_SC_VLD", 2},
|
|
- { "MSS", 2},
|
|
+ { "TV", 2 },
|
|
+ { "OLT_VLAN_LEN", 2 },
|
|
+ { "PAYLEN_OL4CS", 2 },
|
|
+ { "BD_FE_SC_VLD", 2 },
|
|
+ { "MSS_HW_CSUM", 0 },
|
|
};
|
|
|
|
static void hns3_dump_tx_bd_info(struct hns3_nic_priv *priv,
|
|
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
|
|
index 907d8e62e174..c5b55b238f18 100644
|
|
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
|
|
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
|
|
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(tx_sgl, "Minimum number of frags when using dma_map_sg() to opt
|
|
|
|
#define HNS3_SGL_SIZE(nfrag) (sizeof(struct scatterlist) * (nfrag) + \
|
|
sizeof(struct sg_table))
|
|
-#define HNS3_MAX_SGL_SIZE ALIGN(HNS3_SGL_SIZE(HNS3_MAX_TSO_BD_NUM),\
|
|
+#define HNS3_MAX_SGL_SIZE ALIGN(HNS3_SGL_SIZE(HNS3_MAX_TSO_BD_NUM), \
|
|
dma_get_cache_alignment())
|
|
|
|
#define DEFAULT_MSG_LEVEL (NETIF_MSG_PROBE | NETIF_MSG_LINK | \
|
|
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
|
|
index 9278c742e3b0..2dd652fe4514 100644
|
|
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
|
|
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
|
|
@@ -383,6 +383,14 @@ enum hns3_pkt_ol4type {
|
|
HNS3_OL4_TYPE_UNKNOWN
|
|
};
|
|
|
|
+struct hns3_rx_ptype {
|
|
+ u32 ptype : 8;
|
|
+ u32 csum_level : 2;
|
|
+ u32 ip_summed : 2;
|
|
+ u32 l3_type : 4;
|
|
+ u32 valid : 1;
|
|
+};
|
|
+
|
|
struct ring_stats {
|
|
u64 sw_err_cnt;
|
|
u64 seg_pkt_cnt;
|
|
@@ -502,8 +510,9 @@ struct hns3_enet_coalesce {
|
|
u16 int_gl;
|
|
u16 int_ql;
|
|
u16 int_ql_max;
|
|
- u8 adapt_enable:1;
|
|
- u8 ql_enable:1;
|
|
+ u8 adapt_enable : 1;
|
|
+ u8 ql_enable : 1;
|
|
+ u8 unit_1us : 1;
|
|
enum hns3_flow_level_range flow_level;
|
|
};
|
|
|
|
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
|
|
index 30c98e0d12d4..ab8df97248ca 100644
|
|
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
|
|
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
|
|
@@ -370,14 +370,14 @@ static const enum hclge_opcode_type hclge_dfx_reg_opcode_list[] = {
|
|
};
|
|
|
|
static const struct key_info meta_data_key_info[] = {
|
|
- { PACKET_TYPE_ID, 6},
|
|
- { IP_FRAGEMENT, 1},
|
|
- { ROCE_TYPE, 1},
|
|
- { NEXT_KEY, 5},
|
|
- { VLAN_NUMBER, 2},
|
|
- { SRC_VPORT, 12},
|
|
- { DST_VPORT, 12},
|
|
- { TUNNEL_PACKET, 1},
|
|
+ { PACKET_TYPE_ID, 6 },
|
|
+ { IP_FRAGEMENT, 1 },
|
|
+ { ROCE_TYPE, 1 },
|
|
+ { NEXT_KEY, 5 },
|
|
+ { VLAN_NUMBER, 2 },
|
|
+ { SRC_VPORT, 12 },
|
|
+ { DST_VPORT, 12 },
|
|
+ { TUNNEL_PACKET, 1 },
|
|
};
|
|
|
|
static const struct key_info tuple_key_info[] = {
|
|
@@ -723,9 +723,9 @@ static void hclge_update_stats(struct hnae3_handle *handle,
|
|
|
|
static int hclge_get_sset_count(struct hnae3_handle *handle, int stringset)
|
|
{
|
|
-#define HCLGE_LOOPBACK_TEST_FLAGS (HNAE3_SUPPORT_APP_LOOPBACK |\
|
|
- HNAE3_SUPPORT_PHY_LOOPBACK |\
|
|
- HNAE3_SUPPORT_SERDES_SERIAL_LOOPBACK |\
|
|
+#define HCLGE_LOOPBACK_TEST_FLAGS (HNAE3_SUPPORT_APP_LOOPBACK | \
|
|
+ HNAE3_SUPPORT_PHY_LOOPBACK | \
|
|
+ HNAE3_SUPPORT_SERDES_SERIAL_LOOPBACK | \
|
|
HNAE3_SUPPORT_SERDES_PARALLEL_LOOPBACK)
|
|
|
|
struct hclge_vport *vport = hclge_get_vport(handle);
|
|
--
|
|
2.34.1
|
|
|