Skip to content

Commit c195712

Browse files
committed
Merge branch 'hns3-next'
Huazhong Tan says: ==================== code optimizations & bugfixes for HNS3 driver This patch-set includes code optimizations and bugfixes for the HNS3 ethernet controller driver. [patch 1/12 - 4/12] optimizes the VLAN freature and adds support for port based VLAN, fixes some related bugs about the current implementation. [patch 5/12 - 12/12] includes some other code optimizations for the HNS3 ethernet controller driver. Change log: V1->V2: modifies some patches' commint log and code. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 81f2eeb + 6814b59 commit c195712

File tree

14 files changed

+1224
-530
lines changed

14 files changed

+1224
-530
lines changed

drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ enum HCLGE_MBX_OPCODE {
4343
HCLGE_MBX_GET_QID_IN_PF, /* (VF -> PF) get queue id in pf */
4444
HCLGE_MBX_LINK_STAT_MODE, /* (PF -> VF) link mode has changed */
4545
HCLGE_MBX_GET_LINK_MODE, /* (VF -> PF) get the link mode of pf */
46+
HLCGE_MBX_PUSH_VLAN_INFO, /* (PF -> VF) push port base vlan */
4647
HCLGE_MBX_GET_MEDIA_TYPE, /* (VF -> PF) get media type */
4748

4849
HCLGE_MBX_GET_VF_FLR_STATUS = 200, /* (M7 -> PF) get vf reset status */
@@ -63,6 +64,8 @@ enum hclge_mbx_vlan_cfg_subcode {
6364
HCLGE_MBX_VLAN_FILTER = 0, /* set vlan filter */
6465
HCLGE_MBX_VLAN_TX_OFF_CFG, /* set tx side vlan offload */
6566
HCLGE_MBX_VLAN_RX_OFF_CFG, /* set rx side vlan offload */
67+
HCLGE_MBX_PORT_BASE_VLAN_CFG, /* set port based vlan configuration */
68+
HCLGE_MBX_GET_PORT_BASE_VLAN_STATE, /* get port based vlan state */
6669
};
6770

6871
#define HCLGE_MBX_MAX_MSG_SIZE 16

drivers/net/ethernet/hisilicon/hns3/hnae3.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ enum hnae3_flr_state {
147147
HNAE3_FLR_DONE,
148148
};
149149

150+
enum hnae3_port_base_vlan_state {
151+
HNAE3_PORT_BASE_VLAN_DISABLE,
152+
HNAE3_PORT_BASE_VLAN_ENABLE,
153+
HNAE3_PORT_BASE_VLAN_MODIFY,
154+
HNAE3_PORT_BASE_VLAN_NOCHANGE,
155+
};
156+
150157
struct hnae3_vector_info {
151158
u8 __iomem *io_addr;
152159
int vector;
@@ -578,6 +585,8 @@ struct hnae3_handle {
578585

579586
u32 numa_node_mask; /* for multi-chip support */
580587

588+
enum hnae3_port_base_vlan_state port_base_vlan_state;
589+
581590
u8 netdev_flags;
582591
struct dentry *hnae3_dbgfs;
583592
};

0 commit comments

Comments
 (0)