Skip to content

Commit

Permalink
i40e: Fix ADQ rate limiting for PF
Browse files Browse the repository at this point in the history
[ Upstream commit 45bb006 ]

Fix HW rate limiting for ADQ.
Fallback to kernel queue selection for ADQ, as it is network stack
that decides which queue to use for transmit with ADQ configured.
Reset PF after creation of VMDq2 VSIs required for ADQ, as to
reprogram TX queue contexts in i40e_configure_tx_ring.
Without this patch PF would limit TX rate only according to TC0.

Fixes: a9ce82f ("i40e: Enable 'channel' mode in mqprio for TC configs")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Kaaame authored and gregkh committed Sep 15, 2022
1 parent 2b7758a commit 1749fdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e_main.c
Expand Up @@ -6536,6 +6536,9 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi)
vsi->tc_seid_map[i] = ch->seid;
}
}

/* reset to reconfigure TX queue contexts */
i40e_do_reset(vsi->back, I40E_PF_RESET_FLAG, true);
return ret;

err_free:
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/intel/i40e/i40e_txrx.c
Expand Up @@ -3689,7 +3689,8 @@ u16 i40e_lan_select_queue(struct net_device *netdev,
u8 prio;

/* is DCB enabled at all? */
if (vsi->tc_config.numtc == 1)
if (vsi->tc_config.numtc == 1 ||
i40e_is_tc_mqprio_enabled(vsi->back))
return netdev_pick_tx(netdev, skb, sb_dev);

prio = skb->priority;
Expand Down

0 comments on commit 1749fdc

Please sign in to comment.