<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/ip_tunnels.h, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-02-27T20:50:17Z</updated>
<entry>
<title>route: Add multipath_hash in flowi_common to make user-define hash</title>
<updated>2019-02-27T20:50:17Z</updated>
<author>
<name>wenxu</name>
<email>wenxu@ucloud.cn</email>
</author>
<published>2019-02-24T03:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24ba14406c5c8e33fcbe064f77b3ab01b84ec830'/>
<id>urn:sha1:24ba14406c5c8e33fcbe064f77b3ab01b84ec830</id>
<content type='text'>
Current fib_multipath_hash_policy can make hash based on the L3 or
L4. But it only work on the outer IP. So a specific tunnel always
has the same hash value. But a specific tunnel may contain so many
inner connections.

This patch provide a generic multipath_hash in floi_common. It can
make a user-define hash which can mix with L3 or L4 hash.

Signed-off-by: wenxu &lt;wenxu@ucloud.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ip_tunnel: Add tnl_update_pmtu in ip_md_tunnel_xmit</title>
<updated>2019-01-26T17:43:03Z</updated>
<author>
<name>wenxu</name>
<email>wenxu@ucloud.cn</email>
</author>
<published>2019-01-22T10:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8b34e680a090ab8dc42f8331020e31052b49a70'/>
<id>urn:sha1:c8b34e680a090ab8dc42f8331020e31052b49a70</id>
<content type='text'>
Add tnl_update_pmtu in ip_md_tunnel_xmit to dynamic modify
the pmtu which packet send through collect_metadata mode
ip tunnel

Signed-off-by: wenxu &lt;wenxu@ucloud.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ip: validate header length on virtual device xmit</title>
<updated>2019-01-01T20:05:02Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2018-12-30T22:24:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb9f1b783850b14cbd7f87d061d784a666dfba1f'/>
<id>urn:sha1:cb9f1b783850b14cbd7f87d061d784a666dfba1f</id>
<content type='text'>
KMSAN detected read beyond end of buffer in vti and sit devices when
passing truncated packets with PF_PACKET. The issue affects additional
ip tunnel devices.

Extend commit 76c0ddd8c3a6 ("ip6_tunnel: be careful when accessing the
inner header") and commit ccfec9e5cb2d ("ip_tunnel: be careful when
accessing the inner header").

Move the check to a separate helper and call at the start of each
ndo_start_xmit function in net/ipv4 and net/ipv6.

Minor changes:
- convert dev_kfree_skb to kfree_skb on error path,
  as dev_kfree_skb calls consume_skb which is not for error paths.
- use pskb_network_may_pull even though that is pedantic here,
  as the same as pskb_may_pull for devices without llheaders.
- do not cache ipv6 hdrs if used only once
  (unsafe across pskb_may_pull, was more relevant to earlier patch)

Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-12-20T19:53:36Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-12-20T18:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2be09de7d6a06f58e768de1255a687c9aaa66606'/>
<id>urn:sha1:2be09de7d6a06f58e768de1255a687c9aaa66606</id>
<content type='text'>
Lots of conflicts, by happily all cases of overlapping
changes, parallel adds, things of that nature.

Thanks to Stephen Rothwell, Saeed Mahameed, and others
for their guidance in these resolutions.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>iptunnel: make TUNNEL_FLAGS available in uapi</title>
<updated>2018-12-19T23:58:01Z</updated>
<author>
<name>wenxu</name>
<email>wenxu@ucloud.cn</email>
</author>
<published>2018-12-19T06:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1875a9ab01dfa96b06cb6649cb1ce56efa86c7cb'/>
<id>urn:sha1:1875a9ab01dfa96b06cb6649cb1ce56efa86c7cb</id>
<content type='text'>
ip l add dev tun type gretap external
ip r a 10.0.0.1 encap ip dst 192.168.152.171 id 1000 dev gretap

For gretap Key example when the command set the id but don't set the
TUNNEL_KEY flags. There is no key field in the send packet

In the lwtunnel situation, some TUNNEL_FLAGS should can be set by
userspace

Signed-off-by: wenxu &lt;wenxu@ucloud.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udp: Support for error handlers of tunnels with arbitrary destination port</title>
<updated>2018-11-09T01:13:08Z</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2018-11-08T11:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7cc082455cb49ea937a3ec4ab3d001b0b5f137b'/>
<id>urn:sha1:e7cc082455cb49ea937a3ec4ab3d001b0b5f137b</id>
<content type='text'>
ICMP error handling is currently not possible for UDP tunnels not
employing a receiving socket with local destination port matching the
remote one, because we have no way to look them up.

Add an err_handler tunnel encapsulation operation that can be exported by
tunnels in order to pass the error to the protocol implementing the
encapsulation. We can't easily use a lookup function as we did for VXLAN
and GENEVE, as protocol error handlers, which would be in turn called by
implementations of this new operation, handle the errors themselves,
together with the tunnel lookup.

Without a socket, we can't be sure which encapsulation error handler is
the appropriate one: encapsulation handlers (the ones for FoU and GUE
introduced in the next patch, e.g.) will need to check the new error codes
returned by protocol handlers to figure out if errors match the given
encapsulation, and, in turn, report this error back, so that we can try
all of them in __udp{4,6}_lib_err_encap_no_sk() until we have a match.

v2:
- Name all arguments in err_handler prototypes (David Miller)

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: check tunnel option type in tunnel flags</title>
<updated>2018-06-29T14:50:26Z</updated>
<author>
<name>Pieter Jansen van Vuuren</name>
<email>pieter.jansenvanvuuren@netronome.com</email>
</author>
<published>2018-06-27T04:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=256c87c17c53e60882a43dcf3e98f3bf859eaf6f'/>
<id>urn:sha1:256c87c17c53e60882a43dcf3e98f3bf859eaf6f</id>
<content type='text'>
Check the tunnel option type stored in tunnel flags when creating options
for tunnels. Thereby ensuring we do not set geneve, vxlan or erspan tunnel
options on interfaces that are not associated with them.

Make sure all users of the infrastructure set correct flags, for the BPF
helper we have to set all bits to keep backward compatibility.

Signed-off-by: Pieter Jansen van Vuuren &lt;pieter.jansenvanvuuren@netronome.com&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ipv4: Update ip_tunnel_metadata_cnt static key to modern api</title>
<updated>2018-05-10T19:13:33Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2018-05-08T16:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5263a98f162f7a46e1292632c87f1e3444eb8fbf'/>
<id>urn:sha1:5263a98f162f7a46e1292632c87f1e3444eb8fbf</id>
<content type='text'>
No changes in refcount semantics -- key init is false; replace

static_key_slow_inc|dec   with   static_branch_inc|dec
static_key_false          with   static_branch_unlikely

Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: add ttl inherit support</title>
<updated>2018-04-17T17:53:13Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2018-04-17T06:11:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72f6d71e491e6ce269b564865b21fab0a4402dd3'/>
<id>urn:sha1:72f6d71e491e6ce269b564865b21fab0a4402dd3</id>
<content type='text'>
Like tos inherit, ttl inherit should also means inherit the inner protocol's
ttl values, which actually not implemented in vxlan yet.

But we could not treat ttl == 0 as "use the inner TTL", because that would be
used also when the "ttl" option is not specified and that would be a behavior
change, and breaking real use cases.

So add a different attribute IFLA_VXLAN_TTL_INHERIT when "ttl inherit" is
specified with ip cmd.

Reported-by: Jianlin Shi &lt;jishi@redhat.com&gt;
Suggested-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: do not create fallback tunnels for non-default namespaces</title>
<updated>2018-03-09T16:23:11Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2018-03-08T20:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=79134e6ce2c9d1a00eab4d98cb48f975dd2474cb'/>
<id>urn:sha1:79134e6ce2c9d1a00eab4d98cb48f975dd2474cb</id>
<content type='text'>
fallback tunnels (like tunl0, gre0, gretap0, erspan0, sit0,
ip6tnl0, ip6gre0) are automatically created when the corresponding
module is loaded.

These tunnels are also automatically created when a new network
namespace is created, at a great cost.

In many cases, netns are used for isolation purposes, and these
extra network devices are a waste of resources. We are using
thousands of netns per host, and hit the netns creation/delete
bottleneck a lot. (Many thanks to Kirill for recent work on this)

Add a new sysctl so that we can opt-out from this automatic creation.

Note that these tunnels are still created for the initial namespace,
to be the least intrusive for typical setups.

Tested:
lpk43:~# cat add_del_unshare.sh
for i in `seq 1 40`
do
 (for j in `seq 1 100` ; do  unshare -n /bin/true &gt;/dev/null ; done) &amp;
done
wait

lpk43:~# echo 0 &gt;/proc/sys/net/core/fb_tunnels_only_for_init_net
lpk43:~# time ./add_del_unshare.sh

real	0m37.521s
user	0m0.886s
sys	7m7.084s
lpk43:~# echo 1 &gt;/proc/sys/net/core/fb_tunnels_only_for_init_net
lpk43:~# time ./add_del_unshare.sh

real	0m4.761s
user	0m0.851s
sys	1m8.343s
lpk43:~#

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
