All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Stevens <dlstevens@us.ibm.com>
Cc: Cong Wang <amwang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, netdev-owner@vger.kernel.org
Subject: Re: [Patch net-next v1 3/4] vxlan: add ipv6 support
Date: Mon, 1 Apr 2013 08:36:16 -0700	[thread overview]
Message-ID: <20130401083616.1f9d9645@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <OF5EB046E4.6295C3A5-ON85257B40.00537077-85257B40.00542577@us.ibm.com>

On Mon, 1 Apr 2013 11:19:10 -0400
David Stevens <dlstevens@us.ibm.com> wrote:

> netdev-owner@vger.kernel.org wrote on 03/31/2013 01:43:44 AM:
>  
> > +struct vxlan_ip {
> > +   union {
> > +      __be32  ip4;
> > +#if IS_ENABLED(CONFIG_IPV6)
> > +      struct in6_addr ip6;
> > +#endif
> > +   };
> > +   __be16          proto;
> > +};
> > +
> 
>         This looks suspiciously like a sockaddr. sockaddr_storage is
> much bigger than you need, but you could just make it a sockaddr_in6
> and cast it to sockaddr_in when needed, make it sockaddr_in6 and use
> V4_MAPPED addresses for v4, or make it a union of sockaddr_in and
> sockaddr_in6, or have a buffer the size of sockaddr_in6 and use it
> as a sockaddr to determine the family, then go from there.
>         I think anything along those lines is better than a new variant
> with the same functionality of sockaddr that isn't an overlay of a
> sockaddr.
> 
>                                                         +-DLS
> 

That is exactly what I was thinking.

  reply	other threads:[~2013-04-01 15:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-31  5:43 [Patch net-next v1 1/4] vxlan: defer vxlan init as late as possible Cong Wang
2013-03-31  5:43 ` [Patch net-next v1 2/4] ipv6: export ipv6_sock_mc_join and ipv6_sock_mc_drop Cong Wang
2013-03-31  5:43 ` [Patch net-next v1 3/4] vxlan: add ipv6 support Cong Wang
2013-04-01 15:19   ` David Stevens
2013-04-01 15:36     ` Stephen Hemminger [this message]
2013-04-01 17:02     ` David Miller
2013-04-01 18:05       ` David Stevens
2013-04-01 18:15         ` David Miller
2013-04-01 20:03           ` David Stevens
2013-04-01 20:05             ` David Miller
2013-04-02  1:46         ` Cong Wang
2013-04-02 13:13           ` David Stevens
2013-04-01 20:14   ` Stephen Hemminger
2013-04-02  1:39     ` Cong Wang
2013-03-31  5:43 ` [Patch net-next v1 4/4] ipv6: Add generic UDP Tunnel segmentation Cong Wang
2013-03-31  6:17 ` [PATCH iproute2] vxlan: add ipv6 support Cong Wang

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=20130401083616.1f9d9645@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dlstevens@us.ibm.com \
    --cc=netdev-owner@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.