[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsSNFMyN-MivgkKU@shredder.mtl.com>
Date: Tue, 20 Aug 2024 15:33:24 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Menglong Dong <menglong8.dong@...il.com>
Cc: kuba@...nel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, dsahern@...nel.org, dongml2@...natelecom.cn,
amcohen@...dia.com, gnault@...hat.com, bpoirier@...dia.com,
b.galvani@...il.com, razor@...ckwall.org, petrm@...dia.com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 08/10] net: vxlan: add drop reasons support to
vxlan_xmit_one()
On Thu, Aug 15, 2024 at 08:43:00PM +0800, Menglong Dong wrote:
> diff --git a/drivers/net/vxlan/drop.h b/drivers/net/vxlan/drop.h
> index da30cb4a9ed9..542f391b1273 100644
> --- a/drivers/net/vxlan/drop.h
> +++ b/drivers/net/vxlan/drop.h
> @@ -14,6 +14,7 @@
> R(VXLAN_DROP_MAC) \
> R(VXLAN_DROP_TXINFO) \
> R(VXLAN_DROP_REMOTE) \
> + R(VXLAN_DROP_REMOTE_IP) \
> /* deliberate comment for trailing \ */
>
> enum vxlan_drop_reason {
> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index 22e2bf532ac3..c1bae120727f 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c
> @@ -2375,6 +2375,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> bool xnet = !net_eq(vxlan->net, dev_net(vxlan->dev));
> bool no_eth_encap;
> __be32 vni = 0;
> + SKB_DR(reason);
>
> no_eth_encap = flags & VXLAN_F_GPE && skb->protocol != htons(ETH_P_TEB);
> if (!skb_vlan_inet_prepare(skb, no_eth_encap))
> @@ -2396,6 +2397,7 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> default_vni, true);
> return;
> }
> + reason = (u32)VXLAN_DROP_REMOTE_IP;
This looks quite obscure to me. I didn't know you can add 0.0.0.0 as
remote and I'm not sure what is the use case. Personally I wouldn't
bother with this reason.
> goto drop;
> }
Powered by blists - more mailing lists