<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/netns, branch v5.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-10-30T22:24:06Z</updated>
<entry>
<title>sctp: add encap_port for netns sock asoc and transport</title>
<updated>2020-10-30T22:24:06Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2020-10-29T07:05:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8a3001c2120c760017da81a307308572a3cdbbc'/>
<id>urn:sha1:e8a3001c2120c760017da81a307308572a3cdbbc</id>
<content type='text'>
encap_port is added as per netns/sock/assoc/transport, and the
latter one's encap_port inherits the former one's by default.
The transport's encap_port value would mostly decide if one
packet should go out with udp encapsulated or not.

This patch also allows users to set netns' encap_port by sysctl.

v1-&gt;v2:
  - Change to define encap_port as __be16 for sctp_sock, asoc and
    transport.
v2-&gt;v3:
  - No change.
v3-&gt;v4:
  - Add 'encap_port' entry in ip-sysctl.rst.
v4-&gt;v5:
  - Improve the description of encap_port in ip-sysctl.rst.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>sctp: create udp6 sock and set its encap_rcv</title>
<updated>2020-10-30T22:23:56Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2020-10-29T07:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d6ba260a0734d5e56243929a69d57ebbf0cb245'/>
<id>urn:sha1:9d6ba260a0734d5e56243929a69d57ebbf0cb245</id>
<content type='text'>
This patch is to add the udp6 sock part in sctp_udp_sock_start/stop().
udp_conf.use_udp6_rx_checksums is set to true, as:

   "The SCTP checksum MUST be computed for IPv4 and IPv6, and the UDP
    checksum SHOULD be computed for IPv4 and IPv6"

says in rfc6951#section-5.3.

v1-&gt;v2:
  - Add pr_err() when fails to create udp v6 sock.
  - Add #if IS_ENABLED(CONFIG_IPV6) not to create v6 sock when ipv6 is
    disabled.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>sctp: create udp4 sock and add its encap_rcv</title>
<updated>2020-10-30T22:23:52Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2020-10-29T07:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=965ae44412f8c0c19945b3f62bc945ad0b15a8aa'/>
<id>urn:sha1:965ae44412f8c0c19945b3f62bc945ad0b15a8aa</id>
<content type='text'>
This patch is to add the functions to create/release udp4 sock,
and set the sock's encap_rcv to process the incoming udp encap
sctp packets. In sctp_udp_rcv(), as we can see, all we need to
do is fix the transport header for sctp_rcv(), then it would
implement the part of rfc6951#section-5.4:

  "When an encapsulated packet is received, the UDP header is removed.
   Then, the generic lookup is performed, as done by an SCTP stack
   whenever a packet is received, to find the association for the
   received SCTP packet"

Note that these functions will be called in the last patch of
this patchset when enabling this feature.

v1-&gt;v2:
  - Add pr_err() when fails to create udp v4 sock.
v2-&gt;v3:
  - Add 'select NET_UDP_TUNNEL' in sctp Kconfig.
v3-&gt;v4:
  - No change.
v4-&gt;v5:
  - Change to set udp_port to 0 by default.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: remove obsolete version strings</title>
<updated>2020-10-12T08:06:39Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2020-10-12T07:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f726f3d37163f714034aa5fd1f92a1a73df4297f'/>
<id>urn:sha1:f726f3d37163f714034aa5fd1f92a1a73df4297f</id>
<content type='text'>
As pointed out by Jakub Kicinski here:
http://lore.kernel.org/r/20201009175751.5c54097f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com
this patch removes the obsolete version information of the different
CAN protocols and the AF_CAN core module.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Link: https://lore.kernel.org/r/20201012074354.25839-2-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2020-09-22T23:45:34Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2020-09-22T23:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ab0a7a0c349a1d7beb2bb371a62669d1528269d'/>
<id>urn:sha1:3ab0a7a0c349a1d7beb2bb371a62669d1528269d</id>
<content type='text'>
Two minor conflicts:

1) net/ipv4/route.c, adding a new local variable while
   moving another local variable and removing it's
   initial assignment.

2) drivers/net/dsa/microchip/ksz9477.c, overlapping changes.
   One pretty prints the port mode differently, whilst another
   changes the driver to try and obtain the port mode from
   the port node rather than the switch node.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nexthop: Convert to blocking notification chain</title>
<updated>2020-09-15T23:31:17Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@nvidia.com</email>
</author>
<published>2020-09-15T11:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=80690ec6b595807db9a52ec5b225a2d88033ddb5'/>
<id>urn:sha1:80690ec6b595807db9a52ec5b225a2d88033ddb5</id>
<content type='text'>
Currently, the only listener of the nexthop notification chain is the
VXLAN driver. Subsequent patches will add more listeners (e.g., device
drivers such as netdevsim) that need to be able to block when processing
notifications.

Therefore, convert the notification chain to a blocking one. This is
safe as notifications are always emitted from process context.

Signed-off-by: Ido Schimmel &lt;idosch@nvidia.com&gt;
Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: reflect tos value received in SYN to the socket</title>
<updated>2020-09-10T20:15:40Z</updated>
<author>
<name>Wei Wang</name>
<email>weiwan@google.com</email>
</author>
<published>2020-09-10T00:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac8f1710c12bb4c3626280ce03f05459ba8feef6'/>
<id>urn:sha1:ac8f1710c12bb4c3626280ce03f05459ba8feef6</id>
<content type='text'>
This commit adds a new TCP feature to reflect the tos value received in
SYN, and send it out on the SYN-ACK, and eventually set the tos value of
the established socket with this reflected tos value. This provides a
way to set the traffic class/QoS level for all traffic in the same
connection to be the same as the incoming SYN request. It could be
useful in data centers to provide equivalent QoS according to the
incoming request.
This feature is guarded by /proc/sys/net/ipv4/tcp_reflect_tos, and is by
default turned off.

Signed-off-by: Wei Wang &lt;weiwan@google.com&gt;
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>netfilter: nf_tables: coalesce multiple notifications into one skbuff</title>
<updated>2020-09-08T11:02:44Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2020-08-27T17:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67cc570edaa02016a8685a06a0ee91f05a6277d9'/>
<id>urn:sha1:67cc570edaa02016a8685a06a0ee91f05a6277d9</id>
<content type='text'>
On x86_64, each notification results in one skbuff allocation which
consumes at least 768 bytes due to the skbuff overhead.

This patch coalesces several notifications into one single skbuff, so
each notification consumes at least ~211 bytes, that ~3.5 times less
memory consumption. As a result, this is reducing the chances to exhaust
the netlink socket receive buffer.

Rule of thumb is that each notification batch only contains netlink
messages whose report flag is the same, nfnetlink_send() requires this
to do appropriate delivery to userspace, either via unicast (echo
mode) or multicast (monitor mode).

The skbuff control buffer is used to annotate the report flag for later
handling at the new coalescing routine.

The batch skbuff notification size is NLMSG_GOODSIZE, using a larger
skbuff would allow for more socket receiver buffer savings (to amortize
the cost of the skbuff even more), however, going over that size might
break userspace applications, so let's be conservative and stick to
NLMSG_GOODSIZE.

Reported-by: Phil Sutter &lt;phil@nwl.cc&gt;
Acked-by: Phil Sutter &lt;phil@nwl.cc&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>bpf, netns: Keep a list of attached bpf_link's</title>
<updated>2020-06-30T17:45:08Z</updated>
<author>
<name>Jakub Sitnicki</name>
<email>jakub@cloudflare.com</email>
</author>
<published>2020-06-25T14:13:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab53cad90eb10c9991f501ba08904680a074ef3d'/>
<id>urn:sha1:ab53cad90eb10c9991f501ba08904680a074ef3d</id>
<content type='text'>
To support multi-prog link-based attachments for new netns attach types, we
need to keep track of more than one bpf_link per attach type. Hence,
convert net-&gt;bpf.links into a list, that currently can be either empty or
have just one item.

Instead of reusing bpf_prog_list from bpf-cgroup, we link together
bpf_netns_link's themselves. This makes list management simpler as we don't
have to allocate, initialize, and later release list elements. We can do
this because multi-prog attachment will be available only for bpf_link, and
we don't need to build a list of programs attached directly and indirectly
via links.

No functional changes intended.

Signed-off-by: Jakub Sitnicki &lt;jakub@cloudflare.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200625141357.910330-4-jakub@cloudflare.com
</content>
</entry>
<entry>
<title>bpf, netns: Keep attached programs in bpf_prog_array</title>
<updated>2020-06-30T17:45:08Z</updated>
<author>
<name>Jakub Sitnicki</name>
<email>jakub@cloudflare.com</email>
</author>
<published>2020-06-25T14:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=695c12147a40181fe9221d321c3f2de33c9574ed'/>
<id>urn:sha1:695c12147a40181fe9221d321c3f2de33c9574ed</id>
<content type='text'>
Prepare for having multi-prog attachments for new netns attach types by
storing programs to run in a bpf_prog_array, which is well suited for
iterating over programs and running them in sequence.

After this change bpf(PROG_QUERY) may block to allocate memory in
bpf_prog_array_copy_to_user() for collected program IDs. This forces a
change in how we protect access to the attached program in the query
callback. Because bpf_prog_array_copy_to_user() can sleep, we switch from
an RCU read lock to holding a mutex that serializes updaters.

Because we allow only one BPF flow_dissector program to be attached to
netns at all times, the bpf_prog_array pointed by net-&gt;bpf.run_array is
always either detached (null) or one element long.

No functional changes intended.

Signed-off-by: Jakub Sitnicki &lt;jakub@cloudflare.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200625141357.910330-3-jakub@cloudflare.com
</content>
</entry>
</feed>
