From: Simon Horman <horms@kernel.org>
To: Victor Nogueira <victor@mojatatu.com>
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, daniel@iogearbox.net, dcaratti@redhat.com,
netdev@vger.kernel.org, kernel@mojatatu.com
Subject: Re: [PATCH net-next v3 1/3] net: sched: Move drop_reason to struct tc_skb_cb
Date: Mon, 11 Dec 2023 13:37:38 +0000 [thread overview]
Message-ID: <20231211133738.GL5817@kernel.org> (raw)
In-Reply-To: <20231205205030.3119672-2-victor@mojatatu.com>
On Tue, Dec 05, 2023 at 05:50:28PM -0300, Victor Nogueira wrote:
> Move drop_reason from struct tcf_result to skb cb - more specifically to
> struct tc_skb_cb. With that, we'll be able to also set the drop reason for
> the remaining qdiscs (aside from clsact) that do not have access to
> tcf_result when time comes to set the skb drop reason.
>
> Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Hi Victor,
The nit below notwithstanding, this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
> ---
> include/net/pkt_cls.h | 14 ++++++++++++--
> include/net/pkt_sched.h | 3 ++-
> include/net/sch_generic.h | 1 -
> net/core/dev.c | 4 ++--
> net/sched/act_api.c | 2 +-
> net/sched/cls_api.c | 23 ++++++++---------------
> 6 files changed, 25 insertions(+), 22 deletions(-)
>
> diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
> index a76c9171db0e..761e4500cca0 100644
> --- a/include/net/pkt_cls.h
> +++ b/include/net/pkt_cls.h
> @@ -154,10 +154,20 @@ __cls_set_class(unsigned long *clp, unsigned long cl)
> return xchg(clp, cl);
> }
>
> -static inline void tcf_set_drop_reason(struct tcf_result *res,
> +struct tc_skb_cb;
> +
> +static inline struct tc_skb_cb *tc_skb_cb(const struct sk_buff *skb);
> +
nit: It's not very important, as this code disappears in the next patch,
but FWIIW I don't think the forward declarations of
tc_skb_cb (struct or function) are needed.
> +static inline enum skb_drop_reason
> +tcf_get_drop_reason(const struct sk_buff *skb)
> +{
> + return tc_skb_cb(skb)->drop_reason;
> +}
> +
> +static inline void tcf_set_drop_reason(const struct sk_buff *skb,
> enum skb_drop_reason reason)
> {
> - res->drop_reason = reason;
> + tc_skb_cb(skb)->drop_reason = reason;
> }
>
> static inline void
...
next prev parent reply other threads:[~2023-12-11 13:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 20:50 [PATCH net-next v3 0/3] net: sched: Make tc-related drop reason more flexible for remaining qdiscs Victor Nogueira
2023-12-05 20:50 ` [PATCH net-next v3 1/3] net: sched: Move drop_reason to struct tc_skb_cb Victor Nogueira
2023-12-05 21:17 ` Daniel Borkmann
2023-12-11 13:37 ` Simon Horman [this message]
2023-12-05 20:50 ` [PATCH net-next v3 2/3] net: sched: Make tc-related drop reason more flexible for remaining qdiscs Victor Nogueira
2023-12-05 21:20 ` Daniel Borkmann
2023-12-11 13:38 ` Simon Horman
2023-12-12 2:25 ` Jakub Kicinski
2023-12-12 16:27 ` Jamal Hadi Salim
2023-12-12 16:57 ` Eric Dumazet
2023-12-12 17:16 ` Jamal Hadi Salim
2023-12-13 18:36 ` Jamal Hadi Salim
2023-12-13 21:08 ` Jakub Kicinski
2023-12-14 15:31 ` Jamal Hadi Salim
2023-12-14 17:18 ` Taehee Yoo
2023-12-15 14:42 ` Jamal Hadi Salim
2023-12-14 18:01 ` Jakub Kicinski
2023-12-05 20:50 ` [PATCH net-next v3 3/3] net: sched: Add initial TC error skb drop reasons Victor Nogueira
2023-12-11 13:38 ` Simon Horman
2023-12-12 2:30 ` Jakub Kicinski
2023-12-13 18:25 ` Victor Nogueira
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=20231211133738.GL5817@kernel.org \
--to=horms@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=victor@mojatatu.com \
--cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).