Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'intel-wired-lan-driver-updates-2023-10-19-idpf'

Jacob Keller says:

====================
Intel Wired LAN Driver Updates 2023-10-19 (idpf)

This series contains two fixes for the recently merged idpf driver.

Michal adds missing logic for programming the scheduling mode of completion
queues.

Pavan fixes a call trace caused by the mailbox work item not being canceled
properly if an error occurred during initialization.
====================

Link: https://lore.kernel.org/r/20231023202655.173369-1-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+16 -3
+8 -2
drivers/net/ethernet/intel/idpf/idpf_txrx.c
··· 1160 1160 */ 1161 1161 static int idpf_txq_group_alloc(struct idpf_vport *vport, u16 num_txq) 1162 1162 { 1163 + bool flow_sch_en; 1163 1164 int err, i; 1164 1165 1165 1166 vport->txq_grps = kcalloc(vport->num_txq_grp, 1166 1167 sizeof(*vport->txq_grps), GFP_KERNEL); 1167 1168 if (!vport->txq_grps) 1168 1169 return -ENOMEM; 1170 + 1171 + flow_sch_en = !idpf_is_cap_ena(vport->adapter, IDPF_OTHER_CAPS, 1172 + VIRTCHNL2_CAP_SPLITQ_QSCHED); 1169 1173 1170 1174 for (i = 0; i < vport->num_txq_grp; i++) { 1171 1175 struct idpf_txq_group *tx_qgrp = &vport->txq_grps[i]; ··· 1199 1195 q->txq_grp = tx_qgrp; 1200 1196 hash_init(q->sched_buf_hash); 1201 1197 1202 - if (!idpf_is_cap_ena(adapter, IDPF_OTHER_CAPS, 1203 - VIRTCHNL2_CAP_SPLITQ_QSCHED)) 1198 + if (flow_sch_en) 1204 1199 set_bit(__IDPF_Q_FLOW_SCH_EN, q->flags); 1205 1200 } 1206 1201 ··· 1218 1215 tx_qgrp->complq->desc_count = vport->complq_desc_count; 1219 1216 tx_qgrp->complq->vport = vport; 1220 1217 tx_qgrp->complq->txq_grp = tx_qgrp; 1218 + 1219 + if (flow_sch_en) 1220 + __set_bit(__IDPF_Q_FLOW_SCH_EN, tx_qgrp->complq->flags); 1221 1221 } 1222 1222 1223 1223 return 0;
+8 -1
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
··· 1473 1473 /* Populate the queue info buffer with all queue context info */ 1474 1474 for (i = 0; i < vport->num_txq_grp; i++) { 1475 1475 struct idpf_txq_group *tx_qgrp = &vport->txq_grps[i]; 1476 - int j; 1476 + int j, sched_mode; 1477 1477 1478 1478 for (j = 0; j < tx_qgrp->num_txq; j++, k++) { 1479 1479 qi[k].queue_id = ··· 1513 1513 qi[k].type = cpu_to_le32(tx_qgrp->complq->q_type); 1514 1514 qi[k].ring_len = cpu_to_le16(tx_qgrp->complq->desc_count); 1515 1515 qi[k].dma_ring_addr = cpu_to_le64(tx_qgrp->complq->dma); 1516 + 1517 + if (test_bit(__IDPF_Q_FLOW_SCH_EN, tx_qgrp->complq->flags)) 1518 + sched_mode = VIRTCHNL2_TXQ_SCHED_MODE_FLOW; 1519 + else 1520 + sched_mode = VIRTCHNL2_TXQ_SCHED_MODE_QUEUE; 1521 + qi[k].sched_mode = cpu_to_le16(sched_mode); 1516 1522 1517 1523 k++; 1518 1524 } ··· 3146 3140 3147 3141 err_intr_req: 3148 3142 cancel_delayed_work_sync(&adapter->serv_task); 3143 + cancel_delayed_work_sync(&adapter->mbx_task); 3149 3144 idpf_vport_params_buf_rel(adapter); 3150 3145 err_netdev_alloc: 3151 3146 kfree(adapter->vports);