summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns3/hnae3.h
diff options
context:
space:
mode:
authorJian Shen <shenjian15@huawei.com>2018-10-12 15:34:04 +0100
committerDavid S. Miller <davem@davemloft.net>2018-10-12 11:23:45 -0700
commitc60edc17df391e33c9c3cd6e319eb1f32ce26730 (patch)
tree07d434f5945d26a1ff40dfd27d6fb3e27e5b811d /drivers/net/ethernet/hisilicon/hns3/hnae3.h
parent5886d932e52acfbe12ea5aac8e7c3ad6f16364d1 (diff)
net: hns3: Enable promisc mode when mac vlan table is full
Currently, the driver does nothing when mac vlan table is full. In this case, the packet with new mac address will be dropped by hardware. This patch adds check for the result of sync mac address, and enable promisc mode when mac vlan table is full. Furtherly, disable vlan filter when enable promisc by user command. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hnae3.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hnae3.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index 3df62a5783ab..c3bd2a10bc7d 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -503,6 +503,15 @@ struct hnae3_unic_private_info {
#define HNAE3_SUPPORT_VF BIT(3)
#define HNAE3_SUPPORT_SERDES_PARALLEL_LOOPBACK BIT(4)
+#define HNAE3_USER_UPE BIT(0) /* unicast promisc enabled by user */
+#define HNAE3_USER_MPE BIT(1) /* mulitcast promisc enabled by user */
+#define HNAE3_BPE BIT(2) /* broadcast promisc enable */
+#define HNAE3_OVERFLOW_UPE BIT(3) /* unicast mac vlan overflow */
+#define HNAE3_OVERFLOW_MPE BIT(4) /* multicast mac vlan overflow */
+#define HNAE3_VLAN_FLTR BIT(5) /* enable vlan filter */
+#define HNAE3_UPE (HNAE3_USER_UPE | HNAE3_OVERFLOW_UPE)
+#define HNAE3_MPE (HNAE3_USER_MPE | HNAE3_OVERFLOW_MPE)
+
struct hnae3_handle {
struct hnae3_client *client;
struct pci_dev *pdev;
@@ -521,6 +530,8 @@ struct hnae3_handle {
};
u32 numa_node_mask; /* for multi-chip support */
+
+ u8 netdev_flags;
};
#define hnae3_set_field(origin, mask, shift, val) \