Re: [PATCH bpf-next v5 5/8] xdp: Provide extack messages when prog attachment failed

2019-01-31 Thread Jesper Dangaard Brouer
On Fri, 1 Feb 2019 01:19:51 +0100 Maciej Fijalkowski wrote: > In order to provide more meaningful messages to user when the process of > loading xdp program onto network interface failed, let's add extack > messages within dev_change_xdp_fd. > > Suggested-by: Jakub Kicinski > Signed-off-by: Ma

[PATCH bpf-next 6/6] bpf: Add test_sock_fields for skb->sk and bpf_tcp_sock

2019-01-31 Thread Martin KaFai Lau
This patch adds a C program to show the usage on skb->sk and bpf_tcp_sock. Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/Makefile | 5 +- tools/testing/selftests/bpf/bpf_helpers.h | 4 + .../testing/selftests/bpf/test_sock_fields.c | 314 ++ ..

[PATCH bpf-next 4/6] bpf: Sync bpf.h to tools/

2019-01-31 Thread Martin KaFai Lau
This patch sync the uapi bpf.h to tools/. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 61 +- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 60b99b730a41..

[PATCH bpf-next 1/6] bpf: Add a bpf_sock pointer to __sk_buff and a bpf_sk_fullsock helper

2019-01-31 Thread Martin KaFai Lau
In kernel, it is common to check "!skb->sk && sk_fullsock(skb->sk)" before accessing the fields in sock. For example, in __netdev_pick_tx: static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb, struct net_device *sb_dev) { /* ... */ s

[PATCH bpf-next 5/6] bpf: Add skb->sk, bpf_sk_fullsock and bpf_tcp_sock tests to test_verifer

2019-01-31 Thread Martin KaFai Lau
This patch tests accessing the skb->sk and the new helpers, bpf_sk_fullsock and bpf_tcp_sock. The errstr of some existing "reference tracking" tests is changed with s/bpf_sock/sock/ and s/socket/sock/ where "sock" is from the verifier's reg_type_str[]. Signed-off-by: Martin KaFai Lau --- .../se

[PATCH bpf-next 2/6] bpf: Refactor sock_ops_convert_ctx_access

2019-01-31 Thread Martin KaFai Lau
The next patch will introduce a new "struct bpf_tcp_sock" which exposes the same tcp_sock's fields already exposed in "struct bpf_sock_ops". This patch refactor the existing convert_ctx_access() codes for "struct bpf_sock_ops" to get them ready to be reused for "struct bpf_tcp_sock". The "rtt_min

[PATCH bpf-next 0/6] Add __sk_buff->sk, bpf_tcp_sock, BPF_FUNC_tcp_sock and BPF_FUNC_sk_fullsock

2019-01-31 Thread Martin KaFai Lau
This series adds __sk_buff->sk, "struct bpf_tcp_sock", BPF_FUNC_sk_fullsock and BPF_FUNC_tcp_sock. Together, they provide a common way to expose the members of "struct tcp_sock" and "struct bpf_sock" for the bpf_prog to access. The patch series first adds a bpf_sock pointer to __sk_buff and a new

[PATCH bpf-next 3/6] bpf: Add struct bpf_tcp_sock and BPF_FUNC_tcp_sock

2019-01-31 Thread Martin KaFai Lau
This patch adds a helper function BPF_FUNC_tcp_sock and it is currently available for cg_skb and sched_(cls|act): struct bpf_tcp_sock *bpf_tcp_sock(struct bpf_sock *sk); int cg_skb_foo(struct __sk_buff *skb) { struct bpf_tcp_sock *tp; struct bpf_sock *sk; __u32 snd_cwnd;

Co-existing XDP generic and native mode? (Re: [PATCH bpf-next v5 5/8] xdp: Provide extack messages when prog attachment failed)

2019-01-31 Thread Jesper Dangaard Brouer
On Thu, 31 Jan 2019 19:11:01 -0800 Jakub Kicinski wrote: > On Fri, 1 Feb 2019 01:19:51 +0100, Maciej Fijalkowski wrote: > > if (__dev_xdp_query(dev, bpf_chk, XDP_QUERY_PROG) || > > - __dev_xdp_query(dev, bpf_chk, XDP_QUERY_PROG_HW)) > > + __dev_xdp_query(d

Re: WoL broken in r8169.c since kernel 4.19

2019-01-31 Thread Heiner Kallweit
Great, thanks. This patch has been applied and is part of latest linux-next kernel already: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/?h=next-20190201 Would be much appreciated if you could build and test this kernel version. Heiner On 30.01.2019 16:37, Marc Haber

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-31 Thread Heiner Kallweit
Thanks, however the register diff is a little hard to read. Usually ethtool -d outputs something like this: RealTek RTL8168g/8111g registers: 0x00: MAC Address 00:01:2e:83:90:11 0x08: Multicast Address Filter 0x1

Re: KASAN: use-after-free Read in selinux_netlbl_socket_setsockopt

2019-01-31 Thread Dmitry Vyukov
On Wed, Jan 30, 2019 at 10:30 PM Paul Moore wrote: > > On Wed, Jan 30, 2019 at 4:01 PM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:62967898789d Merge git://git.kernel.org/pub/scm/linux/kern.. > > git tree: upstream > > console output:

[PATCH net] add snmp counter document

2019-01-31 Thread yupeng
add document for tcp retransmission, tcp fast open, syn cookies, challenge ack, prune and several general counters Signed-off-by: yupeng --- Documentation/networking/snmp_counter.rst | 143 ++ 1 file changed, 143 insertions(+) diff --git a/Documentation/networking/snmp_count

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-31 Thread David Chang
On Jan 31, 2019 at 07:35:30 +0100, Heiner Kallweit wrote: > Hi David, two more things: > > 1. Could you please test a recent linux-next kernel? Not tested yet. Will do if possible. > 2. Please get a register dump (ethtool -d ) from 4.18 and 4.19 >and compare them. For your informaiton. [wi

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-31 Thread David Chang
On Jan 31, 2019 at 19:28:20 +0100, Heiner Kallweit wrote: > Thanks for testing, Peter! > So we have an ASPM-related issue indeed. I'm aware that there are certain > incompatibilities between board chipsets and network chip versions > (although it's not known which combinations are affected). > And

Re: [PATCH net-next] mdio_bus: Fix PTR_ERR() usage after initialization to constant

2019-01-31 Thread Al Viro
On Tue, Jan 29, 2019 at 11:30:27AM +0800, YueHaibing wrote: > >>gpiod = fwnode_get_named_gpiod(&mdiodev->dev.of_node->fwnode, > >> "reset-gpios", 0, GPIOD_OUT_LOW, > >> "PHY reset"); > >> - if (PTR_ERR(

Re: [PATCH net-next v2 7/7] ethtool: add compat for devlink info

2019-01-31 Thread kbuild test robot
Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/devlink-add-device-driver-information-API/20190131-21 config: m68k-sun3_defconfig (attached as .config) compiler: m68k-linux-gnu

Re: [PATCH net-next 06/10] net: introduce a net_device_ops macsec helper

2019-01-31 Thread Florian Fainelli
On 1/24/19 1:23 AM, Antoine Tenart wrote: > Hi Florian, > > On Wed, Jan 23, 2019 at 12:16:08PM -0800, Florian Fainelli wrote: >> On 1/23/19 7:56 AM, Antoine Tenart wrote: >>> This patch introduces a net_device_ops MACsec helper to allow net device >>> drivers to implement a MACsec offloading so

Re: [PATCH net-next] net: hns3: Fix potential NULL dereference on allocation error

2019-01-31 Thread YueHaibing
ping ... On 2019/1/25 11:13, YueHaibing wrote: > hclge_mac_update_stats_complete doesn't check for NULL > returns of kcalloc, it may result in an Oops. > > Fixes: d174ea75c96a ("net: hns3: add statistics for PFC frames and MAC > control frames") > Signed-off-by: YueHaibing > --- > drivers/net/

Re: [PATCH bpf-next v5 5/8] xdp: Provide extack messages when prog attachment failed

2019-01-31 Thread Jakub Kicinski
On Fri, 1 Feb 2019 01:19:51 +0100, Maciej Fijalkowski wrote: > if (__dev_xdp_query(dev, bpf_chk, XDP_QUERY_PROG) || > - __dev_xdp_query(dev, bpf_chk, XDP_QUERY_PROG_HW)) > + __dev_xdp_query(dev, bpf_chk, XDP_QUERY_PROG_HW)) { > + NL

Re: [PATCH net-next 1/1] openvswitch: Declare ovs key structures using macros

2019-01-31 Thread Pravin Shelar
Can you send patch with this information in commit msg? On Thu, Jan 31, 2019 at 3:32 AM Eli Britstein wrote: > > ping > > for the using patch, i put below the v1 of it. here is v2: > > https://patchwork.ozlabs.org/patch/1023406/ > > > On 1/27/2019 8:37 AM, Eli Britstein wrote: > > > > On 1/27/20

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Toshiaki Makita
On 2019/02/01 5:15, Jesper Dangaard Brouer wrote: > On Thu, 31 Jan 2019 09:45:23 -0800 (PST) > David Miller wrote: > >> From: "Michael S. Tsirkin" >> Date: Thu, 31 Jan 2019 10:25:17 -0500 >> >>> On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: Previously virtnet_xdp_xmit()

Re: [PATCH bpf-next v5 2/5] bpf: implement BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap

2019-01-31 Thread Willem de Bruijn
On Thu, Jan 31, 2019 at 5:04 PM Daniel Borkmann wrote: > > On 01/31/2019 12:51 AM, Peter Oskolkov wrote: > > This patch implements BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap > > BPF helper. It enables BPF programs (specifically, BPF_PROG_TYPE_LWT_IN > > and BPF_PROG_TYPE_LWT_XMIT prog types) to a

[PATCH net-next v2 1/1] net/mlx5: Fix code style issue in mlx driver

2019-01-31 Thread xiangxia . m . yue
From: Tonghao Zhang Add the tab before '}' and keep the code style consistent. Signed-off-by: Tonghao Zhang Reviewed-by: Or Gerlitz --- v2: change the patch title --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver

Re: [PATCH net-next v2 01/12] net: bridge: multicast: Propagate br_mc_disabled_update() return

2019-01-31 Thread Florian Fainelli
On 1/30/19 11:50 PM, Ido Schimmel wrote: > On Wed, Jan 30, 2019 at 05:00:57PM -0800, Florian Fainelli wrote: >> On 1/29/19 11:36 PM, Ido Schimmel wrote: >>> On Tue, Jan 29, 2019 at 04:55:37PM -0800, Florian Fainelli wrote: -static void br_mc_disabled_update(struct net_device *dev, bool value)

Re: [PATCH net-next] net/mlx5e: Fix code style issue in mlx driver

2019-01-31 Thread Tonghao Zhang
On Fri, Feb 1, 2019 at 4:51 AM Or Gerlitz wrote: > > On Thu, Jan 31, 2019 at 10:49 PM Or Gerlitz wrote: > > > > On Thu, Jan 31, 2019 at 4:11 PM wrote: > > > From: Tonghao Zhang > > > > > > Add the tab before '}' and keep the code style consistent. > > > > > > Signed-off-by: Tonghao Zhang > > >

Re: [RFC net-next 1/4] net: Reserve protocol identifiers for EnOcean

2019-01-31 Thread Alexander Aring
Hi, On Wed, Jan 30, 2019 at 02:42:29AM +0100, Andreas Färber wrote: > Hi Alex, > > Am 29.01.19 um 13:57 schrieb Alexander Aring: > > On Tue, Jan 29, 2019 at 06:01:27AM +0100, Andreas Färber wrote: > >> EnOcean wireless technology is based on ASK (ERP1) and FSK (ERP2) > >> modulations > >> for su

Re: [PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out

2019-01-31 Thread Marcelo Ricardo Leitner
On Tue, Jan 29, 2019 at 07:58:07PM +0100, Tuxdriver wrote: > I was initially under the impression that with Kent's repost, the radixtree > (which is what I think you meant by rhashtables) updates would be merged Oops! Yep.. I had meant flex_arrays actually. > imminently, but that doesn't seem to

Re: [PATCH bpf-next v5 5/8] xdp: Provide extack messages when prog attachment failed

2019-01-31 Thread Jakub Kicinski
On Fri, 1 Feb 2019 01:19:51 +0100, Maciej Fijalkowski wrote: > In order to provide more meaningful messages to user when the process of > loading xdp program onto network interface failed, let's add extack > messages within dev_change_xdp_fd. > > Suggested-by: Jakub Kicinski > Signed-off-by: Mac

[PATCH bpf-next v5 4/8] samples/bpf: Extend RLIMIT_MEMLOCK for xdp_{sample_pkts, router_ipv4}

2019-01-31 Thread Maciej Fijalkowski
There is a common problem with xdp samples that happens when user wants to run a particular sample and some bpf program is already loaded. The default 64kb RLIMIT_MEMLOCK resource limit will cause a following error (assuming that xdp sample that is failing was converted to libbpf usage): libbpf: E

[PATCH bpf-next v5 7/8] libbpf: Add a support for getting xdp prog id on ifindex

2019-01-31 Thread Maciej Fijalkowski
Since we have a dedicated netlink attributes for xdp setup on a particular interface, it is now possible to retrieve the program id that is currently attached to the interface. The use case is targeted for sample xdp programs, which will store the program id just after loading bpf program onto ifac

[PATCH bpf-next v5 5/8] xdp: Provide extack messages when prog attachment failed

2019-01-31 Thread Maciej Fijalkowski
In order to provide more meaningful messages to user when the process of loading xdp program onto network interface failed, let's add extack messages within dev_change_xdp_fd. Suggested-by: Jakub Kicinski Signed-off-by: Maciej Fijalkowski --- net/core/dev.c | 12 +--- 1 file changed, 9

[PATCH bpf-next v5 3/8] samples/bpf: Convert XDP samples to libbpf usage

2019-01-31 Thread Maciej Fijalkowski
Some of XDP samples that are attaching the bpf program to the interface via libbpf's bpf_set_link_xdp_fd are still using the bpf_load.c for loading and manipulating the ebpf program and maps. Convert them to do this through libbpf usage and remove bpf_load from the picture. While at it remove what

[PATCH bpf-next v5 0/8] xdp: Avoid unloading xdp prog not attached by sample

2019-01-31 Thread Maciej Fijalkowski
Hi! This patchset tries to address the situation where: * user loads a particular xdp sample application that does stats polling * user loads another sample application on the same interface * then, user sends SIGINT/SIGTERM to the app that was attached as a first one * second application ends up w

[PATCH bpf-next v5 8/8] samples/bpf: Check the prog id before exiting

2019-01-31 Thread Maciej Fijalkowski
Check the program id within the signal handler on polling xdp samples that were previously converted to libbpf usage. Avoid the situation of unloading the program that was not attached by sample that is exiting. Handle also the case where bpf_get_link_xdp_id didn't exit with an error but the xdp pr

[PATCH bpf-next v5 6/8] samples/bpf: Add a "force" flag to XDP samples

2019-01-31 Thread Maciej Fijalkowski
Make xdp samples consistent with iproute2 behavior and set the XDP_FLAGS_UPDATE_IF_NOEXIST by default when setting the xdp program on interface. Provide an option for user to force the program loading, which as a result will not include the mentioned flag in bpf_set_link_xdp_fd call. Signed-off-by

[PATCH bpf-next v5 1/8] libbpf: Add a helper for retrieving a map fd for a given name

2019-01-31 Thread Maciej Fijalkowski
XDP samples are mostly cooperating with eBPF maps through their file descriptors. In case of a eBPF program that contains multiple maps it might be tiresome to iterate through them and call bpf_map__fd for each one. Add a helper mostly based on bpf_object__find_map_by_name, but instead of returning

[PATCH bpf-next v5 2/8] samples/bpf: xdp_redirect_cpu have not need for read_trace_pipe

2019-01-31 Thread Maciej Fijalkowski
From: Jesper Dangaard Brouer The sample xdp_redirect_cpu is not using helper bpf_trace_printk. Thus it makes no sense that the --debug option us reading from /sys/kernel/debug/tracing/trace_pipe via read_trace_pipe. Simply remove it. Signed-off-by: Jesper Dangaard Brouer Acked-by: John Fastaben

Re: [PATCH net] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames

2019-01-31 Thread Saeed Mahameed
On Thu, 2019-01-31 at 11:42 -0800, Eric Dumazet wrote: > On Thu, Jan 31, 2019 at 11:27 AM Saeed Mahameed > wrote: > > Are you sure ? you are claiming that the hardware will skip csum > > complete i.e cqe->checksum will be 0x for padded short IP > > frames. > > i don't think this is the case, t

Re: [PATCH bpf-next v5 2/5] bpf: implement BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap

2019-01-31 Thread Daniel Borkmann
On 01/31/2019 12:51 AM, Peter Oskolkov wrote: > This patch implements BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap > BPF helper. It enables BPF programs (specifically, BPF_PROG_TYPE_LWT_IN > and BPF_PROG_TYPE_LWT_XMIT prog types) to add IP encapsulation headers > to packets (e.g. IP/GRE, GUE, IPIP).

[PATCH v7 bpf-next 8/9] libbpf: introduce bpf_map_lookup_elem_flags()

2019-01-31 Thread Alexei Starovoitov
Introduce int bpf_map_lookup_elem_flags(int fd, const void *key, void *value, __u64 flags) helper to lookup array/hash/cgroup_local_storage elements with BPF_F_LOCK flag. Signed-off-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 13 + tools/lib/bpf/bpf.h | 2 ++ tools/li

[PATCH v7 bpf-next 7/9] tools/bpf: sync uapi/bpf.h

2019-01-31 Thread Alexei Starovoitov
add BPF_F_LOCK definition to tools/include/uapi/linux/bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 86f7c438d40f..1777fa0c61e4 100644 --- a/tools

[PATCH v7 bpf-next 9/9] selftests/bpf: test for BPF_F_LOCK

2019-01-31 Thread Alexei Starovoitov
Add C based test that runs 4 bpf programs in parallel that update the same hash and array maps. And another 2 threads that read from these two maps via lookup(key, value, BPF_F_LOCK) api to make sure the user space sees consistent value in both hash and array elements while user space races with ke

[PATCH v7 bpf-next 5/9] selftests/bpf: add bpf_spin_lock C test

2019-01-31 Thread Alexei Starovoitov
add bpf_spin_lock C based test that requires latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_helpers.h| 4 + tools/testing/selftests/bpf/test_progs.c | 43 +++- tools/testing/

[PATCH v7 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-31 Thread Alexei Starovoitov
Introduce 'struct bpf_spin_lock' and bpf_spin_lock/unlock() helpers to let bpf program serialize access to other variables. Example: struct hash_elem { int cnt; struct bpf_spin_lock lock; }; struct hash_elem * val = bpf_map_lookup_elem(&hash_map, &key); if (val) { bpf_spin_lock(&val->l

[PATCH v7 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-31 Thread Alexei Starovoitov
Introduce BPF_F_LOCK flag for map_lookup and map_update syscall commands and for map_update() helper function. In all these cases take a lock of existing element (which was provided in BTF description) before copying (in or out) the rest of map value. Implementation details that are part of uapi:

[PATCH v7 bpf-next 4/9] selftests/bpf: add bpf_spin_lock verifier tests

2019-01-31 Thread Alexei Starovoitov
add bpf_spin_lock tests to test_verifier.c that don't require latest llvm with BTF support Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 104 +- .../selftests/bpf/verifier/spin_lock.c| 331 ++ 2 files changed, 434 insertions(+),

[PATCH v7 bpf-next 3/9] tools/bpf: sync include/uapi/linux/bpf.h

2019-01-31 Thread Alexei Starovoitov
sync bpf.h Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 60b99b730a41..86f7c438d40f 100644 --- a/tools/include/uapi/linux/bpf.h +

[PATCH v7 bpf-next 0/9] introduce bpf_spin_lock

2019-01-31 Thread Alexei Starovoitov
Many algorithms need to read and modify several variables atomically. Until now it was hard to impossible to implement such algorithms in BPF. Hence introduce support for bpf_spin_lock. The api consists of 'struct bpf_spin_lock' that should be placed inside hash/array/cgroup_local_storage element

[PATCH v7 bpf-next 2/9] bpf: add support for bpf_spin_lock to cgroup local storage

2019-01-31 Thread Alexei Starovoitov
Allow 'struct bpf_spin_lock' to reside inside cgroup local storage. Signed-off-by: Alexei Starovoitov --- kernel/bpf/local_storage.c | 2 ++ kernel/bpf/syscall.c | 3 ++- kernel/bpf/verifier.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/local_stora

Re: [PATCH mlx5-next 12/12] net/mlx5: Set ODP SRQ support in firmware

2019-01-31 Thread Jason Gunthorpe
On Tue, Jan 22, 2019 at 08:48:51AM +0200, Leon Romanovsky wrote: > From: Moni Shoua > > To avoid compatibility issue with older kernels the firmware doesn't > allow SRQ to work with ODP unless kernel asks for it. > > Signed-off-by: Moni Shoua > Reviewed-by: Majd Dibbiny > Signed-off-by: Leon R

Re: [PATCH rdma-next 00/12] Add SRQ and XRC support for ODP MRs

2019-01-31 Thread Jason Gunthorpe
On Tue, Jan 22, 2019 at 08:48:39AM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > This series extend ODP to work with SRQ and XRC. Being both per-operation > (e.g. RDMA write, RDMA read and atomic) and per-transport (e.g. RC, UD and > XRC), > we extend IB/core and mlx5 driver

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-31 Thread shuah
On 1/31/19 8:33 AM, Johan Hovold wrote: On Thu, Jan 31, 2019 at 04:18:33PM +0100, Marcel Holtmann wrote: I agree with Al that this change doesn't make much sense. The WARN_ON is there to catch any bugs leading to the termios being changed for a master side pty. Those should bugs should be fixed

[PATCH net-next] ipv4/igmp: Don't drop IGMP pkt with zeros src addr

2019-01-31 Thread Edward Chron
Don't drop IGMP packets with a source address of all zeros which are IGMP proxy reports. This is documented in Section 2.1.1 IGMP Forwarding Rules of RFC 4541 IGMP and MLD Snooping Switches Considerations. Signed-off-by: Edward Chron --- net/ipv4/route.c | 3 ++- 1 file changed, 2 insertions(+),

pull-request: bpf 2019-01-31

2019-01-31 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) disable preemption in sender side of socket filters, from Alexei. 2) fix two potential deadlocks in syscall bpf lookup and prog_register, from Martin and Alexei. 3) fix BTF to allow typed

[PATCH net-next 02/11] selftests: forwarding: mirror_lib: Update ping limits

2019-01-31 Thread Petr Machata
The current ping intervals are too short for running mirroring tests in simulator. This leads to ping sending a follow-up ping before the reply arrives, thus sending more than the requested 10 ICMP requests. Those are mirrored, and over a certain threshold the test case run is considered a failure,

[PATCH net-next 09/11] selftests: forwarding: mirror_gre_bridge_1q_lag: Enable forwarding

2019-01-31 Thread Petr Machata
This test relies on routing in the primary traffic path, but neglects to enable forwarding. Do so. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/mir

[PATCH net-next 11/11] selftests: forwarding: mirror_gre_flower: Fix test result handling

2019-01-31 Thread Petr Machata
The global variable RET needs to be initialized before each call to log_test. This test case sets it once before running the tests, but then calls log_tests for every individual test. Thus a failure in one of the tests causes spurious failures in follow-up tests as well. Fix by moving the initiali

[PATCH net-next 08/11] selftests: forwarding: mirror_gre_bridge_1q_lag: Flush neighbors

2019-01-31 Thread Petr Machata
After one LAG slave is downed and another upped, it takes a while for the neighbor on a bridge to time out and get renegotiated. The test does prompt update of FDB entries by arpinging. But because the neighbor still references another address, offloading is not possible, and some packets may end u

[PATCH net-next 07/11] selftests: forwarding: mirror_gre_vlan_bridge_1q: Fix roaming test

2019-01-31 Thread Petr Machata
ARP or ND traffic can cause spurious migration of FDB back to $swp3. Mirroring is then updated in accordance with the change, and mirrored packets are seen at h3, causing a failure. Detect the case of this spurious roaming, and retry the test. Signed-off-by: Petr Machata --- .../net/forwarding/

[PATCH net-next 10/11] selftests: forwarding: mirror_gre_bridge_1q_lag: Ignore ARP

2019-01-31 Thread Petr Machata
This test sets up mirroring such that it mirrors all overlay traffic. That includes ARP, which causes occasional miscounts and spurious failures. Ignore ARP explicitly to avoid these problems. Signed-off-by: Petr Machata --- tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh | 6

[PATCH net-next 00/11] selftests: Various fixes

2019-01-31 Thread Petr Machata
This patch set contains various fixes whose common denominator is improving quality of forwarding and mlxsw selftests. Most of the fixes are improvements in determinism (such that timing and latency don't impact the test performance). These were prompted by regular runs of the test suite on a hard

[PATCH net-next 06/11] selftests: forwarding: mirror_gre_vlan_bridge_1q: Fix untagged test

2019-01-31 Thread Petr Machata
The untagged egress test sets up mirroring to {,ip6}gretap such that the underlay goes through a bridge. Then VLAN flags are manipulated to test that the traffic leaves the bridge 802.1q-tagged or not, as appropriate. However, when a neighbor expires at the time that the bridge VLAN is configured

[PATCH net-next 04/11] selftests: forwarding: mirror_gre_changes: Fix TTL test

2019-01-31 Thread Petr Machata
When running in a simulator, the TTL change takes a while to settle and during this time the performance of the packet processing is lowered. The resulting instability leads to ping sending more packets as it assumes some have been dropped. This then leads to regular spurious failures as more packe

[PATCH net-next 05/11] selftests: forwarding: mirror_lib: Wait for tardy mirrored packets

2019-01-31 Thread Petr Machata
When running in an environment with poor performance (such as a simulator), processing mirrored packets can take a while. Evaluating the condition too soon leads to spurious "seen 9, expected 10" failures as the last packet doesn't have enough time to get mirrored and the mirror to arrive and bump

[PATCH net-next 03/11] selftests: mlxsw: Update ping limits

2019-01-31 Thread Petr Machata
The current ping intervals are too short for running mirroring tests in simulator. This leads to ping sending a follow-up ping before the reply arrives, thus sending more than the requested 10 ICMP requests. This traffic is seen at the counters, and causes spurious failures. Bump interval and time

[PATCH net-next 01/11] selftests: forwarding: Make ping timeout configurable

2019-01-31 Thread Petr Machata
From: Ido Schimmel The current timeout (2 seconds) proved to be too low for some (emulated) systems where we run the tests. Make the timeout configurable and default to 5 seconds. Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/mlxsw/qos_dscp_b

Re: [PATCH bpf-next] bpf: check that BPF programs run with preemption disabled

2019-01-31 Thread Daniel Borkmann
On 01/29/2019 02:21 AM, Alexei Starovoitov wrote: > From: Peter Zijlstra > > Introduce cant_sleep() macro for annotation of functions that cannot sleep. > > Use it in BPF_PROG_RUN to catch execution of BPF programs > in preemptable context. > > Suggested-by: Jann Horn > Signed-off-by: Peter Zi

Re: [PATCH v2 bpf] bpf: selftests: handle sparse CPU allocations

2019-01-31 Thread Daniel Borkmann
On 01/31/2019 10:19 AM, Martynas Pumputis wrote: > Previously, bpf_num_possible_cpus() had a bug when calculating a > number of possible CPUs in the case of sparse CPU allocations, as > it was considering only the first range or element of > /sys/devices/system/cpu/possible. > > E.g. in the case o

Re: [PATCH v2 bpf 0/3] bpf: fixes for lockdep and deadlocks

2019-01-31 Thread Daniel Borkmann
On 01/31/2019 03:12 AM, Alexei Starovoitov wrote: > v1->v2: > - reworded 2nd patch. It's a real dead lock. Not a false positive > - dropped the lockdep fix for up_read_non_owner in bpf_get_stackid > > In addition to preempt_disable patch for socket filters > https://patchwork.ozlabs.org/patch/1032

Re: [PATCH bpf] bpf: run bpf programs with preemption disabled

2019-01-31 Thread Daniel Borkmann
On 01/29/2019 03:43 AM, Alexei Starovoitov wrote: > Disabled preemption is necessary for proper access to per-cpu maps > from BPF programs. > > But the sender side of socket filters didn't have preemption disabled: > unix_dgram_sendmsg->sk_filter->sk_filter_trim_cap->bpf_prog_run_save_cb->BPF_PROG

[PATCH RESEND 0/3] Add quirk for reading BD_ADDR from fwnode property

2019-01-31 Thread Matthias Kaehlcke
[initial post: https://lore.kernel.org/patchwork/cover/1028184/] On some systems the Bluetooth Device Address (BD_ADDR) isn't stored on the Bluetooth chip itself. One way to configure the address is through the device tree (patched in by the bootloader). The btqcomsmd driver is an example, it can

[PATCH RESEND 2/3] Bluetooth: btqcomsmd: use HCI_QUIRK_USE_BDADDR_PROPERTY

2019-01-31 Thread Matthias Kaehlcke
Use the HCI_QUIRK_USE_BDADDR_PROPERTY quirk to let the HCI core handle the reading of 'local-bd-address'. With this there is no need to set HCI_QUIRK_INVALID_BDADDR, the case of a non-existing or invalid fwnode property is handled by the core code. Signed-off-by: Matthias Kaehlcke Reviewed-by: Ba

[PATCH RESEND 1/3] Bluetooth: Add quirk for reading BD_ADDR from fwnode property

2019-01-31 Thread Matthias Kaehlcke
Add HCI_QUIRK_USE_BDADDR_PROPERTY to allow controllers to retrieve the public Bluetooth address from the firmware node property 'local-bd-address'. If quirk is set and the property does not exist or is invalid the controller is marked as unconfigured. Signed-off-by: Matthias Kaehlcke Reviewed-by:

[PATCH RESEND 3/3] Bluetooth: hci_qca: Set HCI_QUIRK_USE_BDADDR_PROPERTY for wcn3990

2019-01-31 Thread Matthias Kaehlcke
Set quirk for wcn3990 to read BD_ADDR from a firmware node property. Signed-off-by: Matthias Kaehlcke Tested-by: Balakrishna Godavarthi --- Changes in v3: - none Changes in v2: - patch added to the series --- drivers/bluetooth/hci_qca.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drive

[PATCH v2 net-next 1/2] net: nixge: Separate ctrl and dma resources

2019-01-31 Thread alex . williams
From: Alex Williams The DMA engine is a separate entity altogether, and this allows the DMA controller's address to float elsewhere in the FPGA's map. Signed-off-by: Alex Williams --- drivers/net/ethernet/ni/nixge.c | 74 - 1 file changed, 58 insertions(

[PATCH v2 net-next 2/2] net: nixge: Update device-tree bindings with v3.00

2019-01-31 Thread alex . williams
From: Alex Williams Now the DMA engine is free to float elsewhere in the system map. Signed-off-by: Alex Williams --- Documentation/devicetree/bindings/net/nixge.txt | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/nixg

[Patch net v2] xfrm: destroy xfrm_state synchronously on net exit path

2019-01-31 Thread Cong Wang
xfrm_state_put() moves struct xfrm_state to the GC list and schedules the GC work to clean it up. On net exit call path, xfrm_state_flush() is called to clean up and xfrm_flush_gc() is called to wait for the GC work to complete before exit. However, this doesn't work because one of the ->destructo

[PATCH net-next] r8169: remove rtl_wol_pll_power_down

2019-01-31 Thread Heiner Kallweit
rtl_wol_pll_power_down() is used in only one place and removing it makes the code simpler and better readable. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realte

Re: [PATCH net] bnxt_en: Disable interrupts when allocating CP rings or NQs.

2019-01-31 Thread David Miller
From: Michael Chan Date: Thu, 31 Jan 2019 14:31:48 -0500 > When calling firmware to allocate a CP ring or NQ, an interrupt associated > with that ring may be generated immediately before the doorbell is even > setup after the firmware call returns. When servicing the interrupt, the > driver may

Re: [PATCH net-next] net/mlx5e: Fix code style issue in mlx driver

2019-01-31 Thread Or Gerlitz
On Thu, Jan 31, 2019 at 10:49 PM Or Gerlitz wrote: > > On Thu, Jan 31, 2019 at 4:11 PM wrote: > > From: Tonghao Zhang > > > > Add the tab before '}' and keep the code style consistent. > > > > Signed-off-by: Tonghao Zhang > > LGTM > Reviewed-by: Or Gerlitz oops, for files starting with en_ p

Re: [PATCH net-next] net/mlx5e: Fix code style issue in mlx driver

2019-01-31 Thread Or Gerlitz
On Thu, Jan 31, 2019 at 4:11 PM wrote: > From: Tonghao Zhang > > Add the tab before '}' and keep the code style consistent. > > Signed-off-by: Tonghao Zhang LGTM Reviewed-by: Or Gerlitz

Re: [PATCH v3 net-next] r8169: improve WoL handling

2019-01-31 Thread David Miller
From: Heiner Kallweit Date: Thu, 31 Jan 2019 19:57:26 +0100 > WoL handling for the RTL8168 family is a little bit tricky because of > different types of broken BIOS and/or chip quirks. > > Two known issues: > 1. Network properly resumes from suspend only if WoL is enabled in the chip. > 2. Some

Re: [PATCH bpf-next v3 1/3] libbpf: move pr_*() functions to common header file

2019-01-31 Thread Arnaldo CArvalho de Melo
Em Thu, Jan 31, 2019 at 07:12:33PM +, Yonghong Song escreveu: > > > On 1/31/19 10:52 AM, Alexei Starovoitov wrote: > > On Tue, Jan 29, 2019 at 04:12:15PM +0100, Magnus Karlsson wrote: > >> Move the pr_*() functions in libbpf.c to a common header file called > >> libbpf_internal.h. This so tha

linux-next: Fixes tag needs some work in the net-next tree

2019-01-31 Thread Stephen Rothwell
Hi all, In commit 9fc55413270f ("net: hns3: fix improper error handling in the hclge_init_ae_dev()") Fixes tag Fixes: 288475b2ad01 ("{topost} net: hns3: refine umv space allocation") has these problem(s): - Target SHA1 does not exist I can't even find it by simple searches for the sub

Re: [PATCH bpf-next v4 5/7] samples/bpf: Add a "force" flag to XDP samples

2019-01-31 Thread Jesper Dangaard Brouer
On Wed, 30 Jan 2019 18:26:53 -0800 Jakub Kicinski wrote: > On Wed, 30 Jan 2019 20:08:59 +0100, Jesper Dangaard Brouer wrote: > > > I'll post a v5 with libbpf_strerror() usage when bpf_set_link_xdp_fd > > > failed in > > > samples but at this point it will only give us a standard "device or > >

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Jesper Dangaard Brouer
On Thu, 31 Jan 2019 09:45:23 -0800 (PST) David Miller wrote: > From: "Michael S. Tsirkin" > Date: Thu, 31 Jan 2019 10:25:17 -0500 > > > On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: > >> Previously virtnet_xdp_xmit() did not account for device tx counters, > >> which caused

Re: [PATCH v2 bpf-next] bpf: add optional memory accounting for maps

2019-01-31 Thread Jakub Kicinski
On Thu, 31 Jan 2019 10:38:01 +0100, Martynas Pumputis wrote: > Previously, memory allocated for a map was not accounted. Therefore, > this memory could not be taken into consideration by the cgroups > memory controller. > > This patch introduces the "BPF_F_ACCOUNT_MEM" flag which enables > the mem

Re: [PATCH net] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames

2019-01-31 Thread Eric Dumazet
On Thu, Jan 31, 2019 at 11:27 AM Saeed Mahameed wrote: > > Are you sure ? you are claiming that the hardware will skip csum > complete i.e cqe->checksum will be 0x for padded short IP frames. > i don't think this is the case, the whole bug is that the hw does > provide a partial cqe->checksum

Re: [PATCH bpf-next v3 1/3] libbpf: move pr_*() functions to common header file

2019-01-31 Thread Y Song
On Tue, Jan 29, 2019 at 7:13 AM Magnus Karlsson wrote: > > Move the pr_*() functions in libbpf.c to a common header file called > libbpf_internal.h. This so that the later libbpf AF_XDP helper library > code in xsk.c can use these printing functions too. > > Signed-off-by: Magnus Karlsson > --- >

[PATCH net] bnxt_en: Disable interrupts when allocating CP rings or NQs.

2019-01-31 Thread Michael Chan
When calling firmware to allocate a CP ring or NQ, an interrupt associated with that ring may be generated immediately before the doorbell is even setup after the firmware call returns. When servicing the interrupt, the driver may crash when trying to access the doorbell. Fix it by disabling inte

Re: [RFC 00/14] netlink/hierarchical stats

2019-01-31 Thread Jakub Kicinski
On Thu, 31 Jan 2019 08:31:51 -0800, Roopa Prabhu wrote: > On Thu, Jan 31, 2019 at 8:16 AM Roopa Prabhu wrote: > > On Wed, Jan 30, 2019 at 4:24 PM Jakub Kicinski wrote: > > > On Wed, 30 Jan 2019 14:14:34 -0800, Roopa Prabhu wrote: > > > > > > My thinking was that we should leave truly custom/str

Re: [PATCH net] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames

2019-01-31 Thread Saeed Mahameed
On Thu, 2019-01-31 at 11:07 -0800, Eric Dumazet wrote: > On Thu, Jan 31, 2019 at 11:04 AM Saeed Mahameed > wrote: > > On Thu, 2019-01-31 at 07:02 -0800, Eric Dumazet wrote: > > > On Thu, Jan 31, 2019 at 5:04 AM Tariq Toukan > > > > > > wrote: > > > > From: Saeed Mahameed > > > > > > > > When an

Re: [PATCH bpf-next v3 1/3] libbpf: move pr_*() functions to common header file

2019-01-31 Thread Yonghong Song
On 1/31/19 10:52 AM, Alexei Starovoitov wrote: > On Tue, Jan 29, 2019 at 04:12:15PM +0100, Magnus Karlsson wrote: >> Move the pr_*() functions in libbpf.c to a common header file called >> libbpf_internal.h. This so that the later libbpf AF_XDP helper library >> code in xsk.c can use these printi

Re: [PATCH net] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames

2019-01-31 Thread Eric Dumazet
On Thu, Jan 31, 2019 at 11:04 AM Saeed Mahameed wrote: > > On Thu, 2019-01-31 at 07:02 -0800, Eric Dumazet wrote: > > On Thu, Jan 31, 2019 at 5:04 AM Tariq Toukan > > wrote: > > > From: Saeed Mahameed > > > > > > When an ethernet frame is padded to meet the minimum ethernet frame > > > size, the

Re: [PATCH net-next v2 7/7] ethtool: add compat for devlink info

2019-01-31 Thread kbuild test robot
Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/devlink-add-device-driver-information-API/20190131-21 config: i386-randconfig-n0-01300126 (attached as .config) compiler: gcc-8

Re: [PATCH net] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames

2019-01-31 Thread Saeed Mahameed
On Thu, 2019-01-31 at 07:02 -0800, Eric Dumazet wrote: > On Thu, Jan 31, 2019 at 5:04 AM Tariq Toukan > wrote: > > From: Saeed Mahameed > > > > When an ethernet frame is padded to meet the minimum ethernet frame > > size, the padding octets are not covered by the hardware checksum. > > Fortunate

[PATCH v3 net-next] r8169: improve WoL handling

2019-01-31 Thread Heiner Kallweit
WoL handling for the RTL8168 family is a little bit tricky because of different types of broken BIOS and/or chip quirks. Two known issues: 1. Network properly resumes from suspend only if WoL is enabled in the chip. 2. Some notebooks wake up immediately if system is suspended and network device

[PATCH net-next v4 0/8] devlink: add device (driver) information API

2019-01-31 Thread Jakub Kicinski
Hi! fw_version field in ethtool -i does not suit modern needs with 31 characters being quite limiting on more complex systems. There is also no distinction between the running and flashed versions of the firmware. Since the driver information pertains to the entire device, rather than a particul

[PATCH net-next v4 6/8] nfp: nsp: add support for versions command

2019-01-31 Thread Jakub Kicinski
Retrieve the FW versions with the new command. Signed-off-by: Jakub Kicinski --- .../ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 61 +++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 20 ++ 2 files changed, 81 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/n

  1   2   3   >