3
3
4
4
/* ethtool support for i40e */
5
5
6
+ #include <linux/net/intel/libie/pctype.h>
6
7
#include "i40e_devids.h"
7
8
#include "i40e_diag.h"
8
9
#include "i40e_txrx_common.h"
@@ -3146,16 +3147,16 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
3146
3147
3147
3148
switch (cmd -> flow_type ) {
3148
3149
case TCP_V4_FLOW :
3149
- flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP ;
3150
+ flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP ;
3150
3151
break ;
3151
3152
case UDP_V4_FLOW :
3152
- flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP ;
3153
+ flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP ;
3153
3154
break ;
3154
3155
case TCP_V6_FLOW :
3155
- flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_TCP ;
3156
+ flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP ;
3156
3157
break ;
3157
3158
case UDP_V6_FLOW :
3158
- flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_UDP ;
3159
+ flow_pctype = LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP ;
3159
3160
break ;
3160
3161
case SCTP_V4_FLOW :
3161
3162
case AH_ESP_V4_FLOW :
@@ -3412,28 +3413,28 @@ static int i40e_get_ethtool_fdir_entry(struct i40e_pf *pf,
3412
3413
3413
3414
switch (rule -> flow_type ) {
3414
3415
case SCTP_V4_FLOW :
3415
- index = I40E_FILTER_PCTYPE_NONF_IPV4_SCTP ;
3416
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP ;
3416
3417
break ;
3417
3418
case TCP_V4_FLOW :
3418
- index = I40E_FILTER_PCTYPE_NONF_IPV4_TCP ;
3419
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP ;
3419
3420
break ;
3420
3421
case UDP_V4_FLOW :
3421
- index = I40E_FILTER_PCTYPE_NONF_IPV4_UDP ;
3422
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP ;
3422
3423
break ;
3423
3424
case SCTP_V6_FLOW :
3424
- index = I40E_FILTER_PCTYPE_NONF_IPV6_SCTP ;
3425
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP ;
3425
3426
break ;
3426
3427
case TCP_V6_FLOW :
3427
- index = I40E_FILTER_PCTYPE_NONF_IPV6_TCP ;
3428
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP ;
3428
3429
break ;
3429
3430
case UDP_V6_FLOW :
3430
- index = I40E_FILTER_PCTYPE_NONF_IPV6_UDP ;
3431
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP ;
3431
3432
break ;
3432
3433
case IP_USER_FLOW :
3433
- index = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER ;
3434
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER ;
3434
3435
break ;
3435
3436
case IPV6_USER_FLOW :
3436
- index = I40E_FILTER_PCTYPE_NONF_IPV6_OTHER ;
3437
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER ;
3437
3438
break ;
3438
3439
default :
3439
3440
/* If we have stored a filter with a flow type not listed here
@@ -3643,40 +3644,40 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
3643
3644
3644
3645
switch (nfc -> flow_type ) {
3645
3646
case TCP_V4_FLOW :
3646
- set_bit (I40E_FILTER_PCTYPE_NONF_IPV4_TCP , flow_pctypes );
3647
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP , flow_pctypes );
3647
3648
if (test_bit (I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE ,
3648
3649
pf -> hw .caps ))
3649
- set_bit (I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK ,
3650
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK ,
3650
3651
flow_pctypes );
3651
3652
break ;
3652
3653
case TCP_V6_FLOW :
3653
- set_bit (I40E_FILTER_PCTYPE_NONF_IPV6_TCP , flow_pctypes );
3654
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP , flow_pctypes );
3654
3655
if (test_bit (I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE ,
3655
3656
pf -> hw .caps ))
3656
- set_bit (I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK ,
3657
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK ,
3657
3658
flow_pctypes );
3658
3659
break ;
3659
3660
case UDP_V4_FLOW :
3660
- set_bit (I40E_FILTER_PCTYPE_NONF_IPV4_UDP , flow_pctypes );
3661
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP , flow_pctypes );
3661
3662
if (test_bit (I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE ,
3662
3663
pf -> hw .caps )) {
3663
- set_bit (I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP ,
3664
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP ,
3664
3665
flow_pctypes );
3665
- set_bit (I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP ,
3666
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP ,
3666
3667
flow_pctypes );
3667
3668
}
3668
- hena |= BIT_ULL (I40E_FILTER_PCTYPE_FRAG_IPV4 );
3669
+ hena |= BIT_ULL (LIBIE_FILTER_PCTYPE_FRAG_IPV4 );
3669
3670
break ;
3670
3671
case UDP_V6_FLOW :
3671
- set_bit (I40E_FILTER_PCTYPE_NONF_IPV6_UDP , flow_pctypes );
3672
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP , flow_pctypes );
3672
3673
if (test_bit (I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE ,
3673
3674
pf -> hw .caps )) {
3674
- set_bit (I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP ,
3675
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP ,
3675
3676
flow_pctypes );
3676
- set_bit (I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP ,
3677
+ set_bit (LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP ,
3677
3678
flow_pctypes );
3678
3679
}
3679
- hena |= BIT_ULL (I40E_FILTER_PCTYPE_FRAG_IPV6 );
3680
+ hena |= BIT_ULL (LIBIE_FILTER_PCTYPE_FRAG_IPV6 );
3680
3681
break ;
3681
3682
case AH_ESP_V4_FLOW :
3682
3683
case AH_V4_FLOW :
@@ -3685,7 +3686,7 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
3685
3686
if ((nfc -> data & RXH_L4_B_0_1 ) ||
3686
3687
(nfc -> data & RXH_L4_B_2_3 ))
3687
3688
return - EINVAL ;
3688
- hena |= BIT_ULL (I40E_FILTER_PCTYPE_NONF_IPV4_OTHER );
3689
+ hena |= BIT_ULL (LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER );
3689
3690
break ;
3690
3691
case AH_ESP_V6_FLOW :
3691
3692
case AH_V6_FLOW :
@@ -3694,15 +3695,15 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
3694
3695
if ((nfc -> data & RXH_L4_B_0_1 ) ||
3695
3696
(nfc -> data & RXH_L4_B_2_3 ))
3696
3697
return - EINVAL ;
3697
- hena |= BIT_ULL (I40E_FILTER_PCTYPE_NONF_IPV6_OTHER );
3698
+ hena |= BIT_ULL (LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER );
3698
3699
break ;
3699
3700
case IPV4_FLOW :
3700
- hena |= BIT_ULL (I40E_FILTER_PCTYPE_NONF_IPV4_OTHER ) |
3701
- BIT_ULL (I40E_FILTER_PCTYPE_FRAG_IPV4 );
3701
+ hena |= BIT_ULL (LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER ) |
3702
+ BIT_ULL (LIBIE_FILTER_PCTYPE_FRAG_IPV4 );
3702
3703
break ;
3703
3704
case IPV6_FLOW :
3704
- hena |= BIT_ULL (I40E_FILTER_PCTYPE_NONF_IPV6_OTHER ) |
3705
- BIT_ULL (I40E_FILTER_PCTYPE_FRAG_IPV6 );
3705
+ hena |= BIT_ULL (LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER ) |
3706
+ BIT_ULL (LIBIE_FILTER_PCTYPE_FRAG_IPV6 );
3706
3707
break ;
3707
3708
default :
3708
3709
return - EINVAL ;
@@ -4312,36 +4313,36 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
4312
4313
4313
4314
switch (fsp -> flow_type & ~FLOW_EXT ) {
4314
4315
case SCTP_V4_FLOW :
4315
- index = I40E_FILTER_PCTYPE_NONF_IPV4_SCTP ;
4316
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP ;
4316
4317
fdir_filter_count = & pf -> fd_sctp4_filter_cnt ;
4317
4318
break ;
4318
4319
case TCP_V4_FLOW :
4319
- index = I40E_FILTER_PCTYPE_NONF_IPV4_TCP ;
4320
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP ;
4320
4321
fdir_filter_count = & pf -> fd_tcp4_filter_cnt ;
4321
4322
break ;
4322
4323
case UDP_V4_FLOW :
4323
- index = I40E_FILTER_PCTYPE_NONF_IPV4_UDP ;
4324
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP ;
4324
4325
fdir_filter_count = & pf -> fd_udp4_filter_cnt ;
4325
4326
break ;
4326
4327
case SCTP_V6_FLOW :
4327
- index = I40E_FILTER_PCTYPE_NONF_IPV6_SCTP ;
4328
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP ;
4328
4329
fdir_filter_count = & pf -> fd_sctp6_filter_cnt ;
4329
4330
break ;
4330
4331
case TCP_V6_FLOW :
4331
- index = I40E_FILTER_PCTYPE_NONF_IPV6_TCP ;
4332
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP ;
4332
4333
fdir_filter_count = & pf -> fd_tcp6_filter_cnt ;
4333
4334
break ;
4334
4335
case UDP_V6_FLOW :
4335
- index = I40E_FILTER_PCTYPE_NONF_IPV6_UDP ;
4336
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP ;
4336
4337
fdir_filter_count = & pf -> fd_udp6_filter_cnt ;
4337
4338
break ;
4338
4339
case IP_USER_FLOW :
4339
- index = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER ;
4340
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER ;
4340
4341
fdir_filter_count = & pf -> fd_ip4_filter_cnt ;
4341
4342
flex_l3 = true;
4342
4343
break ;
4343
4344
case IPV6_USER_FLOW :
4344
- index = I40E_FILTER_PCTYPE_NONF_IPV6_OTHER ;
4345
+ index = LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER ;
4345
4346
fdir_filter_count = & pf -> fd_ip6_filter_cnt ;
4346
4347
flex_l3 = true;
4347
4348
break ;
@@ -4677,8 +4678,8 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
4677
4678
* separate support, we'll always assume and enforce that the two flow
4678
4679
* types must have matching input sets.
4679
4680
*/
4680
- if (index == I40E_FILTER_PCTYPE_NONF_IPV4_OTHER )
4681
- i40e_write_fd_input_set (pf , I40E_FILTER_PCTYPE_FRAG_IPV4 ,
4681
+ if (index == LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER )
4682
+ i40e_write_fd_input_set (pf , LIBIE_FILTER_PCTYPE_FRAG_IPV4 ,
4682
4683
new_mask );
4683
4684
4684
4685
/* Add the new offset and update table, if necessary */
0 commit comments