diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-08-31 13:17:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-01 13:41:57 -0400 |
commit | b5e5492c0d49e2fd6f51961d03b8533435e5e7f5 (patch) | |
tree | 6020e160e5b9b84b5d6d94c68f77fb8482d63c71 /drivers/net/qlcnic/qlcnic.h | |
parent | 7373373d100e5aebe751af0b2609a9a01dad5ac1 (diff) |
qlcnic: support mac learning
Device eswitch need to configure with VM's mac address.
Hypervisor doesn't provide any utility/callbacks to get VM's mac address.
Unicast mac address filter improves performance and also provide
packet loopback capability i.e communication between VM.
Above features is by default off, can be turned on with module parameter
'mac_learn'.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic.h')
-rw-r--r-- | drivers/net/qlcnic/qlcnic.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index cd1a2e6f59d2..4727204a2450 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h | |||
@@ -926,6 +926,21 @@ struct qlcnic_mac_req { | |||
926 | #define QLCNIC_INTERRUPT_TEST 1 | 926 | #define QLCNIC_INTERRUPT_TEST 1 |
927 | #define QLCNIC_LOOPBACK_TEST 2 | 927 | #define QLCNIC_LOOPBACK_TEST 2 |
928 | 928 | ||
929 | #define QLCNIC_FILTER_AGE 80 | ||
930 | #define QLCNIC_LB_MAX_FILTERS 64 | ||
931 | |||
932 | struct qlcnic_filter { | ||
933 | struct hlist_node fnode; | ||
934 | u8 faddr[ETH_ALEN]; | ||
935 | unsigned long ftime; | ||
936 | }; | ||
937 | |||
938 | struct qlcnic_filter_hash { | ||
939 | struct hlist_head *fhead; | ||
940 | u8 fnum; | ||
941 | u8 fmax; | ||
942 | }; | ||
943 | |||
929 | struct qlcnic_adapter { | 944 | struct qlcnic_adapter { |
930 | struct qlcnic_hardware_context ahw; | 945 | struct qlcnic_hardware_context ahw; |
931 | 946 | ||
@@ -934,6 +949,7 @@ struct qlcnic_adapter { | |||
934 | struct list_head mac_list; | 949 | struct list_head mac_list; |
935 | 950 | ||
936 | spinlock_t tx_clean_lock; | 951 | spinlock_t tx_clean_lock; |
952 | spinlock_t mac_learn_lock; | ||
937 | 953 | ||
938 | u16 num_txd; | 954 | u16 num_txd; |
939 | u16 num_rxd; | 955 | u16 num_rxd; |
@@ -1013,6 +1029,8 @@ struct qlcnic_adapter { | |||
1013 | 1029 | ||
1014 | struct qlcnic_nic_intr_coalesce coal; | 1030 | struct qlcnic_nic_intr_coalesce coal; |
1015 | 1031 | ||
1032 | struct qlcnic_filter_hash fhash; | ||
1033 | |||
1016 | unsigned long state; | 1034 | unsigned long state; |
1017 | __le32 file_prd_off; /*File fw product offset*/ | 1035 | __le32 file_prd_off; /*File fw product offset*/ |
1018 | u32 fw_version; | 1036 | u32 fw_version; |
@@ -1211,6 +1229,8 @@ void qlcnic_pcie_sem_unlock(struct qlcnic_adapter *, int); | |||
1211 | int qlcnic_get_board_info(struct qlcnic_adapter *adapter); | 1229 | int qlcnic_get_board_info(struct qlcnic_adapter *adapter); |
1212 | int qlcnic_wol_supported(struct qlcnic_adapter *adapter); | 1230 | int qlcnic_wol_supported(struct qlcnic_adapter *adapter); |
1213 | int qlcnic_config_led(struct qlcnic_adapter *adapter, u32 state, u32 rate); | 1231 | int qlcnic_config_led(struct qlcnic_adapter *adapter, u32 state, u32 rate); |
1232 | void qlcnic_prune_lb_filters(struct qlcnic_adapter *adapter); | ||
1233 | void qlcnic_delete_lb_filters(struct qlcnic_adapter *adapter); | ||
1214 | 1234 | ||
1215 | /* Functions from qlcnic_init.c */ | 1235 | /* Functions from qlcnic_init.c */ |
1216 | int qlcnic_load_firmware(struct qlcnic_adapter *adapter); | 1236 | int qlcnic_load_firmware(struct qlcnic_adapter *adapter); |