16
16
* @vf: pointer to VF struct
17
17
*
18
18
* This function adds advanced rule that forwards packets with
19
- * VF's VSI index to the corresponding switchdev ctrl VSI queue.
19
+ * VF's VSI index to the corresponding eswitch ctrl VSI queue.
20
20
*/
21
21
static int
22
22
ice_eswitch_add_vf_sp_rule (struct ice_pf * pf , struct ice_vf * vf )
23
23
{
24
- struct ice_vsi * ctrl_vsi = pf -> switchdev .control_vsi ;
24
+ struct ice_vsi * ctrl_vsi = pf -> eswitch .control_vsi ;
25
25
struct ice_adv_rule_info rule_info = { 0 };
26
26
struct ice_adv_lkup_elem * list ;
27
27
struct ice_hw * hw = & pf -> hw ;
@@ -59,7 +59,7 @@ ice_eswitch_add_vf_sp_rule(struct ice_pf *pf, struct ice_vf *vf)
59
59
* @vf: pointer to the VF struct
60
60
*
61
61
* Delete the advanced rule that was used to forward packets with the VF's VSI
62
- * index to the corresponding switchdev ctrl VSI queue.
62
+ * index to the corresponding eswitch ctrl VSI queue.
63
63
*/
64
64
static void ice_eswitch_del_vf_sp_rule (struct ice_vf * vf )
65
65
{
@@ -70,26 +70,26 @@ static void ice_eswitch_del_vf_sp_rule(struct ice_vf *vf)
70
70
}
71
71
72
72
/**
73
- * ice_eswitch_setup_env - configure switchdev HW filters
73
+ * ice_eswitch_setup_env - configure eswitch HW filters
74
74
* @pf: pointer to PF struct
75
75
*
76
76
* This function adds HW filters configuration specific for switchdev
77
77
* mode.
78
78
*/
79
79
static int ice_eswitch_setup_env (struct ice_pf * pf )
80
80
{
81
- struct ice_vsi * uplink_vsi = pf -> switchdev .uplink_vsi ;
82
- struct net_device * uplink_netdev = uplink_vsi -> netdev ;
83
- struct ice_vsi * ctrl_vsi = pf -> switchdev . control_vsi ;
81
+ struct ice_vsi * uplink_vsi = pf -> eswitch .uplink_vsi ;
82
+ struct ice_vsi * ctrl_vsi = pf -> eswitch . control_vsi ;
83
+ struct net_device * netdev = uplink_vsi -> netdev ;
84
84
struct ice_vsi_vlan_ops * vlan_ops ;
85
85
bool rule_added = false;
86
86
87
87
ice_remove_vsi_fltr (& pf -> hw , uplink_vsi -> idx );
88
88
89
- netif_addr_lock_bh (uplink_netdev );
90
- __dev_uc_unsync (uplink_netdev , NULL );
91
- __dev_mc_unsync (uplink_netdev , NULL );
92
- netif_addr_unlock_bh (uplink_netdev );
89
+ netif_addr_lock_bh (netdev );
90
+ __dev_uc_unsync (netdev , NULL );
91
+ __dev_mc_unsync (netdev , NULL );
92
+ netif_addr_unlock_bh (netdev );
93
93
94
94
if (ice_vsi_add_vlan_zero (uplink_vsi ))
95
95
goto err_def_rx ;
@@ -132,10 +132,10 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
132
132
}
133
133
134
134
/**
135
- * ice_eswitch_remap_rings_to_vectors - reconfigure rings of switchdev ctrl VSI
135
+ * ice_eswitch_remap_rings_to_vectors - reconfigure rings of eswitch ctrl VSI
136
136
* @pf: pointer to PF struct
137
137
*
138
- * In switchdev number of allocated Tx/Rx rings is equal.
138
+ * In eswitch number of allocated Tx/Rx rings is equal.
139
139
*
140
140
* This function fills q_vectors structures associated with representor and
141
141
* move each ring pairs to port representor netdevs. Each port representor
@@ -144,7 +144,7 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
144
144
*/
145
145
static void ice_eswitch_remap_rings_to_vectors (struct ice_pf * pf )
146
146
{
147
- struct ice_vsi * vsi = pf -> switchdev .control_vsi ;
147
+ struct ice_vsi * vsi = pf -> eswitch .control_vsi ;
148
148
int q_id ;
149
149
150
150
ice_for_each_txq (vsi , q_id ) {
@@ -189,7 +189,7 @@ static void ice_eswitch_remap_rings_to_vectors(struct ice_pf *pf)
189
189
/**
190
190
* ice_eswitch_release_reprs - clear PR VSIs configuration
191
191
* @pf: poiner to PF struct
192
- * @ctrl_vsi: pointer to switchdev control VSI
192
+ * @ctrl_vsi: pointer to eswitch control VSI
193
193
*/
194
194
static void
195
195
ice_eswitch_release_reprs (struct ice_pf * pf , struct ice_vsi * ctrl_vsi )
@@ -223,7 +223,7 @@ ice_eswitch_release_reprs(struct ice_pf *pf, struct ice_vsi *ctrl_vsi)
223
223
*/
224
224
static int ice_eswitch_setup_reprs (struct ice_pf * pf )
225
225
{
226
- struct ice_vsi * ctrl_vsi = pf -> switchdev .control_vsi ;
226
+ struct ice_vsi * ctrl_vsi = pf -> eswitch .control_vsi ;
227
227
int max_vsi_num = 0 ;
228
228
struct ice_vf * vf ;
229
229
unsigned int bkt ;
@@ -359,7 +359,7 @@ ice_eswitch_port_start_xmit(struct sk_buff *skb, struct net_device *netdev)
359
359
}
360
360
361
361
/**
362
- * ice_eswitch_set_target_vsi - set switchdev context in Tx context descriptor
362
+ * ice_eswitch_set_target_vsi - set eswitch context in Tx context descriptor
363
363
* @skb: pointer to send buffer
364
364
* @off: pointer to offload struct
365
365
*/
@@ -382,16 +382,16 @@ ice_eswitch_set_target_vsi(struct sk_buff *skb,
382
382
}
383
383
384
384
/**
385
- * ice_eswitch_release_env - clear switchdev HW filters
385
+ * ice_eswitch_release_env - clear eswitch HW filters
386
386
* @pf: pointer to PF struct
387
387
*
388
388
* This function removes HW filters configuration specific for switchdev
389
389
* mode and restores default legacy mode settings.
390
390
*/
391
391
static void ice_eswitch_release_env (struct ice_pf * pf )
392
392
{
393
- struct ice_vsi * uplink_vsi = pf -> switchdev .uplink_vsi ;
394
- struct ice_vsi * ctrl_vsi = pf -> switchdev .control_vsi ;
393
+ struct ice_vsi * uplink_vsi = pf -> eswitch .uplink_vsi ;
394
+ struct ice_vsi * ctrl_vsi = pf -> eswitch .control_vsi ;
395
395
struct ice_vsi_vlan_ops * vlan_ops ;
396
396
397
397
vlan_ops = ice_get_compat_vsi_vlan_ops (uplink_vsi );
@@ -407,7 +407,7 @@ static void ice_eswitch_release_env(struct ice_pf *pf)
407
407
}
408
408
409
409
/**
410
- * ice_eswitch_vsi_setup - configure switchdev control VSI
410
+ * ice_eswitch_vsi_setup - configure eswitch control VSI
411
411
* @pf: pointer to PF structure
412
412
* @pi: pointer to port_info structure
413
413
*/
@@ -486,12 +486,12 @@ static int ice_eswitch_enable_switchdev(struct ice_pf *pf)
486
486
return - EINVAL ;
487
487
}
488
488
489
- pf -> switchdev .control_vsi = ice_eswitch_vsi_setup (pf , pf -> hw .port_info );
490
- if (!pf -> switchdev .control_vsi )
489
+ pf -> eswitch .control_vsi = ice_eswitch_vsi_setup (pf , pf -> hw .port_info );
490
+ if (!pf -> eswitch .control_vsi )
491
491
return - ENODEV ;
492
492
493
- ctrl_vsi = pf -> switchdev .control_vsi ;
494
- pf -> switchdev .uplink_vsi = uplink_vsi ;
493
+ ctrl_vsi = pf -> eswitch .control_vsi ;
494
+ pf -> eswitch .uplink_vsi = uplink_vsi ;
495
495
496
496
if (ice_eswitch_setup_env (pf ))
497
497
goto err_vsi ;
@@ -526,12 +526,12 @@ static int ice_eswitch_enable_switchdev(struct ice_pf *pf)
526
526
}
527
527
528
528
/**
529
- * ice_eswitch_disable_switchdev - disable switchdev resources
529
+ * ice_eswitch_disable_switchdev - disable eswitch resources
530
530
* @pf: pointer to PF structure
531
531
*/
532
532
static void ice_eswitch_disable_switchdev (struct ice_pf * pf )
533
533
{
534
- struct ice_vsi * ctrl_vsi = pf -> switchdev .control_vsi ;
534
+ struct ice_vsi * ctrl_vsi = pf -> eswitch .control_vsi ;
535
535
536
536
ice_eswitch_napi_disable (pf );
537
537
ice_eswitch_br_offloads_deinit (pf );
@@ -625,7 +625,7 @@ void ice_eswitch_release(struct ice_pf *pf)
625
625
return ;
626
626
627
627
ice_eswitch_disable_switchdev (pf );
628
- pf -> switchdev .is_running = false;
628
+ pf -> eswitch .is_running = false;
629
629
}
630
630
631
631
/**
@@ -636,14 +636,15 @@ int ice_eswitch_configure(struct ice_pf *pf)
636
636
{
637
637
int status ;
638
638
639
- if (pf -> eswitch_mode == DEVLINK_ESWITCH_MODE_LEGACY || pf -> switchdev .is_running )
639
+ if (pf -> eswitch_mode == DEVLINK_ESWITCH_MODE_LEGACY ||
640
+ pf -> eswitch .is_running )
640
641
return 0 ;
641
642
642
643
status = ice_eswitch_enable_switchdev (pf );
643
644
if (status )
644
645
return status ;
645
646
646
- pf -> switchdev .is_running = true;
647
+ pf -> eswitch .is_running = true;
647
648
return 0 ;
648
649
}
649
650
@@ -693,7 +694,7 @@ void ice_eswitch_stop_all_tx_queues(struct ice_pf *pf)
693
694
*/
694
695
int ice_eswitch_rebuild (struct ice_pf * pf )
695
696
{
696
- struct ice_vsi * ctrl_vsi = pf -> switchdev .control_vsi ;
697
+ struct ice_vsi * ctrl_vsi = pf -> eswitch .control_vsi ;
697
698
int status ;
698
699
699
700
ice_eswitch_napi_disable (pf );
0 commit comments