Re: [PATCH bpf-next] xsk: proper AF_XDP socket teardown ordering

2018-10-08 Thread Daniel Borkmann
On 10/05/2018 01:25 PM, Björn Töpel wrote: > From: Björn Töpel > > The AF_XDP socket struct can exist in three different, implicit > states: setup, bound and released. Setup is prior the socket has been > bound to a device. Bound is when the socket is active for receive and > send. Released is wh

Re: [PATCH net] bpf: do not blindly change rlimit in reuseport net selftest

2018-10-08 Thread Daniel Borkmann
On 10/06/2018 04:38 AM, Eric Dumazet wrote: > If the current process has unlimited RLIMIT_MEMLOCK, > we should should leave it as is. > > Fixes: 941ff6f11c02 ("bpf: fix rlimit in reuseport net selftest") > Signed-off-by: John Sperbeck > Signed-off-by: Eric Dumazet > Cc: Daniel Borkmann Applied

Re: [PATCH bpf-next 00/12] nfp: bpf: add support for BPF-to-BPF function calls

2018-10-08 Thread Daniel Borkmann
On 10/07/2018 01:56 PM, Quentin Monnet wrote: > This patch series adds support for hardware offload of programs containing > BPF-to-BPF function calls. First, a new callback is added to the kernel > verifier, to collect information after the main part of the verification > has been performed. Then

Re: [PATCH net-next 02/11] net: sched: cls_u32: make sure that divisor is a power of 2

2018-10-08 Thread Sergei Shtylyov
Hello! On 07.10.2018 19:38, Jamal Hadi Salim wrote: From: Al Viro Tested by modifying iproute2 to to allow One "to" is enough, no? :-) sending a divisor > 255 Tested-by: Jamal Hadi Salim Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim [...] MBR, Sergei

[PATCH net-next] netdev: remove useless codes of tun_automq_select_queue

2018-10-08 Thread Wang Li
Because the function __skb_get_hash_symmetric always returns non-zero. Signed-off-by: Zhang Yu Signed-off-by: Wang Li --- drivers/net/tun.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e2648

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 07:29:13PM -0600, David Ahern wrote: > On 10/7/18 4:29 AM, Christian Brauner wrote: > >> I thought about that, but there is so much overlap - they are mostly > >> common. Besides, ifinfomsg is the header for link dumps, and ifinfomsg > >> is the one that has been (ab)used fo

[PATCH v1 3/5] can: add socket type for CAN_J1939

2018-10-08 Thread Oleksij Rempel
This patch is a preparation for SAE J1939 and adds CAN_J1939 socket type. Signed-off-by: Kurt Van Dijck Signed-off-by: Oleksij Rempel --- include/uapi/linux/can.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/can.h b/include/uapi/linux/can.h index 0afb

[PATCH v1 0/5] can: add SAE J1939 protocol

2018-10-08 Thread Oleksij Rempel
This series adds SAE J1939 support to the current kernel v4.19-rc6. This stack has long history, starting back in 27 Apr 2011, if not earlier: https://lists.openwall.net/netdev/2011/04/27/45 After major rework and testing it is a time to send it mainline. Kurt Van Dijck (2): mailmap: update em

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-08 Thread Lorenz Bauer
On Fri, 5 Oct 2018 at 22:07, Alexei Starovoitov wrote: > > On Fri, Oct 05, 2018 at 04:27:58PM +0200, Jann Horn wrote: > > > > Can you please describe exactly why something that is not a kernel > > unit test needs deterministic BPF hash map behavior? > > my use case for deterministic hashing is per

Re: [PATCH net-next 00/11] net: sched: cls_u32 Various improvements

2018-10-08 Thread Jamal Hadi Salim
On 2018-10-08 2:11 a.m., Al Viro wrote: On Sun, Oct 07, 2018 at 10:55:52PM -0700, David Miller wrote: From: Al Viro Date: Mon, 8 Oct 2018 06:45:15 +0100 Er... Both are due to missing in the very beginning of the series (well, on top of "net: sched: cls_u32: fix hnode refcounting") commit A

[PATCH v1 5/5] can: add support of SAE J1939 protocol.

2018-10-08 Thread Oleksij Rempel
From: The j1939 authors SAE J1939 is the vehicle bus recommended practice used for communication and diagnostics among vehicle components. Originating in the car and heavy-duty truck industry in the United States, it is now widely used in other parts of the world. J1939, ISO 11783 and NMEA 2000

[PATCH v1 2/5] can: introduce REQUIRED_SIZE macro

2018-10-08 Thread Oleksij Rempel
From: Kurt Van Dijck The size of this structure will be increased with J1939 support. To stay binary compatible, the REQUIRED_SIZE macro is introduced for existing CAN protocols. Signed-off-by: Kurt Van Dijck Signed-off-by: Oleksij Rempel --- include/linux/can/core.h | 8 net/can/bcm

[PATCH v1 4/5] can: extend sockaddr_can to include j1939 members

2018-10-08 Thread Oleksij Rempel
This patch prepares struct sockaddr_can for SAE J1939. Signed-off-by: Kurt Van Dijck Signed-off-by: Oleksij Rempel --- include/uapi/linux/can.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/uapi/linux/can.h b/include/uapi/linux/can.h index 06d92d6be6e6..1e988fde

[PATCH v1 1/5] mailmap: update email address

2018-10-08 Thread Oleksij Rempel
From: Kurt Van Dijck This commit replaces my company's email address with a stable private address. Signed-off-by: Kurt Van Dijck Signed-off-by: Marc Kleine-Budde Signed-off-by: Oleksij Rempel --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 285e0964

Re: [PATCH net-next 02/11] net: sched: cls_u32: make sure that divisor is a power of 2

2018-10-08 Thread Jamal Hadi Salim
On 2018-10-08 4:46 a.m., Sergei Shtylyov wrote: Hello! On 07.10.2018 19:38, Jamal Hadi Salim wrote: From: Al Viro Tested by modifying iproute2 to to allow    One "to" is enough, no? :-) Will fix in updated version. cheers, jamal

Re: [PATCH v2 net-next 04/23] netlink: Add strict version of nlmsg_parse and nla_parse

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:25PM -0700, David Ahern wrote: > From: David Ahern > > nla_parse is currently lenient on message parsing, allowing type to be 0 > or greater than max expected and only logging a message > > "netlink: %d bytes leftover after parsing attributes in process `%s'." >

Re: [PATCH v2 net-next 06/23] netlink: Add new socket option to enable strict checking on dumps

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:27PM -0700, David Ahern wrote: > From: David Ahern > > Add a new socket option, NETLINK_DUMP_STRICT_CHK, that userspace > can use via setsockopt to request strict checking of headers and > attributes on dump requests. > > To get dump features such as kernel side fil

Re: [PATCH v2 net-next 07/23] net/ipv4: Update inet_dump_ifaddr for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:28PM -0700, David Ahern wrote: > From: David Ahern > > Update inet_dump_ifaddr for strict data checking. If the flag is set, > the dump request is expected to have an ifaddrmsg struct as the header > potentially followed by one or more attributes. Any data passed in

Re: [PATCH v2 net-next 08/23] net/ipv6: Update inet6_dump_addr for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:29PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_addr for strict data checking. If the flag is set, the > dump request is expected to have an ifaddrmsg struct as the header > potentially followed by one or more attributes. Any data passed in t

Re: [PATCH v2 net-next 09/23] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:30PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_dump_ifinfo for strict data checking. If the flag is set, > the dump request is expected to have an ifinfomsg struct as the header > potentially followed by one or more attributes. Any data passed in

Re: [PATCH v2 net-next 10/23] rtnetlink: Update rtnl_bridge_getlink for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:31PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_bridge_getlink for strict data checking. If the flag is set, > the dump request is expected to have an ifinfomsg struct as the header > potentially followed by one or more attributes. Any data passed

Re: [PATCH v2 net-next 11/23] rtnetlink: Update rtnl_stats_dump for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:32PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_stats_dump for strict data checking. If the flag is set, > the dump request is expected to have an if_stats_msg struct as the header. > All elements of the struct are expected to be 0 except filter_ma

[PATCH net-next] netdev: remove useless codes of tun_automq_select_queue

2018-10-08 Thread Wang Li
Because the function __skb_get_hash_symmetric always returns non-zero. Signed-off-by: Zhang Yu Signed-off-by: Wang Li --- drivers/net/tun.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e2648

Re: [PATCH v2 net-next 12/23] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:33PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_ifinfo for strict data checking. If the flag is > set, the dump request is expected to have an ifinfomsg struct as > the header. All elements of the struct are expected to be 0 and no > attribut

[PATCH net-next v2 01/12] net: sched: cls_u32: mark root hnode explicitly

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro ... and produce consistent error on attempt to delete such. Existing check in u32_delete() is inconsistent - after tc qdisc add dev eth0 ingress tc filter add dev eth0 parent : protocol ip prio 100 handle 1: u32 \ divisor 1 tc filter add dev eth0 parent : protocol ip prio 2

[PATCH net-next v2 12/12] net: sched: cls_u32: simplify the hell out u32_delete() emptiness check

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro Now that we have the knode count, we can instantly check if any hnodes are non-empty. And that kills the check for extra references to root hnode - those could happen only if there was a knode to carry such a link. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/

[PATCH net-next v2 04/12] net: sched: cls_u32: get rid of unused argument of u32_destroy_key()

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index ce55eea448a0..ef0f2e6ec422 100644 --- a/net/sched/cls_u32.c +++ b/net/s

[PATCH net-next v2 08/12] net: sched: cls_u32: pass tc_u_common to u32_set_parms() instead of tc_u_hnode

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro the only thing we used ht for was ht->tp_c and callers can get that without going through ->tp_c at all; start with lifting that into the callers, next commits will massage those, eventually removing ->tp_c altogether. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- n

[PATCH net-next v2 03/12] net: sched: cls_u32: make sure that divisor is a power of 2

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro Tested by modifying iproute2 to allow sending a divisor > 255 Tested-by: Jamal Hadi Salim Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_

[PATCH net-next v2 11/12] net: sched: cls_u32: keep track of knodes count in tc_u_common

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro allows to simplify u32_delete() considerably Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 3d4c360f9b0c..61593bee08db 100644 --- a/net/sched

[PATCH net-next v2 00/12] net: sched: cls_u32 Various improvements

2018-10-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Various improvements from Al. Changes from version 1: Add missing commit Al Viro (11): net: sched: cls_u32: mark root hnode explicitly net: sched: cls_u32: disallow linking to root hnode net: sched: cls_u32: make sure that divisor is a power of 2 net: sched: cls_

[PATCH net-next v2 05/12] net: sched: cls_u32: get rid of tc_u_knode ->tp

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro not used anymore Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index ef0f2e6ec422..810c49ac1bbe 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u

[PATCH net-next v2 02/12] net: sched: cls_u32: disallow linking to root hnode

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro Operation makes no sense. Nothing will actually break if we do so (depth limit in u32_classify() will prevent infinite loops), but according to maintainers it's best prohibited outright. NOTE: doing so guarantees that u32_destroy() will trigger the call of u32_destroy_hnode(); we

[PATCH net-next v2 10/12] net: sched: cls_u32: get rid of tp_c

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro Both hnode ->tp_c and tp_c argument of u32_set_parms() the latter is redundant, the former - never read... Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/net/sched/cls

[PATCH net-next v2 07/12] net: sched: cls_u32: clean tc_u_common hashtable

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro * calculate key *once*, not for each hash chain element * let tc_u_hash() return the pointer to chain head rather than index - callers are cleaner that way. Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 24 +--- 1 file chang

[PATCH net-next v2 09/12] net: sched: cls_u32: the tp_c argument of u32_set_parms() is always tp->data

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro It must be tc_u_common associated with that tp (i.e. tp->data). Proof: * both ->ht_up and ->tp_c are assign-once * ->tp_c of anything inserted into tp_c->hlist is tp_c * hnodes never get reinserted into the lists or moved between those, so anything found by u

[PATCH net-next v2 06/12] net: sched: cls_u32: get rid of tc_u_common ->rcu

2018-10-08 Thread Jamal Hadi Salim
From: Al Viro unused Signed-off-by: Al Viro Signed-off-by: Jamal Hadi Salim --- net/sched/cls_u32.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 810c49ac1bbe..c378168f4562 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -98,7

[PATCH v2 0/3] bpf: allow zero-initialising hash map seed

2018-10-08 Thread Lorenz Bauer
Allow forcing the seed of a hash table to zero, for deterministic execution during benchmarking and testing. Comments adressed from v1: * Add comment to discourage production use to linux/bpf.h * Require CAP_SYS_ADMIN Lorenz Bauer (3): bpf: allow zero-initializing hash map seed tools: sync li

[PATCH v2 1/3] bpf: allow zero-initializing hash map seed

2018-10-08 Thread Lorenz Bauer
Add a new flag BPF_F_ZERO_SEED, which forces a hash map to initialize the seed to zero. This is useful when doing performance analysis both on individual BPF programs, as well as the kernel's hash table implementation. Signed-off-by: Lorenz Bauer --- include/uapi/linux/bpf.h | 2 ++ kernel/bpf/

[PATCH v2 2/3] tools: sync linux/bpf.h

2018-10-08 Thread Lorenz Bauer
Synchronize changes to linux/bpf.h from commit 88db241b34bf ("bpf: allow zero-initializing hash map seed"). Signed-off-by: Lorenz Bauer --- tools/include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f

[PATCH v2 3/3] tools: add selftest for BPF_F_ZERO_SEED

2018-10-08 Thread Lorenz Bauer
Check that iterating two separate hash maps produces the same order of keys if BPF_F_ZERO_SEED is used. Signed-off-by: Lorenz Bauer --- tools/testing/selftests/bpf/test_maps.c | 68 + 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/

Re: [PATCH v2 net-next 13/23] rtnetlink: Update ipmr_rtm_dumplink for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:34PM -0700, David Ahern wrote: > From: David Ahern > > Update ipmr_rtm_dumplink for strict data checking. If the flag is set, > the dump request is expected to have an ifinfomsg struct as the header. > All elements of the struct are expected to be 0 and no attributes

Re: [PATCH v2 net-next 15/23] net/neighbor: Update neigh_dump_info for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:36PM -0700, David Ahern wrote: > From: David Ahern > > Update neigh_dump_info for strict data checking. If the flag is set, > the dump request is expected to have an ndmsg struct as the header > potentially followed by one or more attributes. Any data passed in the >

Re: [PATCH v2 net-next 16/23] net/neighbor: Update neightbl_dump_info for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:37PM -0700, David Ahern wrote: > From: David Ahern > > Update neightbl_dump_info for strict data checking. If the flag is set, > the dump request is expected to have an ndtmsg struct as the header. > All elements of the struct are expected to be 0 and no attributes c

Re: [PATCH v2 net-next 18/23] net/fib_rules: Update fib_nl_dumprule for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:39PM -0700, David Ahern wrote: > From: David Ahern > > Update fib_nl_dumprule for strict data checking. If the flag is set, > the dump request is expected to have fib_rule_hdr struct as the header. > All elements of the struct are expected to be 0 and no attributes c

Re: [PATCH v2 net-next 20/23] net: Update netconf dump handlers for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:41PM -0700, David Ahern wrote: > From: David Ahern > > Update inet_netconf_dump_devconf, inet6_netconf_dump_devconf, and > mpls_netconf_dump_devconf for strict data checking. If the flag is set, > the dump request is expected to have an netconfmsg struct as the heade

Re: [PATCH v2 net-next 19/23] net/ipv6: Update ip6addrlbl_dump for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:40PM -0700, David Ahern wrote: > From: David Ahern > > Update ip6addrlbl_dump for strict data checking. If the flag is set, > the dump request is expected to have an ifaddrlblmsg struct as the > header. All elements of the struct are expected to be 0 and no > attribu

Re: [PATCH v2 net-next 17/23] net/namespace: Update rtnl_net_dumpid for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:38PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_net_dumpid for strict data checking. If the flag is set, > the dump request is expected to have an rtgenmsg struct as the header > which has the family as the only element. No data may be appended. >

Re: [PATCH v2 net-next 21/23] net/bridge: Update br_mdb_dump for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:42PM -0700, David Ahern wrote: > From: David Ahern > > Update br_mdb_dump for strict data checking. If the flag is set, > the dump request is expected to have a br_port_msg struct as the > header. All elements of the struct are expected to be 0 and no > attributes ca

Re: [PATCH v2 net-next 22/23] rtnetlink: Move input checking for rtnl_fdb_dump to helper

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:43PM -0700, David Ahern wrote: > From: David Ahern > > Move the existing input checking for rtnl_fdb_dump into a helper, > valid_fdb_dump_legacy. This function will retain the current > logic that works around the 2 headers that userspace has been > allowed to send u

Re: [PATCH v2 net-next 23/23] rtnetlink: Update rtnl_fdb_dump for strict data checking

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:44PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_fdb_dump for strict data checking. If the flag is set, > the dump request is expected to have an ndmsg struct as the header > potentially followed by one or more attributes. Any data passed in the > h

Re: [PATCH v2 net-next 00/23] rtnetlink: Add support for rigid checking of data in dump request

2018-10-08 Thread Christian Brauner
On Sun, Oct 07, 2018 at 08:16:21PM -0700, David Ahern wrote: > From: David Ahern > > There are many use cases where a user wants to influence what is > returned in a dump for some rtnetlink command: one is wanting data > for a different namespace than the one the request is received and > another

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-08 Thread Steffen Klassert
On Fri, Oct 05, 2018 at 10:41:47AM -0400, Willem de Bruijn wrote: > On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > > > Hi all, > > > > On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > > > This is a *very rough* draft. Mainly for discussion while we also > > > look at another par

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-08 Thread Jiri Olsa
On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > On Thu, 4 Oct 2018 21:41:17 +0200 Daniel Borkmann > > wrote: > > > > > On 10/04/2018 08:39 PM, Jesper Dangaard Brouer wrote: > > > > On Thu, 4 Oct 201

[PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info

2018-10-08 Thread Mike Rapoport
The fib6_info_alloc() function allocates percpu memory to hold per CPU pointers to rt6_info, but this memory is never freed. Fix it. Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers") Signed-off-by: Mike Rapoport Cc: sta...@vger.kernel.org --- net/ipv6/ip6_fib.c | 2 ++ 1

Re: [PATCH v8 10/15] octeontx2-af: Reconfig MSIX base with IOVA

2018-10-08 Thread Arnd Bergmann
On Sun, Oct 7, 2018 at 5:01 PM wrote: > > + /* HW interprets RVU_AF_MSIXTR_BASE address as an IOVA, hence > +* create a IOMMU mapping for the physcial address configured by > +* firmware and reconfig RVU_AF_MSIXTR_BASE with IOVA. > +*/ > + cfg = rvu_read64(rvu,

Re: [PATCH v8 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-08 Thread Arnd Bergmann
On Sun, Oct 7, 2018 at 5:00 PM wrote: > > +/* Structure for requesting resource provisioning. > + * 'modify' flag to be used when either requesting more > + * or to detach partial of a cetain resource type. > + * Rest of the fields specify how many of what type to > + * be attached. > + */ > +stru

Re: [PATCH v8 02/15] octeontx2-af: Reset all RVU blocks

2018-10-08 Thread Arnd Bergmann
On Sun, Oct 7, 2018 at 5:00 PM wrote: > > From: Sunil Goutham > > Go through all BLKADDRs and check which ones are implemented > on this silicon and do a HW reset of each implemented block. > Also added all RVU AF and PF register offsets. > > > +/* Poll a RVU block's register 'offset', for a 'ze

Re: [PATCH v8 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-08 Thread Arnd Bergmann
On Sun, Oct 7, 2018 at 4:59 PM wrote: > --- /dev/null > +++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig > @@ -0,0 +1,12 @@ > +# > +# Marvell OcteonTX2 drivers configuration > +# > + > +config OCTEONTX2_AF > + tristate "Marvell OcteonTX2 RVU Admin Function driver" > + depends on A

[PATCH V1 net 2/5] net: ena: fix warning in rmmod caused by double iounmap

2018-10-08 Thread akiyano
From: Arthur Kiyanovski Memory mapped with devm_ioremap is automatically freed when the driver is disconnected from the device. Therefore there is no need to explicitly call devm_iounmap. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 +- 1 file

[PATCH V1 net 1/5] net: ena: fix indentations in ena_defs for better readability

2018-10-08 Thread akiyano
From: Arthur Kiyanovski Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 308 +- drivers/net/ethernet/amazon/ena/ena_eth_io_defs.h | 219 --- drivers/net/ethernet/amazon/ena/ena_regs_defs.h | 206 +++ 3 files

[PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread akiyano
From: Arthur Kiyanovski Arthur Kiyanovski (5): net: ena: fix indentations in ena_defs for better readability net: ena: fix warning in rmmod caused by double iounmap net: ena: fix rare bug when failed restart/resume is followed by driver removal net: ena: fix NULL dereference due to un

[PATCH V1 net 3/5] net: ena: fix rare bug when failed restart/resume is followed by driver removal

2018-10-08 Thread akiyano
From: Arthur Kiyanovski In a rare scenario when ena_device_restore() fails, followed by device remove, an FLR will not be issued. In this case, the device will keep sending asynchronous AENQ keep-alive events, even after driver removal, leading to memory corruption. Signed-off-by: Arthur Kiyanov

[PATCH V1 net 5/5] net: ena: fix auto casting to boolean

2018-10-08 Thread akiyano
From: Arthur Kiyanovski Eliminate potential auto casting compilation error. Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_eth_com.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_eth_com.c b/drivers/ne

[PATCH V1 net 4/5] net: ena: fix NULL dereference due to untimely napi initialization

2018-10-08 Thread akiyano
From: Arthur Kiyanovski napi poll functions should be initialized before running request_irq(), to handle a rare condition where there is a pending interrupt, causing the ISR to fire immediately while the poll function wasn't set yet, causing a NULL dereference. Signed-off-by: Arthur Kiyanovski

[PATCH net 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes

2018-10-08 Thread Sabrina Dubroca
Since commit 5aad1de5ea2c ("ipv4: use separate genid for next hop exceptions"), exceptions get deprecated separately from cached routes. In particular, administrative changes don't clear PMTU anymore. As Stefano described in commit e9fa1495d738 ("ipv6: Reflect MTU changes on PMTU of exceptions for

[PATCH net 2/2] ipv4: don't let PMTU updates increase route MTU

2018-10-08 Thread Sabrina Dubroca
When an MTU update with PMTU smaller than net.ipv4.route.min_pmtu is received, we must clamp its value. However, we can receive a PMTU exception with PMTU < old_mtu < ip_rt_min_pmtu, which would lead to an increase in PMTU. To fix this, take the smallest of the old MTU and ip_rt_min_pmtu. Before

[PATCH net-next 2/3] selftests: pmtu: extend MTU parsing helper to locked MTU

2018-10-08 Thread Sabrina Dubroca
The mtu_parse helper introduced in commit f2c929feeccd ("selftests: pmtu: Factor out MTU parsing helper") can only handle "mtu 1234", but not "mtu lock 1234". Extend it, so that we can do IPv4 tests with PMTU smaller than net.ipv4.route.min_pmtu Signed-off-by: Sabrina Dubroca --- tools/testing/s

[PATCH net-next 1/3] selftests: pmtu: Introduce check_pmtu_value()

2018-10-08 Thread Sabrina Dubroca
From: Stefano Brivio Introduce and use a function that checks PMTU values against expected values and logs error messages, to remove some clutter. Signed-off-by: Stefano Brivio Signed-off-by: Sabrina Dubroca --- tools/testing/selftests/net/pmtu.sh | 49 + 1 file ch

[PATCH net-next 3/3] selftests: pmtu: add basic IPv4 and IPv6 PMTU tests

2018-10-08 Thread Sabrina Dubroca
Commit d1f1b9cbf34c ("selftests: net: Introduce first PMTU test") and follow-ups introduced some PMTU tests, but they all rely on tunneling, and, particularly, on VTI. These new tests use simple routing to exercise the generation and update of PMTU exceptions in IPv4 and IPv6. Signed-off-by: Sabr

[PATCH net-next 0/3] selftests: add more PMTU tests

2018-10-08 Thread Sabrina Dubroca
The current selftests for PMTU cover VTI tunnels, but there's nothing about the generation and handling of PMTU exceptions by intermediate routers. This series adds and improves existing helpers, then adds IPv4 and IPv6 selftests with a setup involving an intermediate router. Joint work with Stefa

Re: re iproute2 - don't return error on success fix

2018-10-08 Thread Phil Sutter
Hi Or, On Tue, Oct 02, 2018 at 03:21:18PM +0300, Or Gerlitz wrote: > On Thu, Sep 27, 2018 at 3:53 PM Phil Sutter wrote: [...] > > Hmm, I can't reproduce this. My HEAD is at the commit you mentioned: > > > > | % sudo ./tc/tc filter add dev d0 protocol ip parent : flower skip_sw > > ip_flags n

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread Bshara, Nafea
Ship it On 10/8/18, 5:28 AM, "akiy...@amazon.com" wrote: From: Arthur Kiyanovski Arthur Kiyanovski (5): net: ena: fix indentations in ena_defs for better readability net: ena: fix warning in rmmod caused by double iounmap net: ena: fix rare bug when failed restar

Re: [PATCH v2 net-next 11/23] rtnetlink: Update rtnl_stats_dump for strict data checking

2018-10-08 Thread David Ahern
On 10/8/18 4:17 AM, Christian Brauner wrote: >> @@ -4696,13 +4697,32 @@ static int rtnl_stats_dump(struct sk_buff *skb, >> struct netlink_callback *cb) >> >> cb->seq = net->dev_base_seq; >> >> -if (nlmsg_len(cb->nlh) < sizeof(*ifsm)) >> +if (nlmsg_len(cb->nlh) < sizeof(*ifsm)) { >

Re: [PATCH v2 net-next 17/23] net/namespace: Update rtnl_net_dumpid for strict data checking

2018-10-08 Thread David Ahern
On 10/8/18 4:54 AM, Christian Brauner wrote: > On Sun, Oct 07, 2018 at 08:16:38PM -0700, David Ahern wrote: >> From: David Ahern >> >> Update rtnl_net_dumpid for strict data checking. If the flag is set, >> the dump request is expected to have an rtgenmsg struct as the header >> which has the fami

Re: selftests/bpf: test_kmod.sh hangs on all devices

2018-10-08 Thread Daniel Borkmann
On 10/08/2018 03:13 PM, Naresh Kamboju wrote: > BPF test case test_kmod.sh hangs on all devices running linux next. > > + cd /opt/kselftests/default-in-kernel/bpf > + ./test_kmod.sh > sysctl: cannot stat /proc/sys/net/core/bpf_jit_enable: No such file or > directory > sysctl: cannot stat /proc/sy

Re: [PATCH v2 net-next 17/23] net/namespace: Update rtnl_net_dumpid for strict data checking

2018-10-08 Thread Christian Brauner
On Mon, Oct 08, 2018 at 07:28:33AM -0600, David Ahern wrote: > On 10/8/18 4:54 AM, Christian Brauner wrote: > > On Sun, Oct 07, 2018 at 08:16:38PM -0700, David Ahern wrote: > >> From: David Ahern > >> > >> Update rtnl_net_dumpid for strict data checking. If the flag is set, > >> the dump request i

Re: [PATCH v8 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-08 Thread Sunil Kovvuri
On Mon, Oct 8, 2018 at 5:52 PM Arnd Bergmann wrote: > > On Sun, Oct 7, 2018 at 4:59 PM wrote: > > > --- /dev/null > > +++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig > > @@ -0,0 +1,12 @@ > > +# > > +# Marvell OcteonTX2 drivers configuration > > +# > > + > > +config OCTEONTX2_AF > > + t

[PATCH net-next] net: mscc: ocelot: remove set but not used variable 'phy_mode'

2018-10-08 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mscc/ocelot_board.c: In function 'mscc_ocelot_probe': drivers/net/ethernet/mscc/ocelot_board.c:262:17: warning: variable 'phy_mode' set but not used [-Wunused-but-set-variable] enum phy_mode phy_mode; It never used since intr

Re: [PATCH v8 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-08 Thread Sunil Kovvuri
On Mon, Oct 8, 2018 at 5:41 PM Arnd Bergmann wrote: > > On Sun, Oct 7, 2018 at 5:00 PM wrote: > > > > +/* Structure for requesting resource provisioning. > > + * 'modify' flag to be used when either requesting more > > + * or to detach partial of a cetain resource type. > > + * Rest of the fields

[PATCH net-next] dpaa2-eth: Don't account Tx confirmation frames on NAPI poll

2018-10-08 Thread Ioana Ciocoi Radulescu
Until now, both Rx and Tx confirmation frames handled during NAPI poll were counted toward the NAPI budget. However, Tx confirmations are lighter to process than Rx frames, which can skew the amount of work actually done inside one NAPI cycle. Update the code to only count Rx frames toward the NAP

[PATCH] qed: fix memory leak of pent on error exit paths

2018-10-08 Thread Colin King
From: Colin Ian King Currently, calls to qed_sp_init_request can leak pent on -EINVAL errors. Fix this by adding the allocated pent back to the p_hwfn free_pool on these error exits so it can be re-used later and hence fixes the leak. Detected by CoverityScan, CID#1411643 ("Resource leak") Fixe

Re: [PATCH v8 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-08 Thread Arnd Bergmann
On Mon, Oct 8, 2018 at 3:50 PM Sunil Kovvuri wrote: > > On Mon, Oct 8, 2018 at 5:52 PM Arnd Bergmann wrote: > > > > On Sun, Oct 7, 2018 at 4:59 PM wrote: > > > > > --- /dev/null > > > +++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig > > > @@ -0,0 +1,12 @@ > > > +# > > > +# Marvell OcteonTX2

Re: [PATCH v8 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-08 Thread Arnd Bergmann
On Mon, Oct 8, 2018 at 3:59 PM Sunil Kovvuri wrote: > On Mon, Oct 8, 2018 at 5:41 PM Arnd Bergmann wrote: > > On Sun, Oct 7, 2018 at 5:00 PM wrote: > > > > > > +/* Structure for requesting resource provisioning. > > > + * 'modify' flag to be used when either requesting more > > > + * or to detac

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread Machulsky, Zorik
Ship it On 10/8/18, 5:47 AM, "Bshara, Nafea" wrote: Ship it On 10/8/18, 5:28 AM, "akiy...@amazon.com" wrote: From: Arthur Kiyanovski Arthur Kiyanovski (5): net: ena: fix indentations in ena_defs for better readability net: ena: fi

Re: [PATCH V1 net 0/5] minor bug fixes for ENA Ethernet driver

2018-10-08 Thread Machulsky, Zorik
Acked-by: Zorik Machulsky On 10/8/18, 5:28 AM, "akiy...@amazon.com" wrote: From: Arthur Kiyanovski Arthur Kiyanovski (5): net: ena: fix indentations in ena_defs for better readability net: ena: fix warning in rmmod caused by double iounm

Re: selftests/bpf: test_kmod.sh hangs on all devices

2018-10-08 Thread Naresh Kamboju
Daniel, On Mon, 8 Oct 2018 at 18:58, Daniel Borkmann wrote: > > On 10/08/2018 03:13 PM, Naresh Kamboju wrote: > > BPF test case test_kmod.sh hangs on all devices running linux next. > > > > + cd /opt/kselftests/default-in-kernel/bpf > > + ./test_kmod.sh > > sysctl: cannot stat /proc/sys/net/core/

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 07:04:39PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 09:54:00PM +0200, Andrew Lunn wrote: > > Sure, but things have moved on since then. > > I was curious about this. Based on your uses cases, I guess that you > mean phylib? But not much has changed AFAICT.

Re: selftests/bpf: test_kmod.sh hangs on all devices

2018-10-08 Thread Shuah Khan
Hi Naresh, Please use sh...@kernel.org for faster responses. I updated MAINTAINERS entry a while back removing shua...@osg.samsung.com address due to IT infrastructure changes at Samsung. On 10/08/2018 08:55 AM, Naresh Kamboju wrote: > Daniel, > > On Mon, 8 Oct 2018 at 18:58, Daniel Borkmann wr

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Richard Cochran
On Mon, Oct 08, 2018 at 05:07:22PM +0200, Andrew Lunn wrote: > So as you said, the phylib API has not changed much, which is common > for mature code. I meant that phy-LINK hasn't changed much. > But i think long term, it will become less important. > It will share the space with phylink. And a

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Eric Dumazet
On 05/02/2018 04:01 AM, Björn Töpel wrote: > From: Björn Töpel > > The xskmap is yet another BPF map, very much inspired by > dev/cpu/sockmap, and is a holder of AF_XDP sockets. A user application > adds AF_XDP sockets into the map, and by using the bpf_redirect_map > helper, an XDP program ca

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Richard Cochran
On Mon, Oct 08, 2018 at 08:28:00AM -0700, Richard Cochran wrote: > Let's stick to phylib for now. We can cross the other bridge when we > come to it. Maybe the net_device->phylink will emerge for purposes > other that time stamping. Let's not guess about how it should look. In fact, it is kerne

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Björn Töpel
Den mån 8 okt. 2018 kl 17:31 skrev Eric Dumazet : > > On 05/02/2018 04:01 AM, Björn Töpel wrote: > > From: Björn Töpel > > > > The xskmap is yet another BPF map, very much inspired by > > dev/cpu/sockmap, and is a holder of AF_XDP sockets. A user application > > adds AF_XDP sockets into the map, a

[PATCH net] rds: RDS (tcp) hangs on sendto() to unresponding address

2018-10-08 Thread Ka-Cheong Poon
In rds_send_mprds_hash(), if the calculated hash value is non-zero and the MPRDS connections are not yet up, it will wait. But it should not wait if the send is non-blocking. In this case, it should just use the base c_path for sending the message. Signed-off-by: Ka-Cheong Poon --- net/rds/sen

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Björn Töpel
Den mån 8 okt. 2018 kl 18:05 skrev Björn Töpel : > > Den mån 8 okt. 2018 kl 17:31 skrev Eric Dumazet : > > [...] > > So it is illegal to call synchronize_net(), since it is a reschedule point. > > > > Thanks for finding and pointing this out, Eric! > > I'll have look and get back with a patch. > E

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Eric Dumazet
On 10/08/2018 09:05 AM, Björn Töpel wrote: > > Thanks for finding and pointing this out, Eric! > > I'll have look and get back with a patch. > > You might take a look at SOCK_RCU_FREE flag for sockets.

Re: [PATCH net] rds: RDS (tcp) hangs on sendto() to unresponding address

2018-10-08 Thread Santosh Shilimkar
10/8/2018 9:17 AM, Ka-Cheong Poon wrote: In rds_send_mprds_hash(), if the calculated hash value is non-zero and the MPRDS connections are not yet up, it will wait. But it should not wait if the send is non-blocking. In this case, it should just use the base c_path for sending the message. Sign

Re: [PATCH bpf-next v3 07/15] bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP

2018-10-08 Thread Björn Töpel
Den mån 8 okt. 2018 kl 18:55 skrev Eric Dumazet : > [...] > > You might take a look at SOCK_RCU_FREE flag for sockets. > Ah, thanks! I'll use this instead.

Re: [PATCH net 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes

2018-10-08 Thread David Ahern
On 10/8/18 6:36 AM, Sabrina Dubroca wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index c7861e4b402c..dc9d2668d9bb 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -2458,6 +2458,13 @@ struct netdev_notifier_info { > struct netlink

Re: [PATCH net-next] netdev: remove useless codes of tun_automq_select_queue

2018-10-08 Thread David Miller
From: Wang Li Date: Mon, 8 Oct 2018 16:51:12 +0800 > @@ -1045,15 +1039,12 @@ static void tun_automq_xmit(struct tun_struct *tun, > struct sk_buff *skb) >* RPS hash and save it into the flow_table here. >*/ > __u32 rxhash; > + struct tun_

  1   2   >