public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine•com>
To: Vladimir Oltean <vladimir.oltean@nxp•com>
Cc: netdev@vger•kernel.org, "David S. Miller" <davem@davemloft•net>,
	Eric Dumazet <edumazet@google•com>,
	Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
	Claudiu Manoil <claudiu.manoil@nxp•com>,
	Vinicius Costa Gomes <vinicius.gomes@intel•com>,
	Kurt Kanzenbach <kurt@linutronix•de>,
	Jacob Keller <jacob.e.keller@intel•com>,
	Jamal Hadi Salim <jhs@mojatatu•com>,
	Cong Wang <xiyou.wangcong@gmail•com>,
	Jiri Pirko <jiri@resnulli•us>
Subject: Re: [PATCH v4 net-next 11/15] net: enetc: act upon the requested mqprio queue configuration
Date: Wed, 1 Feb 2023 16:15:34 +0100	[thread overview]
Message-ID: <Y9qCFtb6RBUZ4+Wj@corigine.com> (raw)
In-Reply-To: <20230130173145.475943-12-vladimir.oltean@nxp.com>

On Mon, Jan 30, 2023 at 07:31:41PM +0200, Vladimir Oltean wrote:
> Regardless of the requested queue count per traffic class, the enetc
> driver allocates a number of TX rings equal to the number of TCs, and
> hardcodes a queue configuration of "1@0 1@1 ... 1@max-tc". Other
> configurations are silently ignored and treated the same.
> 
> Improve that by allowing what the user requests to be actually
> fulfilled. This allows more than one TX ring per traffic class.
> For example:
> 
> $ tc qdisc add dev eno0 root handle 1: mqprio num_tc 4 \
> 	map 0 0 1 1 2 2 3 3 queues 2@0 2@2 2@4 2@6
> [  146.267648] fsl_enetc 0000:00:00.0 eno0: TX ring 0 prio 0
> [  146.273451] fsl_enetc 0000:00:00.0 eno0: TX ring 1 prio 0
> [  146.283280] fsl_enetc 0000:00:00.0 eno0: TX ring 2 prio 1
> [  146.293987] fsl_enetc 0000:00:00.0 eno0: TX ring 3 prio 1
> [  146.300467] fsl_enetc 0000:00:00.0 eno0: TX ring 4 prio 2
> [  146.306866] fsl_enetc 0000:00:00.0 eno0: TX ring 5 prio 2
> [  146.313261] fsl_enetc 0000:00:00.0 eno0: TX ring 6 prio 3
> [  146.319622] fsl_enetc 0000:00:00.0 eno0: TX ring 7 prio 3
> $ tc qdisc del dev eno0 root
> [  178.238418] fsl_enetc 0000:00:00.0 eno0: TX ring 0 prio 0
> [  178.244369] fsl_enetc 0000:00:00.0 eno0: TX ring 1 prio 0
> [  178.251486] fsl_enetc 0000:00:00.0 eno0: TX ring 2 prio 0
> [  178.258006] fsl_enetc 0000:00:00.0 eno0: TX ring 3 prio 0
> [  178.265038] fsl_enetc 0000:00:00.0 eno0: TX ring 4 prio 0
> [  178.271557] fsl_enetc 0000:00:00.0 eno0: TX ring 5 prio 0
> [  178.277910] fsl_enetc 0000:00:00.0 eno0: TX ring 6 prio 0
> [  178.284281] fsl_enetc 0000:00:00.0 eno0: TX ring 7 prio 0
> $ tc qdisc add dev eno0 root handle 1: mqprio num_tc 8 \
> 	map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 1
> [  186.113162] fsl_enetc 0000:00:00.0 eno0: TX ring 0 prio 0
> [  186.118764] fsl_enetc 0000:00:00.0 eno0: TX ring 1 prio 1
> [  186.124374] fsl_enetc 0000:00:00.0 eno0: TX ring 2 prio 2
> [  186.130765] fsl_enetc 0000:00:00.0 eno0: TX ring 3 prio 3
> [  186.136404] fsl_enetc 0000:00:00.0 eno0: TX ring 4 prio 4
> [  186.142049] fsl_enetc 0000:00:00.0 eno0: TX ring 5 prio 5
> [  186.147674] fsl_enetc 0000:00:00.0 eno0: TX ring 6 prio 6
> [  186.153305] fsl_enetc 0000:00:00.0 eno0: TX ring 7 prio 7
> 
> The driver used to set TC_MQPRIO_HW_OFFLOAD_TCS, near which there is
> this comment in the UAPI header:
> 
>         TC_MQPRIO_HW_OFFLOAD_TCS,       /* offload TCs, no queue counts */
> 
> but I'm not sure who even looks at this field. Anyway, since this is
> basically what enetc was doing up until now (and no longer is; we
> offload queue counts too), remove that assignment.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp•com>

Reviewed-by: Simon Horman <simon.horman@corigine•com>


  reply	other threads:[~2023-02-01 15:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 17:31 [PATCH v4 net-next 00/15] ENETC mqprio/taprio cleanup Vladimir Oltean
2023-01-30 17:31 ` [PATCH v4 net-next 01/15] net: enetc: simplify enetc_num_stack_tx_queues() Vladimir Oltean
2023-02-01 13:44   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 02/15] net: enetc: allow the enetc_reconfigure() callback to fail Vladimir Oltean
2023-02-01 13:45   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 03/15] net: enetc: recalculate num_real_tx_queues when XDP program attaches Vladimir Oltean
2023-02-01 13:45   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 04/15] net: enetc: ensure we always have a minimum number of TXQs for stack Vladimir Oltean
2023-02-01 13:43   ` Simon Horman
2023-02-01 18:46     ` Vladimir Oltean
2023-02-02  9:29       ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 05/15] net/sched: mqprio: refactor nlattr parsing to a separate function Vladimir Oltean
2023-02-01 14:03   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 06/15] net/sched: mqprio: refactor offloading and unoffloading to dedicated functions Vladimir Oltean
2023-02-01 14:07   ` Simon Horman
2023-02-01 14:09     ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 07/15] net/sched: move struct tc_mqprio_qopt_offload from pkt_cls.h to pkt_sched.h Vladimir Oltean
2023-02-01 14:07   ` Simon Horman
2023-02-01 14:11     ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 08/15] net/sched: mqprio: allow offloading drivers to request queue count validation Vladimir Oltean
2023-01-30 18:37   ` Claudiu Manoil
2023-01-30 19:06     ` Vladimir Oltean
2023-02-01 14:08   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 09/15] net/sched: mqprio: add extack messages for " Vladimir Oltean
2023-02-01 14:12   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 10/15] net: enetc: request mqprio to validate the queue counts Vladimir Oltean
2023-02-01 14:12   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 11/15] net: enetc: act upon the requested mqprio queue configuration Vladimir Oltean
2023-02-01 15:15   ` Simon Horman [this message]
2023-01-30 17:31 ` [PATCH v4 net-next 12/15] net/sched: taprio: pass mqprio queue configuration to ndo_setup_tc() Vladimir Oltean
2023-02-01 15:16   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 13/15] net: enetc: act upon mqprio queue config in taprio offload Vladimir Oltean
2023-02-01 15:16   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 14/15] net/sched: taprio: mask off bits in gate mask that exceed number of TCs Vladimir Oltean
2023-02-01 15:17   ` Simon Horman
2023-01-30 17:31 ` [PATCH v4 net-next 15/15] net/sched: taprio: only calculate gate mask per TXQ for igc, stmmac and tsnep Vladimir Oltean
2023-02-01 15:17   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9qCFtb6RBUZ4+Wj@corigine.com \
    --to=simon.horman@corigine$(echo .)com \
    --cc=claudiu.manoil@nxp$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=jacob.e.keller@intel$(echo .)com \
    --cc=jhs@mojatatu$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=kuba@kernel$(echo .)org \
    --cc=kurt@linutronix$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=vinicius.gomes@intel$(echo .)com \
    --cc=vladimir.oltean@nxp$(echo .)com \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox