diff mbox series

[net] ice: config netdev tc before setting queues number

Message ID 20220808042339.2979-1-michal.swiatkowski@linux.intel.com
State Superseded
Headers show
Series [net] ice: config netdev tc before setting queues number | expand

Commit Message

Michal Swiatkowski Aug. 8, 2022, 4:23 a.m. UTC
After lowering number of tx queues the warning appears:
"Number of in use tx queues changed invalidating tc mappings. Priority
traff ic classification disabled!"

Fix this by setting correct tc mapping before setting real number of
queues on netdev.

Fixes: 0754d65bd4be5 ("ice: Add infrastructure for mqprio support via ndo_setup_tc")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paul Menzel Aug. 8, 2022, 6:48 a.m. UTC | #1
Dear Michal,


Thank you for your patch.

Am 08.08.22 um 06:23 schrieb Michal Swiatkowski:
> After lowering number of tx queues the warning appears:
> "Number of in use tx queues changed invalidating tc mappings. Priority
> traff ic classification disabled!"

A space snuck in in *traffic*.

It’d be also nice, if you added the command to lower the tx queues to 
the commit message.

> Fix this by setting correct tc mapping before setting real number of
> queues on netdev.
> 
> Fixes: 0754d65bd4be5 ("ice: Add infrastructure for mqprio support via ndo_setup_tc")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index d992321e74ba..bb17bcfd2529 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -6918,6 +6918,8 @@ int ice_vsi_open(struct ice_vsi *vsi)
>   	if (err)
>   		goto err_setup_rx;
>   
> +	ice_vsi_cfg_netdev_tc(vsi, vsi->tc_cfg.ena_tc);
> +
>   	if (vsi->type == ICE_VSI_PF) {
>   		/* Notify the stack of the actual queue counts. */
>   		err = netif_set_real_num_tx_queues(vsi->netdev, vsi->num_txq);


Kind regards,

Paul
Michal Swiatkowski Aug. 8, 2022, 7:13 a.m. UTC | #2
On Mon, Aug 08, 2022 at 08:48:46AM +0200, Paul Menzel wrote:
> Dear Michal,
> 
> 
> Thank you for your patch.
> 
> Am 08.08.22 um 06:23 schrieb Michal Swiatkowski:
> > After lowering number of tx queues the warning appears:
> > "Number of in use tx queues changed invalidating tc mappings. Priority
> > traff ic classification disabled!"
> 
> A space snuck in in *traffic*.
> 
> It’d be also nice, if you added the command to lower the tx queues to the
> commit message.
> 

Thanks, I will fix and add command in v2.

> > Fix this by setting correct tc mapping before setting real number of
> > queues on netdev.
> > 
> > Fixes: 0754d65bd4be5 ("ice: Add infrastructure for mqprio support via ndo_setup_tc")
> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > ---
> >   drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> > index d992321e74ba..bb17bcfd2529 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_main.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> > @@ -6918,6 +6918,8 @@ int ice_vsi_open(struct ice_vsi *vsi)
> >   	if (err)
> >   		goto err_setup_rx;
> > +	ice_vsi_cfg_netdev_tc(vsi, vsi->tc_cfg.ena_tc);
> > +
> >   	if (vsi->type == ICE_VSI_PF) {
> >   		/* Notify the stack of the actual queue counts. */
> >   		err = netif_set_real_num_tx_queues(vsi->netdev, vsi->num_txq);
> 
> 
> Kind regards,
> 
> Paul
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index d992321e74ba..bb17bcfd2529 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -6918,6 +6918,8 @@  int ice_vsi_open(struct ice_vsi *vsi)
 	if (err)
 		goto err_setup_rx;
 
+	ice_vsi_cfg_netdev_tc(vsi, vsi->tc_cfg.ena_tc);
+
 	if (vsi->type == ICE_VSI_PF) {
 		/* Notify the stack of the actual queue counts. */
 		err = netif_set_real_num_tx_queues(vsi->netdev, vsi->num_txq);