@@ -1228,6 +1228,10 @@ struct bnx2x_slowpath {
1228
1228
struct eth_classify_rules_ramrod_data e2 ;
1229
1229
} mac_rdata ;
1230
1230
1231
+ union {
1232
+ struct eth_classify_rules_ramrod_data e2 ;
1233
+ } vlan_rdata ;
1234
+
1231
1235
union {
1232
1236
struct tstorm_eth_mac_filter_config e1x ;
1233
1237
struct eth_filter_rules_ramrod_data e2 ;
@@ -1410,6 +1414,9 @@ struct bnx2x_sp_objs {
1410
1414
1411
1415
/* Queue State object */
1412
1416
struct bnx2x_queue_sp_obj q_obj ;
1417
+
1418
+ /* VLANs object */
1419
+ struct bnx2x_vlan_mac_obj vlan_obj ;
1413
1420
};
1414
1421
1415
1422
struct bnx2x_fp_stats {
@@ -1427,6 +1434,12 @@ enum {
1427
1434
SUB_MF_MODE_BD ,
1428
1435
};
1429
1436
1437
+ struct bnx2x_vlan_entry {
1438
+ struct list_head link ;
1439
+ u16 vid ;
1440
+ bool hw ;
1441
+ };
1442
+
1430
1443
struct bnx2x {
1431
1444
/* Fields used in the tx and intr/napi performance paths
1432
1445
* are grouped together in the beginning of the structure
@@ -1865,8 +1878,6 @@ struct bnx2x {
1865
1878
int dcb_version ;
1866
1879
1867
1880
/* CAM credit pools */
1868
-
1869
- /* used only in sriov */
1870
1881
struct bnx2x_credit_pool_obj vlans_pool ;
1871
1882
1872
1883
struct bnx2x_credit_pool_obj macs_pool ;
@@ -1929,6 +1940,11 @@ struct bnx2x {
1929
1940
u16 rx_filter ;
1930
1941
1931
1942
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 ;
1932
1948
};
1933
1949
1934
1950
/* Tx queues may be less or equal to Rx queues */
@@ -1956,23 +1972,14 @@ extern int num_queues;
1956
1972
#define RSS_IPV6_TCP_CAP_MASK \
1957
1973
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY
1958
1974
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
1967
1975
struct bnx2x_func_init_params {
1968
1976
/* 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 ;
1971
1980
1972
- u16 func_flgs ;
1973
1981
u16 func_id ; /* abs fid */
1974
1982
u16 pf_id ;
1975
- u16 spq_prod ; /* valid iff FUNC_FLG_SPQ */
1976
1983
};
1977
1984
1978
1985
#define for_each_cnic_queue (bp , var ) \
@@ -2082,6 +2089,11 @@ struct bnx2x_func_init_params {
2082
2089
int bnx2x_set_mac_one (struct bnx2x * bp , u8 * mac ,
2083
2090
struct bnx2x_vlan_mac_obj * obj , bool set ,
2084
2091
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
+
2085
2097
/**
2086
2098
* bnx2x_del_all_macs - delete all MACs configured for the specific MAC object
2087
2099
*
@@ -2486,6 +2498,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id,
2486
2498
#define VF_ACQUIRE_THRESH 3
2487
2499
#define VF_ACQUIRE_MAC_FILTERS 1
2488
2500
#define VF_ACQUIRE_MC_FILTERS 10
2501
+ #define VF_ACQUIRE_VLAN_FILTERS 2 /* VLAN0 + 'real' VLAN */
2489
2502
2490
2503
#define GOOD_ME_REG (me_reg ) (((me_reg) & ME_REG_VF_VALID) && \
2491
2504
(!((me_reg) & ME_REG_VF_ERR)))
@@ -2596,4 +2609,9 @@ void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb);
2596
2609
#define BNX2X_MAX_PHC_DRIFT 31000000
2597
2610
#define BNX2X_PTP_TX_TIMEOUT
2598
2611
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
+
2599
2617
#endif /* bnx2x.h */
0 commit comments