@@ -1228,6 +1228,10 @@ struct bnx2x_slowpath {
12281228 struct eth_classify_rules_ramrod_data e2 ;
12291229 } mac_rdata ;
12301230
1231+ union {
1232+ struct eth_classify_rules_ramrod_data e2 ;
1233+ } vlan_rdata ;
1234+
12311235 union {
12321236 struct tstorm_eth_mac_filter_config e1x ;
12331237 struct eth_filter_rules_ramrod_data e2 ;
@@ -1410,6 +1414,9 @@ struct bnx2x_sp_objs {
14101414
14111415 /* Queue State object */
14121416 struct bnx2x_queue_sp_obj q_obj ;
1417+
1418+ /* VLANs object */
1419+ struct bnx2x_vlan_mac_obj vlan_obj ;
14131420};
14141421
14151422struct bnx2x_fp_stats {
@@ -1427,6 +1434,12 @@ enum {
14271434 SUB_MF_MODE_BD ,
14281435};
14291436
1437+ struct bnx2x_vlan_entry {
1438+ struct list_head link ;
1439+ u16 vid ;
1440+ bool hw ;
1441+ };
1442+
14301443struct bnx2x {
14311444 /* Fields used in the tx and intr/napi performance paths
14321445 * are grouped together in the beginning of the structure
@@ -1865,8 +1878,6 @@ struct bnx2x {
18651878 int dcb_version ;
18661879
18671880 /* CAM credit pools */
1868-
1869- /* used only in sriov */
18701881 struct bnx2x_credit_pool_obj vlans_pool ;
18711882
18721883 struct bnx2x_credit_pool_obj macs_pool ;
@@ -1929,6 +1940,11 @@ struct bnx2x {
19291940 u16 rx_filter ;
19301941
19311942 struct bnx2x_link_report_data vf_link_vars ;
1943+ struct list_head vlan_reg ;
1944+ u16 vlan_cnt ;
1945+ u16 vlan_credit ;
1946+ u16 vxlan_dst_port ;
1947+ bool accept_any_vlan ;
19321948};
19331949
19341950/* Tx queues may be less or equal to Rx queues */
@@ -1956,23 +1972,14 @@ extern int num_queues;
19561972#define RSS_IPV6_TCP_CAP_MASK \
19571973 TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY
19581974
1959- /* func init flags */
1960- #define FUNC_FLG_RSS 0x0001
1961- #define FUNC_FLG_STATS 0x0002
1962- /* removed FUNC_FLG_UNMATCHED 0x0004 */
1963- #define FUNC_FLG_TPA 0x0008
1964- #define FUNC_FLG_SPQ 0x0010
1965- #define FUNC_FLG_LEADING 0x0020 /* PF only */
1966- #define FUNC_FLG_LEADING_STATS 0x0040
19671975struct bnx2x_func_init_params {
19681976 /* dma */
1969- dma_addr_t fw_stat_map ; /* valid iff FUNC_FLG_STATS */
1970- dma_addr_t spq_map ; /* valid iff FUNC_FLG_SPQ */
1977+ bool spq_active ;
1978+ dma_addr_t spq_map ;
1979+ u16 spq_prod ;
19711980
1972- u16 func_flgs ;
19731981 u16 func_id ; /* abs fid */
19741982 u16 pf_id ;
1975- u16 spq_prod ; /* valid iff FUNC_FLG_SPQ */
19761983};
19771984
19781985#define for_each_cnic_queue (bp , var ) \
@@ -2082,6 +2089,11 @@ struct bnx2x_func_init_params {
20822089int bnx2x_set_mac_one (struct bnx2x * bp , u8 * mac ,
20832090 struct bnx2x_vlan_mac_obj * obj , bool set ,
20842091 int mac_type , unsigned long * ramrod_flags );
2092+
2093+ int bnx2x_set_vlan_one (struct bnx2x * bp , u16 vlan ,
2094+ struct bnx2x_vlan_mac_obj * obj , bool set ,
2095+ unsigned long * ramrod_flags );
2096+
20852097/**
20862098 * bnx2x_del_all_macs - delete all MACs configured for the specific MAC object
20872099 *
@@ -2486,6 +2498,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id,
24862498#define VF_ACQUIRE_THRESH 3
24872499#define VF_ACQUIRE_MAC_FILTERS 1
24882500#define VF_ACQUIRE_MC_FILTERS 10
2501+ #define VF_ACQUIRE_VLAN_FILTERS 2 /* VLAN0 + 'real' VLAN */
24892502
24902503#define GOOD_ME_REG (me_reg ) (((me_reg) & ME_REG_VF_VALID) && \
24912504 (!((me_reg) & ME_REG_VF_ERR)))
@@ -2596,4 +2609,9 @@ void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb);
25962609#define BNX2X_MAX_PHC_DRIFT 31000000
25972610#define BNX2X_PTP_TX_TIMEOUT
25982611
2612+ /* Re-configure all previously configured vlan filters.
2613+ * Meant for implicit re-load flows.
2614+ */
2615+ int bnx2x_vlan_reconfigure_vid (struct bnx2x * bp );
2616+
25992617#endif /* bnx2x.h */
0 commit comments