[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZBF6q8zKx1nyW3TE@shredder>
Date: Wed, 15 Mar 2023 09:58:35 +0200
From: Ido Schimmel <idosch@...dia.com>
To: Nikolay Aleksandrov <razor@...ckwall.org>
Cc: netdev@...r.kernel.org, bridge@...ts.linux-foundation.org,
davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, roopa@...dia.com, petrm@...dia.com,
mlxsw@...dia.com
Subject: Re: [PATCH net-next 09/11] vxlan: Add MDB data path support
On Tue, Mar 14, 2023 at 02:35:08PM +0200, Nikolay Aleksandrov wrote:
> On 13/03/2023 16:53, Ido Schimmel wrote:
> > +struct vxlan_mdb_entry *vxlan_mdb_entry_skb_get(struct vxlan_dev *vxlan,
> > + struct sk_buff *skb,
> > + __be32 src_vni)
> > +{
> > + struct vxlan_mdb_entry *mdb_entry;
> > + struct vxlan_mdb_entry_key group;
> > +
> > + if (!is_multicast_ether_addr(eth_hdr(skb)->h_dest) ||
> > + is_broadcast_ether_addr(eth_hdr(skb)->h_dest))
> > + return NULL;
> > +
> > + /* When not in collect metadata mode, 'src_vni' is zero, but MDB
> > + * entries are stored with the VNI of the VXLAN device.
> > + */
> > + if (!(vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA))
> > + src_vni = vxlan->default_dst.remote_vni;
> > +
> > + memset(&group, 0, sizeof(group));
> > + group.vni = src_vni;
> > +
> > + switch (ntohs(skb->protocol)) {
>
> drop the ntohs and..
>
> > + case ETH_P_IP:
>
> htons(ETH_P_IP)
Done. Thanks a lot for the review!
Powered by blists - more mailing lists