From: shenhao shenhao21@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
-----------------------------------------------
1. "HCLGE_VLAN_ID_OFFSET_STEP" and "HCLGE_VLAN_BYTE_SIZE" is used to set command for PF. So moving them to the hclge_cmd.h would be more better. 2. "HCLGE_VF_NUM_PER_BYTE" is redefined in "hclge_cmd.h" "hclge_main.h". So just remove this definition in file "hclge_main.h".
Signed-off-by: Guojia Liao liaoguojia@huawei.com Signed-off-by: shenhao shenhao21@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 ++++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h index 1e35d89..8813a35 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h @@ -806,7 +806,10 @@ struct hclge_vlan_filter_ctrl_cmd { u8 rsv2[19]; };
-#define HCLGE_VLAN_OFFSET_BITMAP 20 +#define HCLGE_VLAN_ID_OFFSET_STEP 160 +#define HCLGE_VLAN_BYTE_SIZE 8 +#define HCLGE_VLAN_OFFSET_BITMAP \ + (HCLGE_VLAN_ID_OFFSET_STEP / HCLGE_VLAN_BYTE_SIZE) struct hclge_vlan_filter_pf_cfg_cmd { u8 vlan_offset; u8 vlan_cfg; diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h index 5e64d2a..d871fde 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h @@ -119,9 +119,6 @@ #define HCLGE_DEFAULT_UMV_SPACE_PER_PF \ (HCLGE_UMV_TBL_SIZE / HCLGE_MAX_PF_NUM)
-#define HCLGE_VLAN_ID_OFFSET_STEP 160 -#define HCLGE_VLAN_BYTE_SIZE 8 - #define HCLGE_TQP_RESET_TRY_TIMES 200
#define HCLGE_PHY_PAGE_MDIX 0 @@ -146,7 +143,6 @@
/* Factor used to calculate offset and bitmap of VF num */ #define HCLGE_VF_NUM_PER_CMD 64 -#define HCLGE_VF_NUM_PER_BYTE 8
enum HLCGE_PORT_TYPE { HOST_PORT,