From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>
Cc: <andrew+netdev@lunn.ch>, <ast@kernel.org>, <daniel@iogearbox.net>,
<davem@davemloft.net>, <edumazet@google.com>, <hawk@kernel.org>,
<horms@kernel.org>, <jhs@mojatatu.com>, <jiri@resnulli.us>,
<john.fastabend@gmail.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <sdf@fomichev.me>, <sgoutham@marvell.com>,
Ratheesh Kannoth <rkannoth@marvell.com>
Subject: [PATCH v10 net-next 1/2] net/sched: mqprio: pass qdisc handle to offload drivers
Date: Mon, 31 Aug 2026 18:40:12 +0530 [thread overview]
Message-ID: <20260831131014.2639581-2-rkannoth@marvell.com> (raw)
In-Reply-To: <20260831131014.2639581-1-rkannoth@marvell.com>
Extend struct tc_mqprio_qopt_offload with the owning qdisc handle and
fill it from mqprio_enable_offload() and mqprio_disable_offload().
Offload drivers need the handle to tell apart mqprio setup, teardown,
and tc qdisc replace when they track committed configuration state.
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
include/net/pkt_sched.h | 1 +
net/sched/sch_mqprio.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 90d3e7943b19..9f8694ecd436 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -165,6 +165,7 @@ struct tc_mqprio_caps {
struct tc_mqprio_qopt_offload {
/* struct tc_mqprio_qopt must always be the first element */
struct tc_mqprio_qopt qopt;
+ u32 handle;
struct netlink_ext_ack *extack;
u16 mode;
u16 shaper;
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
index 6ced7008ef5c..adc1393f84ea 100644
--- a/net/sched/sch_mqprio.c
+++ b/net/sched/sch_mqprio.c
@@ -39,6 +39,7 @@ static int mqprio_enable_offload(struct Qdisc *sch,
struct net_device *dev = qdisc_dev(sch);
struct tc_mqprio_qopt_offload mqprio = {
.qopt = *qopt,
+ .handle = sch->handle,
.extack = extack,
};
int err, i;
@@ -79,7 +80,9 @@ static int mqprio_enable_offload(struct Qdisc *sch,
static void mqprio_disable_offload(struct Qdisc *sch)
{
- struct tc_mqprio_qopt_offload mqprio = { { 0 } };
+ struct tc_mqprio_qopt_offload mqprio = {
+ .handle = sch->handle,
+ };
struct mqprio_sched *priv = qdisc_priv(sch);
struct net_device *dev = qdisc_dev(sch);
--
2.43.0
next prev parent reply other threads:[~2026-08-31 13:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 13:10 [PATCH v10 net-next 0/2] octeontx2-pf: mqprio bandwidth offload for NIX TX schedulers Ratheesh Kannoth
2026-08-31 13:10 ` Ratheesh Kannoth [this message]
2026-09-03 19:15 ` [v10,net-next,1/2] net/sched: mqprio: pass qdisc handle to offload drivers netdev-bot+sashiko
2026-08-31 13:10 ` [PATCH v10 net-next 2/2] octeontx2-pf: add mqprio bandwidth offload for NIX TX schedulers Ratheesh Kannoth
2026-09-03 19:15 ` [v10,net-next,2/2] " netdev-bot+sashiko
2026-09-02 1:39 ` [PATCH v10 net-next 0/2] octeontx2-pf: " Ratheesh Kannoth
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=20260831131014.2639581-2-rkannoth@marvell.com \
--to=rkannoth@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=sgoutham@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox