From: Ido Schimmel <idosch@nvidia.com>
To: Menglong Dong <menglong8.dong@gmail.com>
Cc: kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, dsahern@kernel.org, dongml2@chinatelecom.cn,
amcohen@nvidia.com, gnault@redhat.com, bpoirier@nvidia.com,
b.galvani@gmail.com, razor@blackwall.org, petrm@nvidia.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 07/10] net: vxlan: use vxlan_kfree_skb() in vxlan_xmit()
Date: Tue, 20 Aug 2024 15:28:45 +0300 [thread overview]
Message-ID: <ZsSL_QJfZqp6zqtc@shredder.mtl.com> (raw)
In-Reply-To: <20240815124302.982711-8-dongml2@chinatelecom.cn>
On Thu, Aug 15, 2024 at 08:42:59PM +0800, Menglong Dong wrote:
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index 9a61f04bb95d..22e2bf532ac3 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -2729,7 +2729,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
> if (info && info->mode & IP_TUNNEL_INFO_TX)
> vxlan_xmit_one(skb, dev, vni, NULL, false);
> else
> - kfree_skb(skb);
> + vxlan_kfree_skb(skb, VXLAN_DROP_TXINFO);
This one probably belongs in include/net/dropreason-core.h as there are
other devices that support tunnel info with similar checks.
> return NETDEV_TX_OK;
> }
> }
> @@ -2792,7 +2792,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
> dev_core_stats_tx_dropped_inc(dev);
> vxlan_vnifilter_count(vxlan, vni, NULL,
> VXLAN_VNI_STATS_TX_DROPS, 0);
> - kfree_skb(skb);
> + vxlan_kfree_skb(skb, VXLAN_DROP_REMOTE);
> return NETDEV_TX_OK;
> }
> }
> @@ -2815,7 +2815,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
> if (fdst)
> vxlan_xmit_one(skb, dev, vni, fdst, did_rsc);
> else
> - kfree_skb(skb);
> + vxlan_kfree_skb(skb, VXLAN_DROP_REMOTE);
Maybe VXLAN_DROP_NO_REMOTE? Please add it to vxlan_mdb_xmit() as well
> }
>
> return NETDEV_TX_OK;
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-08-20 12:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 12:42 [PATCH net-next 00/10] net: vxlan: add skb drop reasons support Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 01/10] net: vxlan: add vxlan to the drop reason subsystem Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 02/10] net: skb: add SKB_DR_RESET Menglong Dong
2024-08-20 12:24 ` Ido Schimmel
2024-08-21 12:55 ` Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 03/10] net: skb: introduce pskb_network_may_pull_reason() Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 04/10] net: ip: introduce pskb_inet_may_pull_reason() Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 05/10] net: vxlan: make vxlan_remcsum() return skb drop reasons Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 06/10] net: vxlan: add skb drop reasons to vxlan_rcv() Menglong Dong
2024-08-17 2:22 ` Jakub Kicinski
2024-08-17 11:33 ` Menglong Dong
2024-08-19 22:59 ` Jakub Kicinski
2024-08-21 12:51 ` Menglong Dong
2024-08-20 12:26 ` Ido Schimmel
2024-08-21 12:54 ` Menglong Dong
2024-08-15 12:42 ` [PATCH net-next 07/10] net: vxlan: use vxlan_kfree_skb() in vxlan_xmit() Menglong Dong
2024-08-20 12:28 ` Ido Schimmel [this message]
2024-08-21 12:57 ` Menglong Dong
2024-08-15 12:43 ` [PATCH net-next 08/10] net: vxlan: add drop reasons support to vxlan_xmit_one() Menglong Dong
2024-08-20 12:33 ` Ido Schimmel
2024-08-21 13:02 ` Menglong Dong
2024-08-15 12:43 ` [PATCH net-next 09/10] net: vxlan: use kfree_skb_reason in vxlan_encap_bypass Menglong Dong
2024-08-15 12:43 ` [PATCH net-next 10/10] net: vxlan: use vxlan_kfree_skb in encap_bypass_if_local Menglong Dong
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=ZsSL_QJfZqp6zqtc@shredder.mtl.com \
--to=idosch@nvidia.com \
--cc=amcohen@nvidia.com \
--cc=b.galvani@gmail.com \
--cc=bpoirier@nvidia.com \
--cc=davem@davemloft.net \
--cc=dongml2@chinatelecom.cn \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menglong8.dong@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
/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
Powered by JetHome