Skip to content

Commit d9a31cd

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-02-12 (i40e) This series contains updates to i40e driver only. Ivan Vecera corrects the looping value used while waiting for queues to be disabled as well as an incorrect mask being used for DCB configuration. Maciej resolves an issue related to XDP traffic; removing a double call to i40e_pf_rxq_wait() and accounting for XDP rings when stopping rings. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 858b311 + 6ed8187 commit d9a31cd

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@ void i40e_dcb_hw_rx_ets_bw_config(struct i40e_hw *hw, u8 *bw_share,
15231523
reg = rd32(hw, I40E_PRTDCB_RETSTCC(i));
15241524
reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK |
15251525
I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK |
1526-
I40E_PRTDCB_RETSTCC_ETSTC_SHIFT);
1526+
I40E_PRTDCB_RETSTCC_ETSTC_MASK);
15271527
reg |= FIELD_PREP(I40E_PRTDCB_RETSTCC_BWSHARE_MASK,
15281528
bw_share[i]);
15291529
reg |= FIELD_PREP(I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK,

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4926,27 +4926,23 @@ int i40e_vsi_start_rings(struct i40e_vsi *vsi)
49264926
void i40e_vsi_stop_rings(struct i40e_vsi *vsi)
49274927
{
49284928
struct i40e_pf *pf = vsi->back;
4929-
int pf_q, err, q_end;
4929+
u32 pf_q, tx_q_end, rx_q_end;
49304930

49314931
/* When port TX is suspended, don't wait */
49324932
if (test_bit(__I40E_PORT_SUSPENDED, vsi->back->state))
49334933
return i40e_vsi_stop_rings_no_wait(vsi);
49344934

4935-
q_end = vsi->base_queue + vsi->num_queue_pairs;
4936-
for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)
4937-
i40e_pre_tx_queue_cfg(&pf->hw, (u32)pf_q, false);
4935+
tx_q_end = vsi->base_queue +
4936+
vsi->alloc_queue_pairs * (i40e_enabled_xdp_vsi(vsi) ? 2 : 1);
4937+
for (pf_q = vsi->base_queue; pf_q < tx_q_end; pf_q++)
4938+
i40e_pre_tx_queue_cfg(&pf->hw, pf_q, false);
49384939

4939-
for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++) {
4940-
err = i40e_control_wait_rx_q(pf, pf_q, false);
4941-
if (err)
4942-
dev_info(&pf->pdev->dev,
4943-
"VSI seid %d Rx ring %d disable timeout\n",
4944-
vsi->seid, pf_q);
4945-
}
4940+
rx_q_end = vsi->base_queue + vsi->num_queue_pairs;
4941+
for (pf_q = vsi->base_queue; pf_q < rx_q_end; pf_q++)
4942+
i40e_control_rx_q(pf, pf_q, false);
49464943

49474944
msleep(I40E_DISABLE_TX_GAP_MSEC);
4948-
pf_q = vsi->base_queue;
4949-
for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)
4945+
for (pf_q = vsi->base_queue; pf_q < tx_q_end; pf_q++)
49504946
wr32(&pf->hw, I40E_QTX_ENA(pf_q), 0);
49514947

49524948
i40e_vsi_wait_queues_disabled(vsi);
@@ -5360,7 +5356,7 @@ static int i40e_pf_wait_queues_disabled(struct i40e_pf *pf)
53605356
{
53615357
int v, ret = 0;
53625358

5363-
for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
5359+
for (v = 0; v < pf->num_alloc_vsi; v++) {
53645360
if (pf->vsi[v]) {
53655361
ret = i40e_vsi_wait_queues_disabled(pf->vsi[v]);
53665362
if (ret)

0 commit comments

Comments
 (0)