netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Pravin Shelar <pshelar@nicira.com>
Cc: netdev <netdev@vger.kernel.org>,
	"dev@openvswitch.org" <dev@openvswitch.org>
Subject: Re: [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key
Date: Wed, 30 Sep 2015 09:09:46 +0200	[thread overview]
Message-ID: <20150930090946.4e4bb610@griffin> (raw)
In-Reply-To: <CALnjE+qWmENWj_hL87++Sk=zzrvj2U0VAEW26ySAjg5RsDymuA@mail.gmail.com>

On Tue, 29 Sep 2015 13:41:34 -0700, Pravin Shelar wrote:
> We can add rather add TUNNEL_IPV6 flag to distinguish IPv4 and IPv6
> tunnel keys. This can be stored in ip_tunnel_key.tun_flags.

Not really. This was my original approach, too, but openvswitch is not
the only user of struct ip_tunnel_key, and in the lwtunnel core,
tun_flags are handled in the way that makes this impractical. Most
importantly, the tun_flags value is directly taken from/stored to
LWTUNNEL_IP_FLAGS/LWTUNNEL_IP6_FLAGS netlink attributes in
net/ipv4/ip_tunnel_core.c. This would mean complicated masking, etc.

> That also saves space in flow key.

The field was added to a 2 byte hole in the struct sw_flow_key (leaving
still 1 byte free), thus there's no additional space used.

 Jiri

-- 
Jiri Benc

  reply	other threads:[~2015-09-30  7:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 17:52 [PATCH net-next 0/2] openvswitch: add IPv6 tunneling support Jiri Benc
2015-09-29 17:52 ` [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key Jiri Benc
2015-09-29 20:41   ` Pravin Shelar
2015-09-30  7:09     ` Jiri Benc [this message]
2015-09-30 20:13       ` Pravin Shelar
2015-09-30 20:25         ` [ovs-dev] " Jesse Gross
2015-09-30 20:52           ` Jiri Benc
2015-09-30  2:08   ` Jesse Gross
2015-09-30  7:14     ` Jiri Benc
2015-09-29 17:52 ` [PATCH net-next 2/2] openvswitch: netlink attributes for IPv6 tunneling Jiri Benc
2015-09-30  3:05   ` Jesse Gross
2015-09-30  7:28     ` Jiri Benc
2015-09-30 20:18       ` Jesse Gross
2015-09-30 21:05         ` Jiri Benc
2015-09-30 21:29           ` Jesse Gross

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=20150930090946.4e4bb610@griffin \
    --to=jbenc@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.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;
as well as URLs for NNTP newsgroup(s).