netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v4 3/3] net: sched: Add initial TC error skb drop reasons
Date: Sat, 16 Dec 2023 20:12:54 +0000	[thread overview]
Message-ID: <20231216201254.GV6288@kernel.org> (raw)
In-Reply-To: <20231214203532.3594232-4-victor@mojatatu.com>

On Thu, Dec 14, 2023 at 05:35:32PM -0300, Victor Nogueira wrote:
> Continue expanding Daniel's patch by adding new skb drop reasons that
> are idiosyncratic to TC.
> 
> More specifically:
> 
> - SKB_DROP_REASON_TC_EXT_COOKIE_ERROR: An error occurred whilst
>   processing a tc ext cookie.
> 
> - SKB_DROP_REASON_TC_CHAIN_NOTFOUND: tc chain lookup failed.
> 
> - SKB_DROP_REASON_TC_RECLASSIFY_LOOP: tc exceeded max reclassify loop
>   iterations
> 
> Signed-off-by: Victor Nogueira <victor@mojatatu.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> ---
>  include/net/dropreason-core.h | 18 +++++++++++++++---
>  net/sched/act_api.c           |  3 ++-
>  net/sched/cls_api.c           | 22 ++++++++++++++--------
>  3 files changed, 31 insertions(+), 12 deletions(-)
> 
> diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
> index 278e4c7d465c..dea361b3555d 100644
> --- a/include/net/dropreason-core.h
> +++ b/include/net/dropreason-core.h
> @@ -85,8 +85,10 @@
>  	FN(IPV6_NDISC_BAD_OPTIONS)	\
>  	FN(IPV6_NDISC_NS_OTHERHOST)	\
>  	FN(QUEUE_PURGE)			\
> -	FN(TC_ERROR)			\
> +	FN(TC_COOKIE_ERROR)		\
>  	FN(PACKET_SOCK_ERROR)		\
> +	FN(TC_CHAIN_NOTFOUND)		\
> +	FN(TC_RECLASSIFY_LOOP)		\
>  	FNe(MAX)
>  
>  /**
> @@ -377,13 +379,23 @@ enum skb_drop_reason {
>  	SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST,
>  	/** @SKB_DROP_REASON_QUEUE_PURGE: bulk free. */
>  	SKB_DROP_REASON_QUEUE_PURGE,
> -	/** @SKB_DROP_REASON_TC_ERROR: generic internal tc error. */
> -	SKB_DROP_REASON_TC_ERROR,
> +	/**
> +	 * @SKB_DROP_REASON_TC_EXT_COOKIE_ERROR: An error occurred whilst

nit: @SKB_DROP_REASON_TC_COOKIE_ERROR

> +	 * processing a tc ext cookie.
> +	 */
> +	SKB_DROP_REASON_TC_COOKIE_ERROR,
>  	/**
>  	 * @SKB_DROP_REASON_PACKET_SOCK_ERROR: generic packet socket errors
>  	 * after its filter matches an incoming packet.
>  	 */
>  	SKB_DROP_REASON_PACKET_SOCK_ERROR,
> +	/** @SKB_DROP_REASON_TC_CHAIN_NOTFOUND: tc chain lookup failed. */
> +	SKB_DROP_REASON_TC_CHAIN_NOTFOUND,
> +	/**
> +	 * @SKB_DROP_REASON_TC_RECLASSIFY_LOOP: tc exceeded max reclassify loop
> +	 * iterations.
> +	 */
> +	SKB_DROP_REASON_TC_RECLASSIFY_LOOP,
>  	/**
>  	 * @SKB_DROP_REASON_MAX: the maximum of core drop reasons, which
>  	 * shouldn't be used as a real 'reason' - only for tracing code gen

...

      reply	other threads:[~2023-12-16 20:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 20:35 [PATCH net-next v4 0/3] net: sched: Make tc-related drop reason more flexible for remaining qdiscs Victor Nogueira
2023-12-14 20:35 ` [PATCH net-next v4 1/3] net: sched: Move drop_reason to struct tc_skb_cb Victor Nogueira
2023-12-14 20:35 ` [PATCH net-next v4 2/3] net: sched: Make tc-related drop reason more flexible for remaining qdiscs Victor Nogueira
2023-12-14 20:35 ` [PATCH net-next v4 3/3] net: sched: Add initial TC error skb drop reasons Victor Nogueira
2023-12-16 20:12   ` Simon Horman [this message]

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=20231216201254.GV6288@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).