[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4a7d32c2-1ea4-469f-bb7e-74c9ce21ab81@redhat.com>
Date: Wed, 28 May 2025 08:39:02 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Tonghao Zhang <tonghao@...aicloud.com>, netdev@...r.kernel.org
Cc: Jay Vosburgh <jv@...sburgh.net>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>,
Andrew Lunn <andrew+netdev@...n.ch>,
Nikolay Aleksandrov <razor@...ckwall.org>,
Zengbing Tu <tuzengbing@...iglobal.com>
Subject: Re: [PATCH net-next v1 1/1] net: bonding: add bond_is_icmpv6_nd()
helper
On 5/22/25 10:57 AM, Tonghao Zhang wrote:
> Introduce ipv6 ns/nd checking helper, using skb_header_pointer()
> instead of pskb_network_may_pull() on tx path.
>
> alb_determine_nd introduced from commit 0da8aa00bfcfe
The patch does not apply cleanly. Please rebase and repost after the
merge window.
> diff --git a/include/net/bonding.h b/include/net/bonding.h
> index e06f0d63b2c1..32d9fcca858c 100644
> --- a/include/net/bonding.h
> +++ b/include/net/bonding.h
> @@ -29,6 +29,7 @@
> #include <net/bond_options.h>
> #include <net/ipv6.h>
> #include <net/addrconf.h>
> +#include <net/ndisc.h>
>
> #define BOND_MAX_ARP_TARGETS 16
> #define BOND_MAX_NS_TARGETS BOND_MAX_ARP_TARGETS
> @@ -814,4 +815,22 @@ static inline netdev_tx_t bond_tx_drop(struct net_device *dev, struct sk_buff *s
> return NET_XMIT_DROP;
> }
>
> +static inline bool bond_is_icmpv6_nd(struct sk_buff *skb)
> +{
> + struct {
> + struct ipv6hdr ip6;
> + struct icmp6hdr icmp6;
> + } *combined, _combined;
> +
> + combined = skb_header_pointer(skb, skb_mac_header_len(skb),
> + sizeof(_combined),
> + &_combined);
> + if (combined && combined->ip6.nexthdr == NEXTHDR_ICMP &&
> + (combined->icmp6.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION ||
> + combined->icmp6.icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT))
> + return true;
> +
> + return false;
> +}
No need to put this helper in public headers, you could use
drivers/net/bonding/bonding_priv.h instead.
/P
Powered by blists - more mailing lists