Skip to content

Commit 7a8cc96

Browse files
committed
Merge branch 'intel-wired-lan-driver-updates-2024-05-23-ice-idpf'
Jacob Keller says: ==================== Intel Wired LAN Driver Updates 2024-05-23 (ice, idpf) This series contains two fixes which finished up testing. First, Alexander fixes an issue in idpf caused by enabling NAPI and interrupts prior to actually allocating the Rx buffers. Second, Jacob fixes the ice driver VSI VLAN counting logic to ensure that addition and deletion of VLANs properly manages the total VSI count. ==================== Link: https://lore.kernel.org/r/20240523-net-2024-05-23-intel-net-fixes-v1-0-17a923e0bb5f@intel.com Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 266aa3b + 82617b9 commit 7a8cc96

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ int ice_vsi_add_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan)
4545
return -EINVAL;
4646

4747
err = ice_fltr_add_vlan(vsi, vlan);
48-
if (err && err != -EEXIST) {
48+
if (!err)
49+
vsi->num_vlan++;
50+
else if (err == -EEXIST)
51+
err = 0;
52+
else
4953
dev_err(ice_pf_to_dev(vsi->back), "Failure Adding VLAN %d on VSI %i, status %d\n",
5054
vlan->vid, vsi->vsi_num, err);
51-
return err;
52-
}
5355

54-
vsi->num_vlan++;
55-
return 0;
56+
return err;
5657
}
5758

5859
/**

drivers/net/ethernet/intel/idpf/idpf_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,7 @@ static int idpf_vport_open(struct idpf_vport *vport, bool alloc_res)
13941394
}
13951395

13961396
idpf_rx_init_buf_tail(vport);
1397+
idpf_vport_intr_ena(vport);
13971398

13981399
err = idpf_send_config_queues_msg(vport);
13991400
if (err) {

drivers/net/ethernet/intel/idpf/idpf_txrx.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3746,9 +3746,9 @@ static void idpf_vport_intr_ena_irq_all(struct idpf_vport *vport)
37463746
*/
37473747
void idpf_vport_intr_deinit(struct idpf_vport *vport)
37483748
{
3749+
idpf_vport_intr_dis_irq_all(vport);
37493750
idpf_vport_intr_napi_dis_all(vport);
37503751
idpf_vport_intr_napi_del_all(vport);
3751-
idpf_vport_intr_dis_irq_all(vport);
37523752
idpf_vport_intr_rel_irq(vport);
37533753
}
37543754

@@ -4179,7 +4179,6 @@ int idpf_vport_intr_init(struct idpf_vport *vport)
41794179

41804180
idpf_vport_intr_map_vector_to_qs(vport);
41814181
idpf_vport_intr_napi_add_all(vport);
4182-
idpf_vport_intr_napi_ena_all(vport);
41834182

41844183
err = vport->adapter->dev_ops.reg_ops.intr_reg_init(vport);
41854184
if (err)
@@ -4193,17 +4192,20 @@ int idpf_vport_intr_init(struct idpf_vport *vport)
41934192
if (err)
41944193
goto unroll_vectors_alloc;
41954194

4196-
idpf_vport_intr_ena_irq_all(vport);
4197-
41984195
return 0;
41994196

42004197
unroll_vectors_alloc:
4201-
idpf_vport_intr_napi_dis_all(vport);
42024198
idpf_vport_intr_napi_del_all(vport);
42034199

42044200
return err;
42054201
}
42064202

4203+
void idpf_vport_intr_ena(struct idpf_vport *vport)
4204+
{
4205+
idpf_vport_intr_napi_ena_all(vport);
4206+
idpf_vport_intr_ena_irq_all(vport);
4207+
}
4208+
42074209
/**
42084210
* idpf_config_rss - Send virtchnl messages to configure RSS
42094211
* @vport: virtual port

drivers/net/ethernet/intel/idpf/idpf_txrx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport);
990990
void idpf_vport_intr_update_itr_ena_irq(struct idpf_q_vector *q_vector);
991991
void idpf_vport_intr_deinit(struct idpf_vport *vport);
992992
int idpf_vport_intr_init(struct idpf_vport *vport);
993+
void idpf_vport_intr_ena(struct idpf_vport *vport);
993994
enum pkt_hash_types idpf_ptype_to_htype(const struct idpf_rx_ptype_decoded *decoded);
994995
int idpf_config_rss(struct idpf_vport *vport);
995996
int idpf_init_rss(struct idpf_vport *vport);

0 commit comments

Comments
 (0)