@@ -4803,8 +4803,8 @@ static void bnxt_free_ntp_fltrs(struct bnxt *bp, bool irq_reinit)
4803
4803
struct bnxt_ntuple_filter * fltr ;
4804
4804
4805
4805
head = & bp -> ntp_fltr_hash_tbl [i ];
4806
- hlist_for_each_entry_safe (fltr , tmp , head , hash ) {
4807
- hlist_del (& fltr -> hash );
4806
+ hlist_for_each_entry_safe (fltr , tmp , head , base . hash ) {
4807
+ hlist_del (& fltr -> base . hash );
4808
4808
kfree (fltr );
4809
4809
}
4810
4810
}
@@ -5301,7 +5301,7 @@ static int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp,
5301
5301
if (rc )
5302
5302
return rc ;
5303
5303
5304
- req -> ntuple_filter_id = fltr -> filter_id ;
5304
+ req -> ntuple_filter_id = fltr -> base . filter_id ;
5305
5305
return hwrm_req_send (bp , req );
5306
5306
}
5307
5307
@@ -5342,9 +5342,9 @@ static int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp,
5342
5342
5343
5343
if (bp -> fw_cap & BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX_V2 ) {
5344
5344
flags = CFA_NTUPLE_FILTER_ALLOC_REQ_FLAGS_DEST_RFS_RING_IDX ;
5345
- req -> dst_id = cpu_to_le16 (fltr -> rxq );
5345
+ req -> dst_id = cpu_to_le16 (fltr -> base . rxq );
5346
5346
} else {
5347
- vnic = & bp -> vnic_info [fltr -> rxq + 1 ];
5347
+ vnic = & bp -> vnic_info [fltr -> base . rxq + 1 ];
5348
5348
req -> dst_id = cpu_to_le16 (vnic -> fw_vnic_id );
5349
5349
}
5350
5350
req -> flags = cpu_to_le32 (flags );
@@ -5389,7 +5389,7 @@ static int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp,
5389
5389
resp = hwrm_req_hold (bp , req );
5390
5390
rc = hwrm_req_send (bp , req );
5391
5391
if (!rc )
5392
- fltr -> filter_id = resp -> ntuple_filter_id ;
5392
+ fltr -> base . filter_id = resp -> ntuple_filter_id ;
5393
5393
hwrm_req_drop (bp , req );
5394
5394
return rc ;
5395
5395
}
@@ -13653,9 +13653,9 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
13653
13653
idx = skb_get_hash_raw (skb ) & BNXT_NTP_FLTR_HASH_MASK ;
13654
13654
head = & bp -> ntp_fltr_hash_tbl [idx ];
13655
13655
rcu_read_lock ();
13656
- hlist_for_each_entry_rcu (fltr , head , hash ) {
13656
+ hlist_for_each_entry_rcu (fltr , head , base . hash ) {
13657
13657
if (bnxt_fltr_match (fltr , new_fltr )) {
13658
- rc = fltr -> sw_id ;
13658
+ rc = fltr -> base . sw_id ;
13659
13659
rcu_read_unlock ();
13660
13660
goto err_free ;
13661
13661
}
@@ -13671,17 +13671,18 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
13671
13671
goto err_free ;
13672
13672
}
13673
13673
13674
- new_fltr -> sw_id = (u16 )bit_id ;
13674
+ new_fltr -> base . sw_id = (u16 )bit_id ;
13675
13675
new_fltr -> flow_id = flow_id ;
13676
13676
new_fltr -> l2_fltr_idx = l2_idx ;
13677
- new_fltr -> rxq = rxq_index ;
13678
- hlist_add_head_rcu (& new_fltr -> hash , head );
13677
+ new_fltr -> base .rxq = rxq_index ;
13678
+ new_fltr -> base .type = BNXT_FLTR_TYPE_NTUPLE ;
13679
+ hlist_add_head_rcu (& new_fltr -> base .hash , head );
13679
13680
bp -> ntp_fltr_count ++ ;
13680
13681
spin_unlock_bh (& bp -> ntp_fltr_lock );
13681
13682
13682
13683
bnxt_queue_sp_work (bp , BNXT_RX_NTP_FLTR_SP_EVENT );
13683
13684
13684
- return new_fltr -> sw_id ;
13685
+ return new_fltr -> base . sw_id ;
13685
13686
13686
13687
err_free :
13687
13688
kfree (new_fltr );
@@ -13699,13 +13700,13 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
13699
13700
int rc ;
13700
13701
13701
13702
head = & bp -> ntp_fltr_hash_tbl [i ];
13702
- hlist_for_each_entry_safe (fltr , tmp , head , hash ) {
13703
+ hlist_for_each_entry_safe (fltr , tmp , head , base . hash ) {
13703
13704
bool del = false;
13704
13705
13705
- if (test_bit (BNXT_FLTR_VALID , & fltr -> state )) {
13706
- if (rps_may_expire_flow (bp -> dev , fltr -> rxq ,
13706
+ if (test_bit (BNXT_FLTR_VALID , & fltr -> base . state )) {
13707
+ if (rps_may_expire_flow (bp -> dev , fltr -> base . rxq ,
13707
13708
fltr -> flow_id ,
13708
- fltr -> sw_id )) {
13709
+ fltr -> base . sw_id )) {
13709
13710
bnxt_hwrm_cfa_ntuple_filter_free (bp ,
13710
13711
fltr );
13711
13712
del = true;
@@ -13716,16 +13717,16 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
13716
13717
if (rc )
13717
13718
del = true;
13718
13719
else
13719
- set_bit (BNXT_FLTR_VALID , & fltr -> state );
13720
+ set_bit (BNXT_FLTR_VALID , & fltr -> base . state );
13720
13721
}
13721
13722
13722
13723
if (del ) {
13723
13724
spin_lock_bh (& bp -> ntp_fltr_lock );
13724
- hlist_del_rcu (& fltr -> hash );
13725
+ hlist_del_rcu (& fltr -> base . hash );
13725
13726
bp -> ntp_fltr_count -- ;
13726
13727
spin_unlock_bh (& bp -> ntp_fltr_lock );
13727
13728
synchronize_rcu ();
13728
- clear_bit (fltr -> sw_id , bp -> ntp_fltr_bmap );
13729
+ clear_bit (fltr -> base . sw_id , bp -> ntp_fltr_bmap );
13729
13730
kfree (fltr );
13730
13731
}
13731
13732
}
0 commit comments