From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Davide Caratti <dcaratti@redhat.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, olteanv@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, nbd@nbd.name,
sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com,
lorenzo.bianconi83@gmail.com
Subject: Re: [RFC net-next 4/5] net: airoha: Add sched ETS offload support
Date: Thu, 12 Dec 2024 18:04:37 +0100 [thread overview]
Message-ID: <Z1sXpWH8MMNlVVMr@lore-desk> (raw)
In-Reply-To: <CAKa-r6shd3+2zgeEzVVJR7fKWdpjKv1YJxS3z+y7QWqDf8zDZQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]
On Dec 12, Davide Caratti wrote:
> hi Lorenzo,
>
> On Wed, Dec 11, 2024 at 4:32 PM Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> >
> > Introduce support for ETS qdisc offload available in the Airoha EN7581
> > ethernet controller. Add the capability to configure hw ETS Qdisc for
> > the specified DSA user port via the QDMA block available in the mac chip
> > (QDMA block is connected to the DSA switch cpu port).
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> > drivers/net/ethernet/mediatek/airoha_eth.c | 155 ++++++++++++++++++++-
> > 1 file changed, 154 insertions(+), 1 deletion(-)
> >
> [...]
>
> > +static int airoha_qdma_set_tx_ets_sched(struct airoha_gdm_port *port,
> > + int channel,
> > + struct tc_ets_qopt_offload *opt)
> > +{
> > + struct tc_ets_qopt_offload_replace_params *p = &opt->replace_params;
> > + enum tx_sched_mode mode = TC_SCH_SP;
> > + u16 w[AIROHA_NUM_QOS_QUEUES] = {};
> > + int i, nstrict = 0;
> > +
> > + if (p->bands != AIROHA_NUM_QOS_QUEUES)
> > + return -EINVAL;
>
> maybe this condition can be relaxed to '<' if priomap is parsed ? (see below)
ack, I guess we can relax a bit this condition.
>
> > +
> > + for (i = 0; i < p->bands; i++) {
> > + if (!p->quanta[i])
> > + nstrict++;
> > + }
> > +
> > + /* this configuration is not supported by the hw */
> > + if (nstrict == AIROHA_NUM_QOS_QUEUES - 1)
> > + return -EINVAL;
> > +
> > + for (i = 0; i < p->bands - nstrict; i++)
> > + w[i] = p->weights[nstrict + i];
> > +
> > + if (!nstrict)
> > + mode = TC_SCH_WRR8;
> > + else if (nstrict < AIROHA_NUM_QOS_QUEUES - 1)
> > + mode = nstrict + 1;
> > +
> > + return airoha_qdma_set_chan_tx_sched(port, channel, mode, w,
> > + ARRAY_SIZE(w));
>
> it seems that SP queues have a fixed, non-programmable priority in
> hardware (e.g., queue 7 is served prior to queue 6) If this is the
> case, you probably have to ensure that 'priomap' maps correctly
> skb->priority to one of the SP queues, like done in [1].
ack, I will take a look.
Regards,
Lorenzo
>
> thanks,
> --
> davide
>
> [1] https://elixir.bootlin.com/linux/v6.12.4/source/drivers/net/ethernet/microchip/lan966x/lan966x_ets.c#L41
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-12-12 17:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 15:31 [RFC net-next 0/5] Add ETS and TBF Qdisc offload for Airoha EN7581 SoC Lorenzo Bianconi
2024-12-11 15:31 ` [RFC net-next 1/5] net: airoha: Enable Tx drop capability for each Tx DMA ring Lorenzo Bianconi
2024-12-11 15:31 ` [RFC net-next 2/5] net: airoha: Introduce ndo_select_queue callback Lorenzo Bianconi
2024-12-11 15:31 ` [RFC net-next 3/5] net: dsa: Introduce ndo_setup_tc_conduit callback Lorenzo Bianconi
2024-12-11 15:31 ` [RFC net-next 4/5] net: airoha: Add sched ETS offload support Lorenzo Bianconi
2024-12-12 14:37 ` Davide Caratti
2024-12-12 17:04 ` Lorenzo Bianconi [this message]
2024-12-11 15:31 ` [RFC net-next 5/5] net: airoha: Add sched TBF " Lorenzo Bianconi
2024-12-11 15:41 ` [RFC net-next 0/5] Add ETS and TBF Qdisc offload for Airoha EN7581 SoC Vladimir Oltean
2024-12-12 9:19 ` Lorenzo Bianconi
2024-12-12 15:06 ` Vladimir Oltean
2024-12-12 17:03 ` Lorenzo Bianconi
2024-12-12 18:46 ` Vladimir Oltean
2024-12-16 12:09 ` Lorenzo Bianconi
2024-12-16 15:49 ` Vladimir Oltean
2024-12-16 18:14 ` Oleksij Rempel
2024-12-16 19:01 ` Lorenzo Bianconi
2024-12-16 19:23 ` Oleksij Rempel
2024-12-16 21:44 ` Lorenzo Bianconi
2024-12-17 8:46 ` Oleksij Rempel
2024-12-16 19:46 ` Vladimir Oltean
2024-12-16 22:28 ` Lorenzo Bianconi
2024-12-16 23:13 ` Vladimir Oltean
2024-12-17 9:11 ` Lorenzo Bianconi
2024-12-17 9:30 ` Vladimir Oltean
2024-12-17 10:01 ` Lorenzo Bianconi
2024-12-17 10:17 ` Vladimir Oltean
2024-12-17 10:23 ` Oleksij Rempel
2024-12-16 23:24 ` Andrew Lunn
2024-12-17 9:38 ` Oleksij Rempel
2024-12-17 11:54 ` Vladimir Oltean
2024-12-17 12:22 ` Oleksij Rempel
2024-12-17 13:28 ` Vladimir Oltean
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=Z1sXpWH8MMNlVVMr@lore-desk \
--to=lorenzo@kernel.org \
--cc=Mark-MC.Lee@mediatek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.