public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Nikolay Aleksandrov <razor@blackwall.org>
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
	davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, roopa@nvidia.com, petrm@nvidia.com,
	mlxsw@nvidia.com
Subject: Re: [PATCH net-next 09/11] vxlan: Add MDB data path support
Date: Wed, 15 Mar 2023 09:58:35 +0200	[thread overview]
Message-ID: <ZBF6q8zKx1nyW3TE@shredder> (raw)
In-Reply-To: <e695257a-58e2-c676-95cd-77df5c2b68cf@blackwall.org>

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!

  reply	other threads:[~2023-03-15  7:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 14:53 [PATCH net-next 00/11] vxlan: Add MDB support Ido Schimmel
2023-03-13 14:53 ` [PATCH net-next 01/11] net: Add MDB net device operations Ido Schimmel
2023-03-14 11:41   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 02/11] bridge: mcast: Implement " Ido Schimmel
2023-03-14 11:43   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 03/11] rtnetlink: bridge: mcast: Move MDB handlers out of bridge driver Ido Schimmel
2023-03-14 11:51   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 04/11] rtnetlink: bridge: mcast: Relax group address validation in common code Ido Schimmel
2023-03-14 11:51   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 05/11] vxlan: Move address helpers to private headers Ido Schimmel
2023-03-14 11:52   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 06/11] vxlan: Expose vxlan_xmit_one() Ido Schimmel
2023-03-14 11:52   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 07/11] vxlan: mdb: Add MDB control path support Ido Schimmel
2023-03-14 12:24   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 08/11] vxlan: mdb: Add an internal flag to indicate MDB usage Ido Schimmel
2023-03-14 12:24   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 09/11] vxlan: Add MDB data path support Ido Schimmel
2023-03-14 12:35   ` Nikolay Aleksandrov
2023-03-15  7:58     ` Ido Schimmel [this message]
2023-03-13 14:53 ` [PATCH net-next 10/11] vxlan: Enable MDB support Ido Schimmel
2023-03-14 12:35   ` Nikolay Aleksandrov
2023-03-13 14:53 ` [PATCH net-next 11/11] selftests: net: Add VXLAN MDB test Ido Schimmel
2023-03-14 12:35   ` Nikolay Aleksandrov

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=ZBF6q8zKx1nyW3TE@shredder \
    --to=idosch@nvidia.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    /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