From: David Miller <davem@davemloft.net>
To: u9012063@gmail.com
Cc: netdev@vger.kernel.org, petrm@mellanox.com
Subject: Re: [PATCH net] net: ip6_gre: fix tunnel metadata device sharing.
Date: Sat, 19 May 2018 23:33:23 -0400 (EDT) [thread overview]
Message-ID: <20180519.233323.264373261644119438.davem@davemloft.net> (raw)
In-Reply-To: <1526696548-8323-1-git-send-email-u9012063@gmail.com>
From: William Tu <u9012063@gmail.com>
Date: Fri, 18 May 2018 19:22:28 -0700
> Currently ip6gre and ip6erspan share single metadata mode device,
> using 'collect_md_tun'. Thus, when doing:
> ip link add dev ip6gre11 type ip6gretap external
> ip link add dev ip6erspan12 type ip6erspan external
> RTNETLINK answers: File exists
> simply fails due to the 2nd tries to create the same collect_md_tun.
>
> The patch fixes it by adding a separate collect md tunnel device
> for the ip6erspan, 'collect_md_tun_erspan'. As a result, a couple
> of places need to refactor/split up in order to distinguish ip6gre
> and ip6erspan.
>
> First, move the collect_md check at ip6gre_tunnel_{unlink,link} and
> create separate function {ip6gre,ip6ersapn}_tunnel_{link_md,unlink_md}.
> Then before link/unlink, make sure the link_md/unlink_md is called.
> Finally, a separate ndo_uninit is created for ip6erspan. Tested it
> using the samples/bpf/test_tunnel_bpf.sh.
>
> Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode")
> Signed-off-by: William Tu <u9012063@gmail.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2018-05-20 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-19 2:22 [PATCH net] net: ip6_gre: fix tunnel metadata device sharing William Tu
2018-05-20 3:33 ` David Miller [this message]
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=20180519.233323.264373261644119438.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
--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).