<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/ipv6.h, branch v5.17</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.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-02-17T04:37:47Z</updated>
<entry>
<title>ipv6: per-netns exclusive flowlabel checks</title>
<updated>2022-02-17T04:37:47Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2022-02-15T16:00:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b0dff5b3b98c5c7ce848151df9da0b3cdf0cc8b'/>
<id>urn:sha1:0b0dff5b3b98c5c7ce848151df9da0b3cdf0cc8b</id>
<content type='text'>
Ipv6 flowlabels historically require a reservation before use.
Optionally in exclusive mode (e.g., user-private).

Commit 59c820b2317f ("ipv6: elide flowlabel check if no exclusive
leases exist") introduced a fastpath that avoids this check when no
exclusive leases exist in the system, and thus any flowlabel use
will be granted.

That allows skipping the control operation to reserve a flowlabel
entirely. Though with a warning if the fast path fails:

  This is an optimization. Robust applications still have to revert to
  requesting leases if the fast path fails due to an exclusive lease.

Still, this is subtle. Better isolate network namespaces from each
other. Flowlabels are per-netns. Also record per-netns whether
exclusive leases are in use. Then behavior does not change based on
activity in other netns.

Changes
  v2
    - wrap in IS_ENABLED(CONFIG_IPV6) to avoid breakage if disabled

Fixes: 59c820b2317f ("ipv6: elide flowlabel check if no exclusive leases exist")
Link: https://lore.kernel.org/netdev/MWHPR2201MB1072BCCCFCE779E4094837ACD0329@MWHPR2201MB1072.namprd22.prod.outlook.com/
Reported-by: Congyu Liu &lt;liu3101@purdue.edu&gt;
Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Tested-by: Congyu Liu &lt;liu3101@purdue.edu&gt;
Link: https://lore.kernel.org/r/20220215160037.1976072-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: Don't include filter.h from net/sock.h</title>
<updated>2021-12-29T16:48:14Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-12-29T00:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6459415b384cb829f0b2a4268f211c789f6cf0b'/>
<id>urn:sha1:b6459415b384cb829f0b2a4268f211c789f6cf0b</id>
<content type='text'>
sock.h is pretty heavily used (5k objects rebuilt on x86 after
it's touched). We can drop the include of filter.h from it and
add a forward declaration of struct sk_filter instead.
This decreases the number of rebuilt objects when bpf.h
is touched from ~5k to ~1k.

There's a lot of missing includes this was masking. Primarily
in networking tho, this time.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@nvidia.com&gt;
Acked-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/bpf/20211229004913.513372-1-kuba@kernel.org
</content>
</entry>
<entry>
<title>ipv6: shrink struct ipcm6_cookie</title>
<updated>2021-11-16T13:10:34Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-11-15T19:02:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b31debca83284486cd736757b5f26d51719ef80'/>
<id>urn:sha1:1b31debca83284486cd736757b5f26d51719ef80</id>
<content type='text'>
gso_size can be moved after tclass, to use an existing hole.
(8 bytes saved on 64bit arches)

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: guard IPV6_MINHOPCOUNT with a static key</title>
<updated>2021-10-26T01:02:13Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2021-10-25T16:48:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=790eb67374d43f66102a80821d22188b6a0bc3bb'/>
<id>urn:sha1:790eb67374d43f66102a80821d22188b6a0bc3bb</id>
<content type='text'>
RFC 5082 IPV6_MINHOPCOUNT is rarely used on hosts.

Add a static key to remove from TCP fast path useless code,
and potential cache line miss to fetch tcp_inet6_sk(sk)-&gt;min_hopcount

Note that once ip6_min_hopcount static key has been enabled,
it stays enabled until next boot.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Soheil Hassas Yeganeh &lt;soheil@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipv6: Add a sysctl to control multipath hash fields</title>
<updated>2021-05-18T20:27:32Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@OSS.NVIDIA.COM</email>
</author>
<published>2021-05-17T18:15:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed13923f980ef84dde0b9010b9e09052dc31a909'/>
<id>urn:sha1:ed13923f980ef84dde0b9010b9e09052dc31a909</id>
<content type='text'>
A subsequent patch will add a new multipath hash policy where the packet
fields used for multipath hash calculation are determined by user space.
This patch adds a sysctl that allows user space to set these fields.

The packet fields are represented using a bitmask and are common between
IPv4 and IPv6 to allow user space to use the same numbering across both
protocols. For example, to hash based on standard 5-tuple:

 # sysctl -w net.ipv6.fib_multipath_hash_fields=0x0037
 net.ipv6.fib_multipath_hash_fields = 0x0037

To avoid introducing holes in 'struct netns_sysctl_ipv6', move the
'bindv6only' field after the multipath hash fields.

The kernel rejects unknown fields, for example:

 # sysctl -w net.ipv6.fib_multipath_hash_fields=0x1000
 sysctl: setting key "net.ipv6.fib_multipath_hash_fields": Invalid argument

Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>seg6: add support for IPv4 decapsulation in ipv6_srh_rcv()</title>
<updated>2021-03-12T00:09:21Z</updated>
<author>
<name>Julien Massonneau</name>
<email>julien.massonneau@6wind.com</email>
</author>
<published>2021-03-11T15:53:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee90c6ba341f7f72858196f15912c8b6b7d032e8'/>
<id>urn:sha1:ee90c6ba341f7f72858196f15912c8b6b7d032e8</id>
<content type='text'>
As specified in IETF RFC 8754, section 4.3.1.2, if the upper layer
header is IPv4 or IPv6, perform IPv6 decapsulation and resubmit the
decapsulated packet to the IPv4 or IPv6 module.
Only IPv6 decapsulation was implemented. This patch adds support for IPv4
decapsulation.

Link: https://tools.ietf.org/html/rfc8754#section-4.3.1.2
Signed-off-by: Julien Massonneau &lt;julien.massonneau@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: pass a sockptr_t into -&gt;setsockopt</title>
<updated>2020-07-24T22:41:54Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-07-23T06:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7b75c5a8c41445f33efb663887ff5f5c3b4454b'/>
<id>urn:sha1:a7b75c5a8c41445f33efb663887ff5f5c3b4454b</id>
<content type='text'>
Rework the remaining setsockopt code to pass a sockptr_t instead of a
plain user pointer.  This removes the last remaining set_fs(KERNEL_DS)
outside of architecture specific code.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt; [ieee802154]
Acked-by: Matthieu Baerts &lt;matthieu.baerts@tessares.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ipv6: switch ipv6_flowlabel_opt to sockptr_t</title>
<updated>2020-07-24T22:41:54Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-07-23T06:09:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86298285c9ae3a41ce21c2d00ebdde51dd2abc73'/>
<id>urn:sha1:86298285c9ae3a41ce21c2d00ebdde51dd2abc73</id>
<content type='text'>
Pass a sockptr_t to prepare for set_fs-less handling of the kernel
pointer from bpf-cgroup.

Note that the get case is pretty weird in that it actually copies data
back to userspace from setsockopt.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ipv6: remove compat_ipv6_{get,set}sockopt</title>
<updated>2020-07-20T01:16:41Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-07-17T06:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3021ad529950d07e0408d65d0f1df00454c1d223'/>
<id>urn:sha1:3021ad529950d07e0408d65d0f1df00454c1d223</id>
<content type='text'>
Handle the few cases that need special treatment in-line using
in_compat_syscall().  This also removes all the now unused
compat_{get,set}sockopt methods.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: add ip6_sock_set_recvpktinfo</title>
<updated>2020-05-28T18:11:46Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-05-28T05:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d7207c2d57080af93fc323dc6a85bd79207b4c6'/>
<id>urn:sha1:7d7207c2d57080af93fc323dc6a85bd79207b4c6</id>
<content type='text'>
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel
space without going through a fake uaccess.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
