mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <jiang.kun2@zte.com.cn>
Cc: <davem@davemloft.net>, <edumazet@google.com>,
	<fan.yu9@zte.com.cn>, <gnaaman@drivenets.com>,
	<he.peilin@zte.com.cn>, <horms@kernel.org>, <kuba@kernel.org>,
	<kuniyu@amazon.com>, <leitao@debian.org>,
	<linux-kernel@vger.kernel.org>, <lizetao1@huawei.com>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<qiu.yutan@zte.com.cn>, <tu.qiang35@zte.com.cn>,
	<wang.yaxin@zte.com.cn>, <xu.xin16@zte.com.cn>,
	<yang.yang29@zte.com.cn>, <ye.xingchen@zte.com.cn>,
	<zhang.yunkai@zte.com.cn>
Subject: Re: [PATCH linux next] net: neigh: use kfree_skb_reason() in neigh_resolve_output()
Date: Mon, 19 May 2025 21:58:58 -0700	[thread overview]
Message-ID: <20250520045922.34528-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20250520104413538Q88ZB2XVWu1BthfQkFSuW@zte.com.cn>

From: <jiang.kun2@zte.com.cn>
Date: Tue, 20 May 2025 10:44:13 +0800 (CST)
> From: Qiu Yutan <qiu.yutan@zte.com.cn>
> 
> Replace kfree_skb() used in neigh_resolve_output() with kfree_skb_reason().
> 
> Following new skb drop reason is added:
> /* failed to fill the device hard header */
> SKB_DROP_REASON_NEIGH_HH_FILLFAIL
> 
> Signed-off-by: Qiu Yutan <qiu.yutan@zte.com.cn>
> Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
> ---
>  include/net/dropreason-core.h | 3 +++
>  net/core/neighbour.c          | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
> index bea77934a235..bcf9d7467e1a 100644
> --- a/include/net/dropreason-core.h
> +++ b/include/net/dropreason-core.h
> @@ -62,6 +62,7 @@
>  	FN(NEIGH_FAILED)		\
>  	FN(NEIGH_QUEUEFULL)		\
>  	FN(NEIGH_DEAD)			\
> +	FN(NEIGH_HH_FILLFAIL)		\
>  	FN(TC_EGRESS)			\
>  	FN(SECURITY_HOOK)		\
>  	FN(QDISC_DROP)			\
> @@ -348,6 +349,8 @@ enum skb_drop_reason {
>  	SKB_DROP_REASON_NEIGH_QUEUEFULL,
>  	/** @SKB_DROP_REASON_NEIGH_DEAD: neigh entry is dead */
>  	SKB_DROP_REASON_NEIGH_DEAD,
> +	/** @SKB_DROP_REASON_NEIGH_HH_FILLFAIL: failed to fill the device hard header */
> +	SKB_DROP_REASON_NEIGH_HH_FILLFAIL,
>  	/** @SKB_DROP_REASON_TC_EGRESS: dropped in TC egress HOOK */
>  	SKB_DROP_REASON_TC_EGRESS,
>  	/** @SKB_DROP_REASON_SECURITY_HOOK: dropped due to security HOOK */
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index 254067b719da..f297296c1a43 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -1517,7 +1517,7 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)
>  	return rc;
>  out_kfree_skb:
>  	rc = -EINVAL;
> -	kfree_skb(skb);
> +	kfree_skb_reason(skb, SKB_DROP_REASON_NEIGH_HH_FILLFAIL);

Is there any reason you don't change neigh_connected_output() ?


If you respin, please specify net-next and the patch version in

Subject: [PATCH v2 net-next] net: neighbour: ...


>  	goto out;
>  }
>  EXPORT_SYMBOL(neigh_resolve_output);
> -- 

  reply	other threads:[~2025-05-20  4:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20  2:44 jiang.kun2
2025-05-20  4:58 ` Kuniyuki Iwashima [this message]
2025-05-20 10:40   ` jiang.kun2
2025-05-20 18:05     ` 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=20250520045922.34528-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fan.yu9@zte.com.cn \
    --cc=gnaaman@drivenets.com \
    --cc=he.peilin@zte.com.cn \
    --cc=horms@kernel.org \
    --cc=jiang.kun2@zte.com.cn \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizetao1@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qiu.yutan@zte.com.cn \
    --cc=tu.qiang35@zte.com.cn \
    --cc=wang.yaxin@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zhang.yunkai@zte.com.cn \
    /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

all inboxes | Powered by JetHome®