From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>
Cc: davem@davemloft.net, Jiri Benc <jbenc@redhat.com>,
Thomas Graf <tgraf@suug.ch>,
u9012063@gmail.com
Subject: [PATCH net-next 0/6] net: add support for ip_tun_info options setting
Date: Mon, 16 Sep 2019 15:10:14 +0800 [thread overview]
Message-ID: <cover.1568617721.git.lucien.xin@gmail.com> (raw)
With this patchset, users can configure options with LWTUNNEL_IP(6)_OPTS
by ip route encap for ersapn or vxlan lwtunnel. Note that in kernel part
it won't parse the option details but do some check and memcpy only, and
the options will be parsed by iproute in userspace.
We also improve the vxlan and erspan options processing in this patchset.
As an example I also wrote a patch for iproute2 that I will reply on this
mail, with it we can add options for erspan lwtunnel like:
# ip net a a; ip net a b
# ip -n a l a eth0 type veth peer name eth0 netns b
# ip -n a l s eth0 up; ip -n b link set eth0 up
# ip -n a a a 10.1.0.1/24 dev eth0; ip -n b a a 10.1.0.2/24 dev eth0
# ip -n b l a erspan1 type erspan key 1 seq erspan 123 \
local 10.1.0.2 remote 10.1.0.1
# ip -n b a a 1.1.1.1/24 dev erspan1; ip -n b l s erspan1 up
# ip -n b r a 2.1.1.0/24 dev erspan1
# ip -n a l a erspan1 type erspan key 1 seq local 10.1.0.1 external
# ip -n a a a 2.1.1.1/24 dev erspan1; ip -n a l s erspan1 up
# ip -n a r a 1.1.1.0/24 encap ip id 1 erspan ver 1 idx 123 \
dst 10.1.0.2 dev erspan1
# ip -n a r s; ip net exec a ping 1.1.1.1 -c 1
Xin Long (6):
lwtunnel: add options process for arp request
lwtunnel: add LWTUNNEL_IP_OPTS support for lwtunnel_ip
lwtunnel: add LWTUNNEL_IP6_OPTS support for lwtunnel_ip6
vxlan: check tun_info options_len properly
erspan: fix the tun_info options_len check
erspan: make md work without TUNNEL_ERSPAN_OPT set
drivers/net/vxlan.c | 6 +++--
include/uapi/linux/lwtunnel.h | 2 ++
net/ipv4/ip_gre.c | 31 ++++++++++-------------
net/ipv4/ip_tunnel_core.c | 59 +++++++++++++++++++++++++++++++++----------
net/ipv6/ip6_gre.c | 35 +++++++++++++------------
5 files changed, 84 insertions(+), 49 deletions(-)
--
2.1.0
next reply other threads:[~2019-09-16 7:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 7:10 Xin Long [this message]
2019-09-16 7:10 ` [PATCH net-next 1/6] lwtunnel: add options process for arp request Xin Long
2019-09-16 7:10 ` [PATCH net-next 2/6] lwtunnel: add LWTUNNEL_IP_OPTS support for lwtunnel_ip Xin Long
2019-09-16 7:10 ` [PATCH net-next 3/6] lwtunnel: add LWTUNNEL_IP6_OPTS support for lwtunnel_ip6 Xin Long
2019-09-16 7:10 ` [PATCH net-next 4/6] vxlan: check tun_info options_len properly Xin Long
2019-09-16 7:10 ` [PATCH net-next 5/6] erspan: fix the tun_info options_len check Xin Long
2019-09-16 7:10 ` [PATCH net-next 6/6] erspan: make md work without TUNNEL_ERSPAN_OPT set Xin Long
2019-09-16 7:17 ` [PATCH net-next 0/6] net: add support for ip_tun_info options setting Xin Long
2019-09-16 7:20 ` David Miller
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=cover.1568617721.git.lucien.xin@gmail.com \
--to=lucien.xin@gmail.com \
--cc=davem@davemloft.net \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=u9012063@gmail.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).