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!