Skip to content

Commit f9e3008

Browse files
ummakynesdavem330
authored andcommitted
net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload
And any other existing fields in this structure that refer to tc. Specifically: * tc_cls_flower_offload_flow_rule() to flow_cls_offload_flow_rule(). * TC_CLSFLOWER_* to FLOW_CLS_*. * tc_cls_common_offload to tc_cls_common_offload. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0d4fd02 commit f9e3008

File tree

32 files changed

+254
-254
lines changed

32 files changed

+254
-254
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
170170
}
171171

172172
static int bnxt_tc_parse_flow(struct bnxt *bp,
173-
struct tc_cls_flower_offload *tc_flow_cmd,
173+
struct flow_cls_offload *tc_flow_cmd,
174174
struct bnxt_tc_flow *flow)
175175
{
176-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(tc_flow_cmd);
176+
struct flow_rule *rule = flow_cls_offload_flow_rule(tc_flow_cmd);
177177
struct flow_dissector *dissector = rule->match.dissector;
178178

179179
/* KEY_CONTROL and KEY_BASIC are needed for forming a meaningful key */
@@ -1262,7 +1262,7 @@ static void bnxt_tc_set_src_fid(struct bnxt *bp, struct bnxt_tc_flow *flow,
12621262
* The hash-tables are already protected by the rhashtable API.
12631263
*/
12641264
static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
1265-
struct tc_cls_flower_offload *tc_flow_cmd)
1265+
struct flow_cls_offload *tc_flow_cmd)
12661266
{
12671267
struct bnxt_tc_flow_node *new_node, *old_node;
12681268
struct bnxt_tc_info *tc_info = bp->tc_info;
@@ -1348,7 +1348,7 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
13481348
}
13491349

13501350
static int bnxt_tc_del_flow(struct bnxt *bp,
1351-
struct tc_cls_flower_offload *tc_flow_cmd)
1351+
struct flow_cls_offload *tc_flow_cmd)
13521352
{
13531353
struct bnxt_tc_info *tc_info = bp->tc_info;
13541354
struct bnxt_tc_flow_node *flow_node;
@@ -1363,7 +1363,7 @@ static int bnxt_tc_del_flow(struct bnxt *bp,
13631363
}
13641364

13651365
static int bnxt_tc_get_flow_stats(struct bnxt *bp,
1366-
struct tc_cls_flower_offload *tc_flow_cmd)
1366+
struct flow_cls_offload *tc_flow_cmd)
13671367
{
13681368
struct bnxt_tc_flow_stats stats, *curr_stats, *prev_stats;
13691369
struct bnxt_tc_info *tc_info = bp->tc_info;
@@ -1585,14 +1585,14 @@ void bnxt_tc_flow_stats_work(struct bnxt *bp)
15851585
}
15861586

15871587
int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
1588-
struct tc_cls_flower_offload *cls_flower)
1588+
struct flow_cls_offload *cls_flower)
15891589
{
15901590
switch (cls_flower->command) {
1591-
case TC_CLSFLOWER_REPLACE:
1591+
case FLOW_CLS_REPLACE:
15921592
return bnxt_tc_add_flow(bp, src_fid, cls_flower);
1593-
case TC_CLSFLOWER_DESTROY:
1593+
case FLOW_CLS_DESTROY:
15941594
return bnxt_tc_del_flow(bp, cls_flower);
1595-
case TC_CLSFLOWER_STATS:
1595+
case FLOW_CLS_STATS:
15961596
return bnxt_tc_get_flow_stats(bp, cls_flower);
15971597
default:
15981598
return -EOPNOTSUPP;

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct bnxt_tc_flow_node {
196196
};
197197

198198
int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
199-
struct tc_cls_flower_offload *cls_flower);
199+
struct flow_cls_offload *cls_flower);
200200
int bnxt_init_tc(struct bnxt *bp);
201201
void bnxt_shutdown_tc(struct bnxt *bp);
202202
void bnxt_tc_flow_stats_work(struct bnxt *bp);
@@ -209,7 +209,7 @@ static inline bool bnxt_tc_flower_enabled(struct bnxt *bp)
209209
#else /* CONFIG_BNXT_FLOWER_OFFLOAD */
210210

211211
static inline int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
212-
struct tc_cls_flower_offload *cls_flower)
212+
struct flow_cls_offload *cls_flower)
213213
{
214214
return -EOPNOTSUPP;
215215
}

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,14 +3135,14 @@ static int cxgb_set_tx_maxrate(struct net_device *dev, int index, u32 rate)
31353135
}
31363136

31373137
static int cxgb_setup_tc_flower(struct net_device *dev,
3138-
struct tc_cls_flower_offload *cls_flower)
3138+
struct flow_cls_offload *cls_flower)
31393139
{
31403140
switch (cls_flower->command) {
3141-
case TC_CLSFLOWER_REPLACE:
3141+
case FLOW_CLS_REPLACE:
31423142
return cxgb4_tc_flower_replace(dev, cls_flower);
3143-
case TC_CLSFLOWER_DESTROY:
3143+
case FLOW_CLS_DESTROY:
31443144
return cxgb4_tc_flower_destroy(dev, cls_flower);
3145-
case TC_CLSFLOWER_STATS:
3145+
case FLOW_CLS_STATS:
31463146
return cxgb4_tc_flower_stats(dev, cls_flower);
31473147
default:
31483148
return -EOPNOTSUPP;

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ static struct ch_tc_flower_entry *ch_flower_lookup(struct adapter *adap,
8080
}
8181

8282
static void cxgb4_process_flow_match(struct net_device *dev,
83-
struct tc_cls_flower_offload *cls,
83+
struct flow_cls_offload *cls,
8484
struct ch_filter_specification *fs)
8585
{
86-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(cls);
86+
struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
8787
u16 addr_type = 0;
8888

8989
if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CONTROL)) {
@@ -223,9 +223,9 @@ static void cxgb4_process_flow_match(struct net_device *dev,
223223
}
224224

225225
static int cxgb4_validate_flow_match(struct net_device *dev,
226-
struct tc_cls_flower_offload *cls)
226+
struct flow_cls_offload *cls)
227227
{
228-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(cls);
228+
struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
229229
struct flow_dissector *dissector = rule->match.dissector;
230230
u16 ethtype_mask = 0;
231231
u16 ethtype_key = 0;
@@ -378,10 +378,10 @@ static void process_pedit_field(struct ch_filter_specification *fs, u32 val,
378378
}
379379

380380
static void cxgb4_process_flow_actions(struct net_device *in,
381-
struct tc_cls_flower_offload *cls,
381+
struct flow_cls_offload *cls,
382382
struct ch_filter_specification *fs)
383383
{
384-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(cls);
384+
struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
385385
struct flow_action_entry *act;
386386
int i;
387387

@@ -544,9 +544,9 @@ static bool valid_pedit_action(struct net_device *dev,
544544
}
545545

546546
static int cxgb4_validate_flow_actions(struct net_device *dev,
547-
struct tc_cls_flower_offload *cls)
547+
struct flow_cls_offload *cls)
548548
{
549-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(cls);
549+
struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
550550
struct flow_action_entry *act;
551551
bool act_redir = false;
552552
bool act_pedit = false;
@@ -633,7 +633,7 @@ static int cxgb4_validate_flow_actions(struct net_device *dev,
633633
}
634634

635635
int cxgb4_tc_flower_replace(struct net_device *dev,
636-
struct tc_cls_flower_offload *cls)
636+
struct flow_cls_offload *cls)
637637
{
638638
struct adapter *adap = netdev2adap(dev);
639639
struct ch_tc_flower_entry *ch_flower;
@@ -709,7 +709,7 @@ int cxgb4_tc_flower_replace(struct net_device *dev,
709709
}
710710

711711
int cxgb4_tc_flower_destroy(struct net_device *dev,
712-
struct tc_cls_flower_offload *cls)
712+
struct flow_cls_offload *cls)
713713
{
714714
struct adapter *adap = netdev2adap(dev);
715715
struct ch_tc_flower_entry *ch_flower;
@@ -783,7 +783,7 @@ static void ch_flower_stats_cb(struct timer_list *t)
783783
}
784784

785785
int cxgb4_tc_flower_stats(struct net_device *dev,
786-
struct tc_cls_flower_offload *cls)
786+
struct flow_cls_offload *cls)
787787
{
788788
struct adapter *adap = netdev2adap(dev);
789789
struct ch_tc_flower_stats *ofld_stats;

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ struct ch_tc_pedit_fields {
109109
#define PEDIT_UDP_SPORT_DPORT 0x0
110110

111111
int cxgb4_tc_flower_replace(struct net_device *dev,
112-
struct tc_cls_flower_offload *cls);
112+
struct flow_cls_offload *cls);
113113
int cxgb4_tc_flower_destroy(struct net_device *dev,
114-
struct tc_cls_flower_offload *cls);
114+
struct flow_cls_offload *cls);
115115
int cxgb4_tc_flower_stats(struct net_device *dev,
116-
struct tc_cls_flower_offload *cls);
116+
struct flow_cls_offload *cls);
117117

118118
int cxgb4_init_tc_flower(struct adapter *adap);
119119
void cxgb4_cleanup_tc_flower(struct adapter *adap);

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7759,15 +7759,15 @@ int i40e_add_del_cloud_filter_big_buf(struct i40e_vsi *vsi,
77597759
/**
77607760
* i40e_parse_cls_flower - Parse tc flower filters provided by kernel
77617761
* @vsi: Pointer to VSI
7762-
* @cls_flower: Pointer to struct tc_cls_flower_offload
7762+
* @cls_flower: Pointer to struct flow_cls_offload
77637763
* @filter: Pointer to cloud filter structure
77647764
*
77657765
**/
77667766
static int i40e_parse_cls_flower(struct i40e_vsi *vsi,
7767-
struct tc_cls_flower_offload *f,
7767+
struct flow_cls_offload *f,
77687768
struct i40e_cloud_filter *filter)
77697769
{
7770-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(f);
7770+
struct flow_rule *rule = flow_cls_offload_flow_rule(f);
77717771
struct flow_dissector *dissector = rule->match.dissector;
77727772
u16 n_proto_mask = 0, n_proto_key = 0, addr_type = 0;
77737773
struct i40e_pf *pf = vsi->back;
@@ -8001,11 +8001,11 @@ static int i40e_handle_tclass(struct i40e_vsi *vsi, u32 tc,
80018001
/**
80028002
* i40e_configure_clsflower - Configure tc flower filters
80038003
* @vsi: Pointer to VSI
8004-
* @cls_flower: Pointer to struct tc_cls_flower_offload
8004+
* @cls_flower: Pointer to struct flow_cls_offload
80058005
*
80068006
**/
80078007
static int i40e_configure_clsflower(struct i40e_vsi *vsi,
8008-
struct tc_cls_flower_offload *cls_flower)
8008+
struct flow_cls_offload *cls_flower)
80098009
{
80108010
int tc = tc_classid_to_hwtc(vsi->netdev, cls_flower->classid);
80118011
struct i40e_cloud_filter *filter = NULL;
@@ -8097,11 +8097,11 @@ static struct i40e_cloud_filter *i40e_find_cloud_filter(struct i40e_vsi *vsi,
80978097
/**
80988098
* i40e_delete_clsflower - Remove tc flower filters
80998099
* @vsi: Pointer to VSI
8100-
* @cls_flower: Pointer to struct tc_cls_flower_offload
8100+
* @cls_flower: Pointer to struct flow_cls_offload
81018101
*
81028102
**/
81038103
static int i40e_delete_clsflower(struct i40e_vsi *vsi,
8104-
struct tc_cls_flower_offload *cls_flower)
8104+
struct flow_cls_offload *cls_flower)
81058105
{
81068106
struct i40e_cloud_filter *filter = NULL;
81078107
struct i40e_pf *pf = vsi->back;
@@ -8144,16 +8144,16 @@ static int i40e_delete_clsflower(struct i40e_vsi *vsi,
81448144
* @type_data: offload data
81458145
**/
81468146
static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
8147-
struct tc_cls_flower_offload *cls_flower)
8147+
struct flow_cls_offload *cls_flower)
81488148
{
81498149
struct i40e_vsi *vsi = np->vsi;
81508150

81518151
switch (cls_flower->command) {
8152-
case TC_CLSFLOWER_REPLACE:
8152+
case FLOW_CLS_REPLACE:
81538153
return i40e_configure_clsflower(vsi, cls_flower);
8154-
case TC_CLSFLOWER_DESTROY:
8154+
case FLOW_CLS_DESTROY:
81558155
return i40e_delete_clsflower(vsi, cls_flower);
8156-
case TC_CLSFLOWER_STATS:
8156+
case FLOW_CLS_STATS:
81578157
return -EOPNOTSUPP;
81588158
default:
81598159
return -EOPNOTSUPP;

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,14 +2699,14 @@ static int __iavf_setup_tc(struct net_device *netdev, void *type_data)
26992699
/**
27002700
* iavf_parse_cls_flower - Parse tc flower filters provided by kernel
27012701
* @adapter: board private structure
2702-
* @cls_flower: pointer to struct tc_cls_flower_offload
2702+
* @cls_flower: pointer to struct flow_cls_offload
27032703
* @filter: pointer to cloud filter structure
27042704
*/
27052705
static int iavf_parse_cls_flower(struct iavf_adapter *adapter,
2706-
struct tc_cls_flower_offload *f,
2706+
struct flow_cls_offload *f,
27072707
struct iavf_cloud_filter *filter)
27082708
{
2709-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(f);
2709+
struct flow_rule *rule = flow_cls_offload_flow_rule(f);
27102710
struct flow_dissector *dissector = rule->match.dissector;
27112711
u16 n_proto_mask = 0;
27122712
u16 n_proto_key = 0;
@@ -2971,10 +2971,10 @@ static int iavf_handle_tclass(struct iavf_adapter *adapter, u32 tc,
29712971
/**
29722972
* iavf_configure_clsflower - Add tc flower filters
29732973
* @adapter: board private structure
2974-
* @cls_flower: Pointer to struct tc_cls_flower_offload
2974+
* @cls_flower: Pointer to struct flow_cls_offload
29752975
*/
29762976
static int iavf_configure_clsflower(struct iavf_adapter *adapter,
2977-
struct tc_cls_flower_offload *cls_flower)
2977+
struct flow_cls_offload *cls_flower)
29782978
{
29792979
int tc = tc_classid_to_hwtc(adapter->netdev, cls_flower->classid);
29802980
struct iavf_cloud_filter *filter = NULL;
@@ -3050,10 +3050,10 @@ static struct iavf_cloud_filter *iavf_find_cf(struct iavf_adapter *adapter,
30503050
/**
30513051
* iavf_delete_clsflower - Remove tc flower filters
30523052
* @adapter: board private structure
3053-
* @cls_flower: Pointer to struct tc_cls_flower_offload
3053+
* @cls_flower: Pointer to struct flow_cls_offload
30543054
*/
30553055
static int iavf_delete_clsflower(struct iavf_adapter *adapter,
3056-
struct tc_cls_flower_offload *cls_flower)
3056+
struct flow_cls_offload *cls_flower)
30573057
{
30583058
struct iavf_cloud_filter *filter = NULL;
30593059
int err = 0;
@@ -3077,17 +3077,17 @@ static int iavf_delete_clsflower(struct iavf_adapter *adapter,
30773077
* @type_data: offload data
30783078
*/
30793079
static int iavf_setup_tc_cls_flower(struct iavf_adapter *adapter,
3080-
struct tc_cls_flower_offload *cls_flower)
3080+
struct flow_cls_offload *cls_flower)
30813081
{
30823082
if (cls_flower->common.chain_index)
30833083
return -EOPNOTSUPP;
30843084

30853085
switch (cls_flower->command) {
3086-
case TC_CLSFLOWER_REPLACE:
3086+
case FLOW_CLS_REPLACE:
30873087
return iavf_configure_clsflower(adapter, cls_flower);
3088-
case TC_CLSFLOWER_DESTROY:
3088+
case FLOW_CLS_DESTROY:
30893089
return iavf_delete_clsflower(adapter, cls_flower);
3090-
case TC_CLSFLOWER_STATS:
3090+
case FLOW_CLS_STATS:
30913091
return -EOPNOTSUPP;
30923092
default:
30933093
return -EOPNOTSUPP;

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,11 +2578,11 @@ static int igb_offload_cbs(struct igb_adapter *adapter,
25782578
#define VLAN_PRIO_FULL_MASK (0x07)
25792579

25802580
static int igb_parse_cls_flower(struct igb_adapter *adapter,
2581-
struct tc_cls_flower_offload *f,
2581+
struct flow_cls_offload *f,
25822582
int traffic_class,
25832583
struct igb_nfc_filter *input)
25842584
{
2585-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(f);
2585+
struct flow_rule *rule = flow_cls_offload_flow_rule(f);
25862586
struct flow_dissector *dissector = rule->match.dissector;
25872587
struct netlink_ext_ack *extack = f->common.extack;
25882588

@@ -2660,7 +2660,7 @@ static int igb_parse_cls_flower(struct igb_adapter *adapter,
26602660
}
26612661

26622662
static int igb_configure_clsflower(struct igb_adapter *adapter,
2663-
struct tc_cls_flower_offload *cls_flower)
2663+
struct flow_cls_offload *cls_flower)
26642664
{
26652665
struct netlink_ext_ack *extack = cls_flower->common.extack;
26662666
struct igb_nfc_filter *filter, *f;
@@ -2722,7 +2722,7 @@ static int igb_configure_clsflower(struct igb_adapter *adapter,
27222722
}
27232723

27242724
static int igb_delete_clsflower(struct igb_adapter *adapter,
2725-
struct tc_cls_flower_offload *cls_flower)
2725+
struct flow_cls_offload *cls_flower)
27262726
{
27272727
struct igb_nfc_filter *filter;
27282728
int err;
@@ -2752,14 +2752,14 @@ static int igb_delete_clsflower(struct igb_adapter *adapter,
27522752
}
27532753

27542754
static int igb_setup_tc_cls_flower(struct igb_adapter *adapter,
2755-
struct tc_cls_flower_offload *cls_flower)
2755+
struct flow_cls_offload *cls_flower)
27562756
{
27572757
switch (cls_flower->command) {
2758-
case TC_CLSFLOWER_REPLACE:
2758+
case FLOW_CLS_REPLACE:
27592759
return igb_configure_clsflower(adapter, cls_flower);
2760-
case TC_CLSFLOWER_DESTROY:
2760+
case FLOW_CLS_DESTROY:
27612761
return igb_delete_clsflower(adapter, cls_flower);
2762-
case TC_CLSFLOWER_STATS:
2762+
case FLOW_CLS_STATS:
27632763
return -EOPNOTSUPP;
27642764
default:
27652765
return -EOPNOTSUPP;

drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ int mlx5e_tc_tun_init_encap_attr(struct net_device *tunnel_dev,
452452
int mlx5e_tc_tun_parse(struct net_device *filter_dev,
453453
struct mlx5e_priv *priv,
454454
struct mlx5_flow_spec *spec,
455-
struct tc_cls_flower_offload *f,
455+
struct flow_cls_offload *f,
456456
void *headers_c,
457457
void *headers_v, u8 *match_level)
458458
{
@@ -489,11 +489,11 @@ int mlx5e_tc_tun_parse(struct net_device *filter_dev,
489489

490490
int mlx5e_tc_tun_parse_udp_ports(struct mlx5e_priv *priv,
491491
struct mlx5_flow_spec *spec,
492-
struct tc_cls_flower_offload *f,
492+
struct flow_cls_offload *f,
493493
void *headers_c,
494494
void *headers_v)
495495
{
496-
struct flow_rule *rule = tc_cls_flower_offload_flow_rule(f);
496+
struct flow_rule *rule = flow_cls_offload_flow_rule(f);
497497
struct netlink_ext_ack *extack = f->common.extack;
498498
struct flow_match_ports enc_ports;
499499

0 commit comments

Comments
 (0)