[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151002075845.062e1eb5@griffin>
Date: Fri, 2 Oct 2015 07:58:45 +0200
From: Jiri Benc <jbenc@...hat.com>
To: Pravin Shelar <pshelar@...ira.com>
Cc: netdev <netdev@...r.kernel.org>,
"dev@...nvswitch.org" <dev@...nvswitch.org>,
Jesse Gross <jesse@...ira.com>
Subject: Re: [PATCH net-next v2 3/4] ip_tunnels: introduce
ip6_tunnel_key_init
On Thu, 1 Oct 2015 17:11:43 -0700, Pravin Shelar wrote:
> On Thu, Oct 1, 2015 at 7:44 AM, Jiri Benc <jbenc@...hat.com> wrote:
> > +static inline void ip_tunnel_key_init(struct ip_tunnel_key *key,
> > + __be32 saddr, __be32 daddr,
> > + u8 tos, u8 ttl,
> > + __be16 tp_src, __be16 tp_dst,
> > + __be64 tun_id, __be16 tun_flags)
> > +{
> > + __ip_tunnel_key_init(key, tos, ttl, tp_src, tp_dst, tun_id,
> > + tun_flags);
> > + key->u.ipv4.src = saddr;
> > + key->u.ipv4.dst = daddr;
> > + memset((unsigned char *)key + IP_TUNNEL_KEY_IPV4_PAD,
> > + 0, IP_TUNNEL_KEY_IPV4_PAD_LEN);
> neat: since IP_TUNNEL_KEY_IPV4_PAD not really IPv4 tunnel key padding
> anymore, This also needs to be renamed.
It is IPv4 address padding. It is used to zero out the part of the
union of IPv6 and IPv4 addresses that is not occupied by IPv4
addresses. The name was just too long to include "ADDR", too.
The original pad constant was renamed to IP_TUNNEL_KEY_SIZE, thus is
not referencing IPv4 anymore.
> otherwise looks good.
>
> Acked-by: Pravin B Shelar <pshelar@...ira.com>
Thanks,
Jiri
--
Jiri Benc
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists