Re: [PATCH net] Revert "neighbour: force neigh_invalidate when NUD_FAILED update is from admin"

2018-10-20 Thread David Miller
From: Roopa Prabhu Date: Sat, 20 Oct 2018 18:09:31 -0700 > From: Roopa Prabhu > > This reverts commit 8e326289e3069dfc9fa9c209924668dd031ab8ef. > > This patch results in unnecessary netlink notification when one > tries to delete a neigh entry already in NUD_FAILED state. Found > this with a

[PATCH net-next 3/3] sctp: process sk_reuseport in sctp_get_port_local

2018-10-20 Thread Xin Long
When socks' sk_reuseport is set, the same port and address are allowed to be bound into these socks who have the same uid. Note that the difference from sk_reuse is that it allows multiple socks to listen on the same port and address. Signed-off-by: Xin Long --- include/net/sctp/structs.h | 4

[PATCH net-next 0/3] sctp: add support for sk_reuseport

2018-10-20 Thread Xin Long
sctp sk_reuseport allows multiple socks to listen on the same port and addresses, as long as these socks have the same uid. This works pretty much as TCP/UDP does, the only difference is that sctp is multi-homing and all the bind_addrs in these socks will have to completely matched, otherwise

[PATCH net-next 1/3] sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint

2018-10-20 Thread Xin Long
This is a part of sk_reuseport support for sctp, and it selects a sock by the hashkey of lport, paddr and dport by default. It will work until sk_reuseport support is added in sctp_get_port_local() in the next patch. Signed-off-by: Xin Long --- net/sctp/input.c | 69

[PATCH net-next 2/3] sctp: add sock_reuseport for the sock in __sctp_hash_endpoint

2018-10-20 Thread Xin Long
This is a part of sk_reuseport support for sctp. It defines a helper sctp_bind_addrs_check() to check if the bind_addrs in two socks are matched. It will add sock_reuseport if they are completely matched, and return err if they are partly matched, and alloc sock_reuseport if all socks are not

[PATCH net] Revert "neighbour: force neigh_invalidate when NUD_FAILED update is from admin"

2018-10-20 Thread Roopa Prabhu
From: Roopa Prabhu This reverts commit 8e326289e3069dfc9fa9c209924668dd031ab8ef. This patch results in unnecessary netlink notification when one tries to delete a neigh entry already in NUD_FAILED state. Found this with a buggy app that tries to delete a NUD_FAILED entry repeatedly. While the

[PATCH bpf-next 3/6] bpf, verifier: reject xadd on flow key memory

2018-10-20 Thread Daniel Borkmann
We should not enable xadd operation for flow key memory if not needed there anyway. There is no such issue as described in the commit f37a8cb84cce ("bpf: reject stores into ctx via st and xadd") since there's no context rewriter for flow keys today, but it also shouldn't become part of the user

[PATCH bpf-next 4/6] bpf, verifier: remove unneeded flow key in check_helper_mem_access

2018-10-20 Thread Daniel Borkmann
They PTR_TO_FLOW_KEYS is not used today to be passed into a helper as memory, so it can be removed from check_helper_mem_access(). Signed-off-by: Daniel Borkmann --- kernel/bpf/verifier.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index

[PATCH bpf-next 2/6] bpf, verifier: fix register type dump in xadd and st

2018-10-20 Thread Daniel Borkmann
Using reg_type_str[insn->dst_reg] is incorrect since insn->dst_reg contains the register number but not the actual register type. Add a small reg_state() helper and use it to get to the type. Also fix up the test_verifier test cases that have an incorrect errstr. Fixes: 9d2be44a7f33 ("bpf: Reuse

[PATCH bpf-next 6/6] bpf, libbpf: simplify and cleanup perf ring buffer walk

2018-10-20 Thread Daniel Borkmann
Simplify bpf_perf_event_read_simple() a bit and fix up some minor things along the way: the return code in the header is not of type int but enum bpf_perf_event_ret instead. Once callback indicated to break the loop walking event data, it also needs to be consumed in data_tail since it has been

[PATCH bpf-next 0/6] Misc improvements and few minor fixes

2018-10-20 Thread Daniel Borkmann
Last batch of misc patches I had in queue: first one removes some left-over bits from ULP, second is a fix in the verifier where we wrongly use register number as type to fetch the string for the dump, third disables xadd on flow keys and subsequent one removes the flow key type from

[PATCH bpf-next 1/6] ulp: remove uid and user_visible members

2018-10-20 Thread Daniel Borkmann
They are not used anymore and therefore should be removed. Signed-off-by: Daniel Borkmann --- include/net/tcp.h | 7 --- net/tls/tls_main.c | 2 -- 2 files changed, 9 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 14fdd7c..8a61c3e 100644 --- a/include/net/tcp.h +++

[PATCH bpf-next 5/6] bpf, verifier: avoid retpoline for map push/pop/peek operation

2018-10-20 Thread Daniel Borkmann
Extend prior work from 09772d92cd5a ("bpf: avoid retpoline for lookup/update/delete calls on maps") to also apply to the recently added map helpers that perform push/pop/peek operations so that the indirect call can be avoided. Signed-off-by: Daniel Borkmann --- kernel/bpf/verifier.c | 25

Re: [PATCH net] net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs

2018-10-20 Thread David Miller
From: David Ahern Date: Fri, 19 Oct 2018 10:00:19 -0700 > From: David Ahern > > The loop wants to skip previously dumped addresses, so loops until > current index >= saved index. If the message fills it wants to save > the index for the next address to dump - ie., the one that did not > fit in

[PATCH bpf-next 3/3] tools: bpftool: fix completion for "bpftool map update"

2018-10-20 Thread Quentin Monnet
When trying to complete "bpftool map update" commands, the call to printf would print an error message that would show on the command line if no map is found to complete the command line. Fix it by making sure we have map ids to complete the line with, before we try to print something.

[PATCH bpf-next 2/3] tools: bpftool: print nb of cmds to stdout (not stderr) for batch mode

2018-10-20 Thread Quentin Monnet
When batch mode is used and all commands succeeds, bpftool prints the number of commands processed to stderr. There is no particular reason to use stderr for this, we could as well use stdout. It would avoid getting unnecessary output on stderr if the standard ouptut is redirected, for example.

[PATCH bpf-next 1/3] tools: bpftool: document restriction on '.' in names to pin in bpffs

2018-10-20 Thread Quentin Monnet
Names used to pin eBPF programs and maps under the eBPF virtual file system cannot contain a dot character, which is reserved for future extensions of this file system. Document this in bpftool man pages to avoid users getting confused if pinning fails because of a dot. Signed-off-by: Quentin

[PATCH bpf-next 0/3] tools: bpftool: bring minor fixes to bpftool

2018-10-20 Thread Quentin Monnet
Hi, These are three minor fixes for bpftool, its documentation and its bash completion function. Please refer to individual patches for details. Quentin Monnet (3): tools: bpftool: document restriction on '.' in names to pin in bpffs tools: bpftool: print nb of cmds to stdout (not stderr) for

[PATCH bpf-next] selftests/bpf: enable (uncomment) all tests in test_libbpf.sh

2018-10-20 Thread Quentin Monnet
libbpf is now able to load successfully test_l4lb_noinline.o and samples/bpf/tracex3_kern.o, so we can uncomment related tests from test_libbpf.c and remove the associated "TODO"s. It is also trivial to fix test_xdp_noinline.o so that it provides a version and can be loaded. Fix it and uncomment

[PATCH bpf-next] selftests/bpf: fix return value comparison for tests in test_libbpf.sh

2018-10-20 Thread Quentin Monnet
The return value for each test in test_libbpf.sh is compared with if (( $? == 0 )) ; then ... This works well with bash, but not with dash, that /bin/sh is aliased to on some systems (such as Ubuntu). Let's replace this comparison by something that works on both shells. Signed-off-by:

Re: [PATCH net v2] net/sched: act_gact: properly init 'goto chain'

2018-10-20 Thread Davide Caratti
hello Cong and Jamal, On Fri, 2018-10-19 at 13:40 -0700, Cong Wang wrote: > On Thu, Oct 18, 2018 at 8:30 AM Davide Caratti wrote: > > The alternative is, we systematically forbid usage of 'goto chain' in > > tcfg_paction, so that: > > > > # tc f a dev v0 egress matchall action random determ

[PATCH net 1/4] net/sched: act_gact: disallow 'goto chain' on fallback control action

2018-10-20 Thread Davide Caratti
in the following command: # tc action add action random 'goto chain x' is allowed only for c1: setting it for c2 makes the kernel crash with NULL pointer dereference, since TC core doesn't initialize the chain handle. Signed-off-by: Davide Caratti --- net/sched/act_gact.c | 5 + 1

[PATCH net 4/4] tc-tests: test denial of 'goto chain' for exceed traffic in police.json

2018-10-20 Thread Davide Caratti
add test to verify if act_police forbids 'goto chain' control actions for 'exceed' traffic. Signed-off-by: Davide Caratti --- .../tc-testing/tc-tests/actions/police.json | 24 +++ 1 file changed, 24 insertions(+) diff --git

[PATCH net 2/4] net/sched: act_police: disallow 'goto chain' on fallback control action

2018-10-20 Thread Davide Caratti
in the following command: # tc action add action police rate burst conform-exceed / 'goto chain x' is allowed only for c1: setting it for c2 makes the kernel crash with NULL pointer dereference, since TC core doesn't initialize the chain handle. Signed-off-by: Davide Caratti ---

[PATCH net 3/4] tc-tests: test denial of 'goto chain' on 'random' traffic in gact.json

2018-10-20 Thread Davide Caratti
add test to verify if act_gact forbids 'goto chain' control actions on 'random' traffic in gact.json. Signed-off-by: Davide Caratti --- .../tc-testing/tc-tests/actions/gact.json | 24 +++ 1 file changed, 24 insertions(+) diff --git

[PATCH net 0/4] net/sched: forbid 'goto_chain' on fallback actions

2018-10-20 Thread Davide Caratti
the following command: # tc actions add action police rate 1mbit burst 1k conform-exceed \ > pass / goto chain 42 generates a NULL pointer dereference when packets exceed the configured rate. Similarly, the following command: # tc actions add action pass random determ goto chain 42 2 makes

[PATCH] net: ethernet:fec: Consistently use SPEED_ prefix

2018-10-20 Thread Andrew Lunn
All other calls to phy_set_max_speed() use the SPEED_ prefix. Make the FEC driver follow this common pattern. This makes no different to generated code since SPEED_1000 is 1000, and SPEED_100 is 100. Reported-by: Corentin Labbe Signed-off-by: Andrew Lunn ---

[PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause

2018-10-20 Thread Andrew Lunn
When indicating the MAC supports Symmetric Pause, clear the Asymmetric Pause bit, which could of been already set is the PHY supports it. Reported-by: Labbe Corentin Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause") Signed-off-by: Andrew Lunn ---

Re: [PATCH] net/mlx5: allocate enough space in

2018-10-20 Thread Or Gerlitz
On Fri, Oct 19, 2018 at 11:08 PM Dan Carpenter wrote: > > FDB_MAX_CHAIN is 3. We wanted to allocate enough memory to hold four > structs but there are missing parentheses so we only allocate enough > memory for three structs and the first byte of the fourth one. yeah, seems that we were wrong

Re: [bpf-next v2 0/3] sockmap, bpf_msg_push_data helper

2018-10-20 Thread Daniel Borkmann
On 10/20/2018 04:56 AM, John Fastabend wrote: > This series adds a new helper bpf_msg_push_data to be used by > sk_msg programs. The helper can be used to insert extra bytes into > the message that can then be used by the program as metadata tags > among other things. > > The first patch adds the

Re: [PATCH net-next] r8169: add support for Byte Queue Limits

2018-10-20 Thread David Miller
From: Heiner Kallweit Date: Sat, 20 Oct 2018 12:25:27 +0200 > From: Florian Westphal > This patch is basically a resubmit of 1e918876853a ("r8169: add support > for Byte Queue Limits") which was reverted later. The problems causing > the revert seem to have been fixed in the meantime. > Only

Re: [PATCH net-next] r8169: handle all interrupt events in the hard irq handler

2018-10-20 Thread David Miller
From: Heiner Kallweit Date: Thu, 18 Oct 2018 22:19:28 +0200 > Having a separate "slow event" handler isn't needed because all > interrupt events trigger asynchronous activity. And in case of SYSErr > we have bigger problems than performance anyway. > This patch also allows to get rid of acking

Re: pull request: bluetooth-next 2018-10-20

2018-10-20 Thread David Miller
From: Johan Hedberg Date: Sat, 20 Oct 2018 12:03:42 +0300 > Here's one more bluetooth-next pull request for the 4.20 kernel. > > - Added new USB ID for QCA_ROME controller > - Added debug trace support from QCA wcn3990 controllers > - Updated L2CAP to conform to latest Errata Service Release

Re: [PATCH iproute2 1/1] DEBUG: Fix make check when need build generate_nlmsg

2018-10-20 Thread Petr Vorel
Hi Stephen, > make check from top level Makefile defines several flags which break > building generate_nlmsg: > $ make check > make -C tools > gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations > -Wold-style-definition -Wformat=2 -O2 -I../include -I../include/uapi >

[iproute2 PATCH] bridge: fix vlan show stats formatting

2018-10-20 Thread Tobias Jungel
The output of -statistics vlan show was broken previous change for json output. This aligns the format to vlan show. Signed-off-by: Tobias Jungel --- bridge/vlan.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bridge/vlan.c b/bridge/vlan.c index bdce55ae..85f4a539

Re: [PATCH net-next v2] netpoll: allow cleanup to be synchronous

2018-10-20 Thread Neil Horman
On Fri, Oct 19, 2018 at 08:46:45PM +, Banerjee, Debabrata wrote: > > From: Neil Horman > > > I presume you've tested this with some of the stacked devices? I think I'm > > ok with this change, but I'd like confirmation that its worked. > > > > Neil > > Yes I've tested this on a bond

[PATCH net-next] r8169: add support for Byte Queue Limits

2018-10-20 Thread Heiner Kallweit
From: Florian Westphal This patch is basically a resubmit of 1e918876853a ("r8169: add support for Byte Queue Limits") which was reverted later. The problems causing the revert seem to have been fixed in the meantime. Only change to the original patch is that the call to netdev_reset_queue was

Re: [PATCH net] r8169: fix NAPI handling under high load

2018-10-20 Thread Holger Hoffstätte
On 10/17/18 22:07, Holger Hoffstätte wrote: On 10/17/18 21:27, Heiner Kallweit wrote: (snip) Good to know. What's your kernel version and RTL8168 chip version? Regarding the chip version the dmesg line with the XID would be relevant. 4.18.15 + PDS (custom CPU scheduler) + cherry pickings from

pull request: bluetooth-next 2018-10-20

2018-10-20 Thread Johan Hedberg
Hi Dave, Here's one more bluetooth-next pull request for the 4.20 kernel. - Added new USB ID for QCA_ROME controller - Added debug trace support from QCA wcn3990 controllers - Updated L2CAP to conform to latest Errata Service Release - Fix binding to non-removable BCM43430 devices Please

Re: [PATCH net] net: fix pskb_trim_rcsum_slow() with odd trim offset

2018-10-20 Thread David Miller
From: Dimitris Michailidis Date: Fri, 19 Oct 2018 17:07:13 -0700 > We've been getting checksum errors involving small UDP packets, usually > 59B packets with 1 extra non-zero padding byte. netdev_rx_csum_fault() > has been complaining that HW is providing bad checksums. Turns out the > problem

Re: [PATCH net-next] net: loopback: clear skb->tstamp before netif_rx()

2018-10-20 Thread David Miller
From: Eric Dumazet Date: Fri, 19 Oct 2018 19:11:26 -0700 > At least UDP / TCP stacks can now cook skbs with a tstamp using > MONOTONIC base (or arbitrary values with SCM_TXTIME) > > Since loopback driver does not call (directly or indirectly) > skb_scrub_packet(), we need to clear skb->tstamp