@@ -94,7 +94,7 @@ mlx5e_fs_tt_redirect_udp_add_rule(struct mlx5e_priv *priv,
94
94
if (!spec )
95
95
return ERR_PTR (- ENOMEM );
96
96
97
- fs_udp = priv -> fs . udp ;
97
+ fs_udp = priv -> fs -> udp ;
98
98
ft = fs_udp -> tables [type ].t ;
99
99
100
100
fs_udp_set_dport_flow (spec , type , d_port );
@@ -121,10 +121,10 @@ static int fs_udp_add_default_rule(struct mlx5e_priv *priv, enum fs_udp_type typ
121
121
struct mlx5e_fs_udp * fs_udp ;
122
122
int err ;
123
123
124
- fs_udp = priv -> fs . udp ;
124
+ fs_udp = priv -> fs -> udp ;
125
125
fs_udp_t = & fs_udp -> tables [type ];
126
126
127
- dest = mlx5_ttc_get_default_dest (priv -> fs . ttc , fs_udp2tt (type ));
127
+ dest = mlx5_ttc_get_default_dest (priv -> fs -> ttc , fs_udp2tt (type ));
128
128
rule = mlx5_add_flow_rules (fs_udp_t -> t , NULL , & flow_act , & dest , 1 );
129
129
if (IS_ERR (rule )) {
130
130
err = PTR_ERR (rule );
@@ -208,7 +208,7 @@ static int fs_udp_create_groups(struct mlx5e_flow_table *ft, enum fs_udp_type ty
208
208
209
209
static int fs_udp_create_table (struct mlx5e_priv * priv , enum fs_udp_type type )
210
210
{
211
- struct mlx5e_flow_table * ft = & priv -> fs . udp -> tables [type ];
211
+ struct mlx5e_flow_table * ft = & priv -> fs -> udp -> tables [type ];
212
212
struct mlx5_flow_table_attr ft_attr = {};
213
213
int err ;
214
214
@@ -218,7 +218,7 @@ static int fs_udp_create_table(struct mlx5e_priv *priv, enum fs_udp_type type)
218
218
ft_attr .level = MLX5E_FS_TT_UDP_FT_LEVEL ;
219
219
ft_attr .prio = MLX5E_NIC_PRIO ;
220
220
221
- ft -> t = mlx5_create_flow_table (priv -> fs . ns , & ft_attr );
221
+ ft -> t = mlx5_create_flow_table (priv -> fs -> ns , & ft_attr );
222
222
if (IS_ERR (ft -> t )) {
223
223
err = PTR_ERR (ft -> t );
224
224
ft -> t = NULL ;
@@ -259,7 +259,7 @@ static int fs_udp_disable(struct mlx5e_priv *priv)
259
259
260
260
for (i = 0 ; i < FS_UDP_NUM_TYPES ; i ++ ) {
261
261
/* Modify ttc rules destination to point back to the indir TIRs */
262
- err = mlx5_ttc_fwd_default_dest (priv -> fs . ttc , fs_udp2tt (i ));
262
+ err = mlx5_ttc_fwd_default_dest (priv -> fs -> ttc , fs_udp2tt (i ));
263
263
if (err ) {
264
264
netdev_err (priv -> netdev ,
265
265
"%s: modify ttc[%d] default destination failed, err(%d)\n" ,
@@ -278,10 +278,10 @@ static int fs_udp_enable(struct mlx5e_priv *priv)
278
278
279
279
dest .type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE ;
280
280
for (i = 0 ; i < FS_UDP_NUM_TYPES ; i ++ ) {
281
- dest .ft = priv -> fs . udp -> tables [i ].t ;
281
+ dest .ft = priv -> fs -> udp -> tables [i ].t ;
282
282
283
283
/* Modify ttc rules destination to point on the accel_fs FTs */
284
- err = mlx5_ttc_fwd_dest (priv -> fs . ttc , fs_udp2tt (i ), & dest );
284
+ err = mlx5_ttc_fwd_dest (priv -> fs -> ttc , fs_udp2tt (i ), & dest );
285
285
if (err ) {
286
286
netdev_err (priv -> netdev ,
287
287
"%s: modify ttc[%d] destination to accel failed, err(%d)\n" ,
@@ -294,7 +294,7 @@ static int fs_udp_enable(struct mlx5e_priv *priv)
294
294
295
295
void mlx5e_fs_tt_redirect_udp_destroy (struct mlx5e_priv * priv )
296
296
{
297
- struct mlx5e_fs_udp * fs_udp = priv -> fs . udp ;
297
+ struct mlx5e_fs_udp * fs_udp = priv -> fs -> udp ;
298
298
int i ;
299
299
300
300
if (!fs_udp )
@@ -309,20 +309,20 @@ void mlx5e_fs_tt_redirect_udp_destroy(struct mlx5e_priv *priv)
309
309
fs_udp_destroy_table (fs_udp , i );
310
310
311
311
kfree (fs_udp );
312
- priv -> fs . udp = NULL ;
312
+ priv -> fs -> udp = NULL ;
313
313
}
314
314
315
315
int mlx5e_fs_tt_redirect_udp_create (struct mlx5e_priv * priv )
316
316
{
317
317
int i , err ;
318
318
319
- if (priv -> fs . udp ) {
320
- priv -> fs . udp -> ref_cnt ++ ;
319
+ if (priv -> fs -> udp ) {
320
+ priv -> fs -> udp -> ref_cnt ++ ;
321
321
return 0 ;
322
322
}
323
323
324
- priv -> fs . udp = kzalloc (sizeof (* priv -> fs . udp ), GFP_KERNEL );
325
- if (!priv -> fs . udp )
324
+ priv -> fs -> udp = kzalloc (sizeof (* priv -> fs -> udp ), GFP_KERNEL );
325
+ if (!priv -> fs -> udp )
326
326
return - ENOMEM ;
327
327
328
328
for (i = 0 ; i < FS_UDP_NUM_TYPES ; i ++ ) {
@@ -335,16 +335,16 @@ int mlx5e_fs_tt_redirect_udp_create(struct mlx5e_priv *priv)
335
335
if (err )
336
336
goto err_destroy_tables ;
337
337
338
- priv -> fs . udp -> ref_cnt = 1 ;
338
+ priv -> fs -> udp -> ref_cnt = 1 ;
339
339
340
340
return 0 ;
341
341
342
342
err_destroy_tables :
343
343
while (-- i >= 0 )
344
- fs_udp_destroy_table (priv -> fs . udp , i );
344
+ fs_udp_destroy_table (priv -> fs -> udp , i );
345
345
346
- kfree (priv -> fs . udp );
347
- priv -> fs . udp = NULL ;
346
+ kfree (priv -> fs -> udp );
347
+ priv -> fs -> udp = NULL ;
348
348
return err ;
349
349
}
350
350
@@ -371,7 +371,7 @@ mlx5e_fs_tt_redirect_any_add_rule(struct mlx5e_priv *priv,
371
371
if (!spec )
372
372
return ERR_PTR (- ENOMEM );
373
373
374
- fs_any = priv -> fs . any ;
374
+ fs_any = priv -> fs -> any ;
375
375
ft = fs_any -> table .t ;
376
376
377
377
fs_any_set_ethertype_flow (spec , ether_type );
@@ -398,10 +398,10 @@ static int fs_any_add_default_rule(struct mlx5e_priv *priv)
398
398
struct mlx5e_fs_any * fs_any ;
399
399
int err ;
400
400
401
- fs_any = priv -> fs . any ;
401
+ fs_any = priv -> fs -> any ;
402
402
fs_any_t = & fs_any -> table ;
403
403
404
- dest = mlx5_ttc_get_default_dest (priv -> fs . ttc , MLX5_TT_ANY );
404
+ dest = mlx5_ttc_get_default_dest (priv -> fs -> ttc , MLX5_TT_ANY );
405
405
rule = mlx5_add_flow_rules (fs_any_t -> t , NULL , & flow_act , & dest , 1 );
406
406
if (IS_ERR (rule )) {
407
407
err = PTR_ERR (rule );
@@ -474,7 +474,7 @@ static int fs_any_create_groups(struct mlx5e_flow_table *ft)
474
474
475
475
static int fs_any_create_table (struct mlx5e_priv * priv )
476
476
{
477
- struct mlx5e_flow_table * ft = & priv -> fs . any -> table ;
477
+ struct mlx5e_flow_table * ft = & priv -> fs -> any -> table ;
478
478
struct mlx5_flow_table_attr ft_attr = {};
479
479
int err ;
480
480
@@ -484,7 +484,7 @@ static int fs_any_create_table(struct mlx5e_priv *priv)
484
484
ft_attr .level = MLX5E_FS_TT_ANY_FT_LEVEL ;
485
485
ft_attr .prio = MLX5E_NIC_PRIO ;
486
486
487
- ft -> t = mlx5_create_flow_table (priv -> fs . ns , & ft_attr );
487
+ ft -> t = mlx5_create_flow_table (priv -> fs -> ns , & ft_attr );
488
488
if (IS_ERR (ft -> t )) {
489
489
err = PTR_ERR (ft -> t );
490
490
ft -> t = NULL ;
@@ -514,7 +514,7 @@ static int fs_any_disable(struct mlx5e_priv *priv)
514
514
int err ;
515
515
516
516
/* Modify ttc rules destination to point back to the indir TIRs */
517
- err = mlx5_ttc_fwd_default_dest (priv -> fs . ttc , MLX5_TT_ANY );
517
+ err = mlx5_ttc_fwd_default_dest (priv -> fs -> ttc , MLX5_TT_ANY );
518
518
if (err ) {
519
519
netdev_err (priv -> netdev ,
520
520
"%s: modify ttc[%d] default destination failed, err(%d)\n" ,
@@ -530,10 +530,10 @@ static int fs_any_enable(struct mlx5e_priv *priv)
530
530
int err ;
531
531
532
532
dest .type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE ;
533
- dest .ft = priv -> fs . any -> table .t ;
533
+ dest .ft = priv -> fs -> any -> table .t ;
534
534
535
535
/* Modify ttc rules destination to point on the accel_fs FTs */
536
- err = mlx5_ttc_fwd_dest (priv -> fs . ttc , MLX5_TT_ANY , & dest );
536
+ err = mlx5_ttc_fwd_dest (priv -> fs -> ttc , MLX5_TT_ANY , & dest );
537
537
if (err ) {
538
538
netdev_err (priv -> netdev ,
539
539
"%s: modify ttc[%d] destination to accel failed, err(%d)\n" ,
@@ -555,7 +555,7 @@ static void fs_any_destroy_table(struct mlx5e_fs_any *fs_any)
555
555
556
556
void mlx5e_fs_tt_redirect_any_destroy (struct mlx5e_priv * priv )
557
557
{
558
- struct mlx5e_fs_any * fs_any = priv -> fs . any ;
558
+ struct mlx5e_fs_any * fs_any = priv -> fs -> any ;
559
559
560
560
if (!fs_any )
561
561
return ;
@@ -568,20 +568,20 @@ void mlx5e_fs_tt_redirect_any_destroy(struct mlx5e_priv *priv)
568
568
fs_any_destroy_table (fs_any );
569
569
570
570
kfree (fs_any );
571
- priv -> fs . any = NULL ;
571
+ priv -> fs -> any = NULL ;
572
572
}
573
573
574
574
int mlx5e_fs_tt_redirect_any_create (struct mlx5e_priv * priv )
575
575
{
576
576
int err ;
577
577
578
- if (priv -> fs . any ) {
579
- priv -> fs . any -> ref_cnt ++ ;
578
+ if (priv -> fs -> any ) {
579
+ priv -> fs -> any -> ref_cnt ++ ;
580
580
return 0 ;
581
581
}
582
582
583
- priv -> fs . any = kzalloc (sizeof (* priv -> fs . any ), GFP_KERNEL );
584
- if (!priv -> fs . any )
583
+ priv -> fs -> any = kzalloc (sizeof (* priv -> fs -> any ), GFP_KERNEL );
584
+ if (!priv -> fs -> any )
585
585
return - ENOMEM ;
586
586
587
587
err = fs_any_create_table (priv );
@@ -592,14 +592,14 @@ int mlx5e_fs_tt_redirect_any_create(struct mlx5e_priv *priv)
592
592
if (err )
593
593
goto err_destroy_table ;
594
594
595
- priv -> fs . any -> ref_cnt = 1 ;
595
+ priv -> fs -> any -> ref_cnt = 1 ;
596
596
597
597
return 0 ;
598
598
599
599
err_destroy_table :
600
- fs_any_destroy_table (priv -> fs . any );
600
+ fs_any_destroy_table (priv -> fs -> any );
601
601
602
- kfree (priv -> fs . any );
603
- priv -> fs . any = NULL ;
602
+ kfree (priv -> fs -> any );
603
+ priv -> fs -> any = NULL ;
604
604
return err ;
605
605
}
0 commit comments