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

2019-01-30 Thread Ido Schimmel
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) > >> +static int br_mc_disabled_update(struc

Re: [PATCH net-next v3 1/8] devlink: add device information API

2019-01-30 Thread Jiri Pirko
Thu, Jan 31, 2019 at 12:41:26AM CET, jakub.kicin...@netronome.com wrote: >ethtool -i has served us well for a long time, but its showing >its limitations more and more. The device information should >also be reported per device not per-netdev. > >Lay foundation for a simple devlink-based way of rea

Re: [PATCH] can: flexcan: fix timeout when set small bitrate

2019-01-30 Thread Marc Kleine-Budde
On 1/31/19 7:58 AM, Joakim Zhang wrote: > From: Dong Aisheng > > Current we can meet timeout issue when setting a small bitrate > like 1 as follows: > root@imx6qdlsolo:~# ip link set can0 up type can bitrate 1 > A link change request failed with some changes committed already. > Interface

Re: [PATCH] net: esp4: Fix double free on esp4 functions

2019-01-30 Thread Steffen Klassert
On Thu, Jan 31, 2019 at 06:32:07AM +, Ramin Farajpour Cami wrote: > Hi Eric, > > I going to for avoid double free of resource identifiers we should set > variables initialized in "tmp/key" to NULL if an error occurred int the > "esp_init_authenc()" and "esp_output_tail()" attempts to free the

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-30 Thread David Chang
Hi Heiner, 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? > 2. Please get a register dump (ethtool -d ) from 4.18 and 4.19 >and compare them. I'm sorry that I do not have the issue machine handy.

[PATCH net] l2tp: copy 4 more bytes to linear part if necessary

2019-01-30 Thread Jacob Wen
The size of L2TPv2 header with all optional fields is 14 bytes. l2tp_udp_recv_core only moves 10 bytes to the linear part of a skb. This may lead to l2tp_recv_common read data outside of a skb. This patch make sure that there is at least 14 bytes in the linear part of a skb to meet the maximum nee

Re: [PATCH btf 0/3] Add BTF types deduplication algorithm

2019-01-30 Thread Yonghong Song
add Edward. On 1/30/19 10:58 PM, Andrii Nakryiko wrote: > This patch series adds BTF deduplication algorithm to libbpf. This algorithm > allows to take BTF type information containing duplicate per-compilation unit > information and reduce it to equivalent set of BTF types with no duplication >

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

2019-01-30 Thread Y Song
On Wed, Jan 30, 2019 at 6:05 AM 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 memor

[PATCH btf 3/3] selftests/btf: add initial BTF dedup tests

2019-01-30 Thread Andrii Nakryiko
This patch sets up a new kind of tests (BTF dedup tests) and tests few aspects of BTF dedup algorithm. More complete set of tests will come in follow up patches. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/btf.c| 12 + tools/lib/bpf/btf.h| 3 + to

[PATCH btf 2/3] btf: add BTF types deduplication algorithm

2019-01-30 Thread Andrii Nakryiko
This patch implements BTF types deduplication algorithm. It allows to greatly compress typical output of pahole's DWARF-to-BTF conversion or LLVM's compilation output by detecting and collapsing identical types emitted in isolation per compilation unit. Algorithm also resolves struct/union forward

[PATCH btf 0/3] Add BTF types deduplication algorithm

2019-01-30 Thread Andrii Nakryiko
This patch series adds BTF deduplication algorithm to libbpf. This algorithm allows to take BTF type information containing duplicate per-compilation unit information and reduce it to equivalent set of BTF types with no duplication without loss of information. It also deduplicates strings and remo

[PATCH btf 1/3] btf: extract BTF type size calculation

2019-01-30 Thread Andrii Nakryiko
This pre-patch extracts calculation of amount of space taken by BTF type descriptor for later reuse by btf_dedup functionality. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/btf.c | 98 + 1 file changed, 46 insertions(+), 52 deletions(-) diff --gi

[PATCH] can: flexcan: fix timeout when set small bitrate

2019-01-30 Thread Joakim Zhang
From: Dong Aisheng Current we can meet timeout issue when setting a small bitrate like 1 as follows: root@imx6qdlsolo:~# ip link set can0 up type can bitrate 1 A link change request failed with some changes committed already. Interface can0 may have been left with an inconsistent configur

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-30 Thread Heiner Kallweit
And one more inquiry .. So far I read about the issue only in combination with NFS. Does the issue also occur with iperf or some other type of high network load? Heiner On 31.01.2019 07:35, Heiner Kallweit wrote: > Hi David, two more things: > > 1. Could you please test a recent linux-next ker

[PATCH net-next] r8169: improve WoL handling

2019-01-30 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

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-30 Thread Heiner Kallweit
Hi David, two more things: 1. Could you please test a recent linux-next kernel? 2. Please get a register dump (ethtool -d ) from 4.18 and 4.19 and compare them. Heiner On 31.01.2019 07:21, Heiner Kallweit wrote: > David, thanks for the link to the bug ticket. > I think only a proper bisect c

Re: [ethtool 1/6] ethtool: move option parsing related code into function

2019-01-30 Thread Jeff Kirsher
On Wed, 2019-01-30 at 16:08 -0500, John W. Linville wrote: > On Thu, Jan 17, 2019 at 03:03:08PM -0800, Nicholas Nunley wrote: > > Move option parsing code into find_option function. > > > > No behavior changes. > > > > Based on patch by Kan Liang > > > > Signed-off-by: Nicholas Nunley > > Wel

Re: [PATCH net 0/3] net: stmmac: Misc fixes

2019-01-30 Thread David Miller
From: Jose Abreu Date: Wed, 30 Jan 2019 15:54:18 +0100 > Some misc fixes for stmmac targeting -net. Series applied.

RE: [PATCH net-next] strparser: Return if socket does not have required number of bytes

2019-01-30 Thread Vakul Garg
> -Original Message- > From: David Miller > Sent: Thursday, January 31, 2019 11:30 AM > To: Vakul Garg > Cc: netdev@vger.kernel.org; bor...@mellanox.com; > avia...@mellanox.com; davejwat...@fb.com; doro...@fb.com > Subject: Re: [PATCH net-next] strparser: Return if socket does not have

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-30 Thread Heiner Kallweit
David, thanks for the link to the bug ticket. I think only a proper bisect can help to find the offending commit. Heiner On 31.01.2019 03:32, David Chang wrote: > Hi, > > We had a similr case here. > - Realtek r8169 receive performance regression in kernel 4.19 > https://bugzilla.suse.com/sho

Re: [PATCH net] ipvlan, l3mdev: fix broken l3s mode wrt local routes

2019-01-30 Thread David Miller
From: Daniel Borkmann Date: Wed, 30 Jan 2019 12:49:48 +0100 > While implementing ipvlan l3 and l3s mode for kubernetes CNI plugin, > I ran into the issue that while l3 mode is working fine, l3s mode > does not have any connectivity to kube-apiserver and hence all pods > end up in Error state as w

Re: [PATCH net-next] strparser: Return if socket does not have required number of bytes

2019-01-30 Thread David Miller
From: Vakul Garg Date: Wed, 30 Jan 2019 07:31:44 + > Function strp_data_ready() should peek the associated socket to check > whether it has the required number of bytes available before queueing > work or initiating socket read via strp_read_sock(). This saves cpu > cycles because strp_read_s

Re: [PATCH net v4] l2tp: fix reading optional fields of L2TPv3

2019-01-30 Thread David Miller
From: Jacob Wen Date: Wed, 30 Jan 2019 14:55:14 +0800 > Use pskb_may_pull() to make sure the optional fields are in skb linear > parts, so we can safely read them later. > > It's easy to reproduce the issue with a net driver that supports paged > skb data. Just create a L2TPv3 over IP tunnel and

Re: [PATCH] ipconfig: make the wait for carrier timeout configurable

2019-01-30 Thread David Miller
From: Martin Kepplinger Date: Mon, 28 Jan 2019 12:30:05 +0100 > From: Manfred Schlaegl > > commit 3fb72f1e6e61 ("ipconfig wait for carrier") added a > "wait for carrier" policy, with a fixed worst case maximum wait > of two minutes. > > This makes the wait for carrier timeout configurable (0 -

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

2019-01-30 Thread Y Song
[ My reply somehow rejected by netdev, this is to send it again. ] On Wed, Jan 30, 2019 at 1: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

Re: [PATCH iproute2-next] Introduce ip-brctl shell script

2019-01-30 Thread David Ahern
On 1/30/19 3:55 AM, Stefano Brivio wrote: >> I get your intent, but this seems more appropriate for you / Red Hat to >> carry than something we want to distribute as part of iproute2. > > Sure, I could also do that, but: > > - me creating another project: similar maintenance burden for > distri

Re: Question on ptr_ring linux header

2019-01-30 Thread fei phung
Hi, /* * Filename: circ_ring.c * Version: 1.0 * Description: A circular buffer using API from * https://github.com/torvalds/linux/blob/master/include/linux/ptr_ring.h */ ptr_ring's void** queue is just giving data race problem, running consume() together with [assignment of pointers+produce(

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

2019-01-30 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 v6 bpf-next 2/9] bpf: add support for bpf_spin_lock to cgroup local storage

2019-01-30 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

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

2019-01-30 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 v6 bpf-next 7/9] tools/bpf: sync uapi/bpf.h

2019-01-30 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 v6 bpf-next 6/9] bpf: introduce BPF_F_LOCK flag

2019-01-30 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 v6 bpf-next 5/9] selftests/bpf: add bpf_spin_lock C test

2019-01-30 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 v6 bpf-next 8/9] libbpf: introduce bpf_map_lookup_elem_flags()

2019-01-30 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 v6 bpf-next 1/9] bpf: introduce bpf_spin_lock

2019-01-30 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 v6 bpf-next 0/9] introduce bpf_spin_lock

2019-01-30 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 v6 bpf-next 3/9] tools/bpf: sync include/uapi/linux/bpf.h

2019-01-30 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 +

Re: [PATCH iproute2-next v2] ss: add AF_XDP support

2019-01-30 Thread David Ahern
On 1/29/19 11:57 PM, bjorn.to...@gmail.com wrote: > From: Björn Töpel > > AF_XDP is an address family that is optimized for high performance > packet processing. > > This patch adds AF_XDP support to ss(8) so that sockets can be queried > and monitored. > > Example: > $ sudo ss --xdp -e -p -m >

Re: [PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO.

2019-01-30 Thread Tom Herbert
On Wed, Jan 30, 2019 at 6:59 PM maowenan wrote: > > > > On 2019/1/31 10:43, Tom Herbert wrote: > > On Wed, Jan 30, 2019 at 5:58 PM maowenan wrote: > >> > >> > >> > >> On 2019/1/30 4:24, Tom Herbert wrote: > >>> On Tue, Jan 29, 2019 at 12:08 AM maowenan wrote: > > > > On 2019/

Re: [RFC] net: dp83640: expire old TX-skb

2019-01-30 Thread Richard Cochran
On Mon, Jan 28, 2019 at 06:45:47PM +0100, Sebastian Andrzej Siewior wrote: > During sendmsg() a cloned skb is saved via dp83640_txtstamp() in > ->tx_queue. After the NIC sends this packet, the PHY will reply with a > timestamp for that TX packet. If the cable is pulled at the right time I > don't s

[PATCH] bpfilter: remove extra header search paths for bpfilter_umh

2019-01-30 Thread Masahiro Yamada
Currently, the header search paths -Itools/include and -Itools/include/uapi are not used. Let's drop the unused code. We can remove -I. too by fixing up one C file. Signed-off-by: Masahiro Yamada --- Perhaps, are these extra header search paths for more upstreaming in the future? If this patch

Re: [PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO.

2019-01-30 Thread maowenan
On 2019/1/31 10:43, Tom Herbert wrote: > On Wed, Jan 30, 2019 at 5:58 PM maowenan wrote: >> >> >> >> On 2019/1/30 4:24, Tom Herbert wrote: >>> On Tue, Jan 29, 2019 at 12:08 AM maowenan wrote: On 2019/1/29 14:24, Tom Herbert wrote: > On Mon, Jan 28, 2019 at 10:04 PM maow

Re: [PATCH bpf-next 2/4] bpf: fix lockdep false positive in stackmap

2019-01-30 Thread Waiman Long
On 01/30/2019 09:01 PM, Alexei Starovoitov wrote: > On Wed, Jan 30, 2019 at 04:32:12PM -0500, Waiman Long wrote: >> On 01/30/2019 04:11 PM, Waiman Long wrote: >>> On 01/30/2019 03:10 PM, Alexei Starovoitov wrote: On Wed, Jan 30, 2019 at 02:42:23PM -0500, Waiman Long wrote: > On 01/30/2019

Re: [PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO.

2019-01-30 Thread Tom Herbert
On Wed, Jan 30, 2019 at 5:58 PM maowenan wrote: > > > > On 2019/1/30 4:24, Tom Herbert wrote: > > On Tue, Jan 29, 2019 at 12:08 AM maowenan wrote: > >> > >> > >> > >> On 2019/1/29 14:24, Tom Herbert wrote: > >>> On Mon, Jan 28, 2019 at 10:04 PM maowenan wrote: > > > > On 2019

[PATCH 3/9] ptp_qoriq: convert to use ptp_qoriq_init()

2019-01-30 Thread Yangbo Lu
Moved QorIQ PTP clock initialization into new function qoriq_ptp_init(). This function could also be reused by ENETC PTP drvier which is a PCI driver for same 1588 timer IP block. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 120 + include

[PATCH 6/9] ptp_qoriq: fix register memory map

2019-01-30 Thread Yangbo Lu
The 1588 timer on eTSEC Ethernet controller uses different register memory map with DPAA Ethernet controller. Now the new ENETC Ethernet controller uses same reigster memory map with DPAA. To support ENETC, let's use register memory map of DPAA/ENETC in default. Signed-off-by: Yangbo Lu --- driv

[PATCH 5/9] dt-binding: ptp_qoriq: add little-endian support

2019-01-30 Thread Yangbo Lu
Specify "little-endian" property if the 1588 timer IP block is little-endian mode. The default endian mode is big-endian. Signed-off-by: Yangbo Lu --- .../devicetree/bindings/ptp/ptp-qoriq.txt |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Documentation/devic

[PATCH 2/9] ptp_qoriq: make ptp operations global

2019-01-30 Thread Yangbo Lu
This patch is to make functions of ptp operations global, so that ENETC PTP driver which is a PCI driver for same 1588 timer IP block could reuse them. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c | 27 --- include/linux/fsl/ptp_qoriq.h |9 + 2

[PATCH 7/9] ptp: add QorIQ PTP support for ENETC

2019-01-30 Thread Yangbo Lu
This patch is to add QorIQ PTP support for ENETC. ENETC PTP driver which is a PCI driver for same 1588 timer IP block will reuse QorIQ PTP driver. Signed-off-by: Yangbo Lu --- drivers/ptp/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ptp/Kconfig b/driv

[PATCH 0/9] Add ENETC PTP clock driver

2019-01-30 Thread Yangbo Lu
There is same QorIQ 1588 timer IP block on the new ENETC Ethernet controller with eTSEC/DPAA Ethernet controllers. However it's different endianness (little-endian) and using PCI driver. To support ENETC PTP driver, ptp_qoriq driver needed to be reworked to make functions global for reusing, to ad

[PATCH 1/9] ptp_qoriq: make structure/function names more consistent

2019-01-30 Thread Yangbo Lu
Strings containing "ptp_qoriq" or "qoriq_ptp" which were used for structure/function names were complained by users. Let's just use the unique "ptp_qoriq" to make these names more consistent. This patch is just to unify the names using "ptp_qoriq". It hasn't changed any functions. Signed-off-by: Y

[PATCH 4/9] ptp_qoriq: add little enadian support

2019-01-30 Thread Yangbo Lu
There is QorIQ 1588 timer IP block on the new ENETC Ethernet controller. However it uses little endian mode which is different with before. This patch is to add little endian support for the driver by using "little-endian" dts node property. Signed-off-by: Yangbo Lu --- drivers/ptp/ptp_qoriq.c

[PATCH 9/9] MAINTAINERS: add enetc_ptp driver into QorIQ PTP list

2019-01-30 Thread Yangbo Lu
This patch to add enetc_ptp driver into QorIQ PTP list for maintaining. Signed-off-by: Yangbo Lu --- MAINTAINERS |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 019a2bc..f0b50f8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6093,6 +6093,7

[PATCH 8/9] enetc: add PTP clock driver

2019-01-30 Thread Yangbo Lu
This patch is to add PTP clock driver for ENETC. The driver reused QorIQ PTP clock driver. Signed-off-by: Yangbo Lu --- drivers/net/ethernet/freescale/enetc/Kconfig | 12 ++ drivers/net/ethernet/freescale/enetc/Makefile|3 + drivers/net/ethernet/freescale/enetc/enetc_hw.h |5 +

Re: r8169 Driver - Poor Network Performance Since Kernel 4.19

2019-01-30 Thread David Chang
Hi, We had a similr case here. - Realtek r8169 receive performance regression in kernel 4.19 https://bugzilla.suse.com/show_bug.cgi?id=1119649 kernel: r8169 :01:00.0 eth0: RTL8168h/8111h, XID 54100880 The major symptom is there are many rx_missed count. On Jan 30, 2019 at 20:15:45 +0100,

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

2019-01-30 Thread Jakub Kicinski
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 > > resource > > busy" error > > That is a good first iteration impr

[PATCH v2 bpf 2/3] bpf: fix potential deadlock in bpf_prog_register

2019-01-30 Thread Alexei Starovoitov
Lockdep found a potential deadlock between cpu_hotplug_lock, bpf_event_mutex, and cpuctx_mutex: [ 13.007000] WARNING: possible circular locking dependency detected [ 13.007587] 5.0.0-rc3-00018-g2fa53f892422-dirty #477 Not tainted [ 13.008124] -

[PATCH v2 bpf 1/3] bpf: fix lockdep false positive in percpu_freelist

2019-01-30 Thread Alexei Starovoitov
Lockdep warns about false positive: [ 12.492084] e6b28347 (&head->lock){+...}, at: pcpu_freelist_push+0x2a/0x40 [ 12.492696] but this lock was taken by another, HARDIRQ-safe lock in the past: [ 12.493275] (&rq->lock){-.-.} [ 12.493276] [ 12.493276] [ 12.493276] and interrupts

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

2019-01-30 Thread Alexei Starovoitov
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/1032437/ First patch fixes lockdep false positive in percpu_freeli

[PATCH v2 bpf 3/3] bpf: Fix syscall's stackmap lookup potential deadlock

2019-01-30 Thread Alexei Starovoitov
From: Martin KaFai Lau The map_lookup_elem used to not acquiring spinlock in order to optimize the reader. It was true until commit 557c0c6e7df8 ("bpf: convert stackmap to pre-allocation") The syscall's map_lookup_elem(stackmap) calls bpf_stackmap_copy(). bpf_stackmap_copy() may find the elem n

Re: Kernel memory corruption in CIPSO labeled TCP packets processing.

2019-01-30 Thread Paul Moore
On Wed, Jan 30, 2019 at 8:11 AM Nazarov Sergey wrote: > 30.01.2019, 01:42, "Paul Moore" : > > There are several cases where the stack ends up calling icmp_send() > > after the skb has been through ip_options_compile(), that should be > > okay. > > > > -- > > paul moore > > www.paul-moore.com > > I

Re: [PATCH bpf-next 2/4] bpf: fix lockdep false positive in stackmap

2019-01-30 Thread Alexei Starovoitov
On Wed, Jan 30, 2019 at 04:32:12PM -0500, Waiman Long wrote: > On 01/30/2019 04:11 PM, Waiman Long wrote: > > On 01/30/2019 03:10 PM, Alexei Starovoitov wrote: > >> On Wed, Jan 30, 2019 at 02:42:23PM -0500, Waiman Long wrote: > >>> On 01/30/2019 02:30 PM, Alexei Starovoitov wrote: > On Wed, Ja

Re: [PATCH] rtlwifi: remove set but not used variable 'cmd_seq'

2019-01-30 Thread YueHaibing
On 2019/1/30 18:47, Kalle Valo wrote: > Pkshih writes: > >> On Tue, 2019-01-29 at 14:03 +0800, YueHaibing wrote: >>> +cc netdev@vger.kernel.org >>> >>> On 2019/1/29 13:57, YueHaibing wrote: ping... On 2018/9/11 20:12, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable

Re: [PATCH net-next] net: udp Allow CHECKSUM_UNNECESSARY packets to do GRO.

2019-01-30 Thread maowenan
On 2019/1/30 4:24, Tom Herbert wrote: > On Tue, Jan 29, 2019 at 12:08 AM maowenan wrote: >> >> >> >> On 2019/1/29 14:24, Tom Herbert wrote: >>> On Mon, Jan 28, 2019 at 10:04 PM maowenan wrote: On 2019/1/29 12:01, Tom Herbert wrote: > On Mon, Jan 28, 2019 at 7:00 PM maow

Re: net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs

2019-01-30 Thread John David Anglin
On 2019-01-30 5:38 p.m., Andrew Lunn wrote: > I'd suggest you take a look at the datasheet for the 37xx and check > what the hardware actually supports. You might need to extend the > driver. I did look and the GIC does support level interrupts.  But all the documentation is in generic ARM document

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

2019-01-30 Thread Florian Fainelli
On 1/29/19 11:36 PM, Ido Schimmel wrote: > On Tue, Jan 29, 2019 at 04:55:37PM -0800, Florian Fainelli wrote: >> Some Ethernet switches might not be able to support disabling multicast >> flooding globally when e.g: several bridges span the same physical >> device, propagate the return value of br_m

Re: Stack sends oversize UDP packet to the driver

2019-01-30 Thread महेश बंडेवार
On Wed, Jan 30, 2019 at 1:07 AM Michael Chan wrote: > > On Tue, Jan 22, 2019 at 10:29 AM Mahesh Bandewar (महेश बंडेवार) > wrote: > > > > > The idea behind the fix is very simple and it is to create a dst-only > > (unregistered) device with a very low MTU and use it instead of 'lo' > > while inval

Re: [PATCH net-next] nfp: use struct_size() in kzalloc()

2019-01-30 Thread Gustavo A. R. Silva
On 1/30/19 6:52 PM, Jakub Kicinski wrote: > On Wed, 30 Jan 2019 18:38:59 -0600, Gustavo A. R. Silva wrote: >> One of the more common cases of allocation size calculations is finding >> the size of a structure that has a zero-sized array at the end, along >> with memory for some number of element

[PATCH net-next] tulip: eeprom: use struct_size() in kmalloc()

2019-01-30 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kmalloc(sizeof(struc

Re: [PATCH net-next] nfp: use struct_size() in kzalloc()

2019-01-30 Thread Jakub Kicinski
On Wed, 30 Jan 2019 18:38:59 -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo { >

[PATCH net-next] ipv4: fib: use struct_size() in kzalloc()

2019-01-30 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struc

[PATCH net-next] xprtrdma: Use struct_size() in kzalloc()

2019-01-30 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struc

Re: [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: Save switch rules

2019-01-30 Thread Vivien Didelot
Hi Miquèl, On Wed, 30 Jan 2019 10:46:06 +0100, Miquel Raynal wrote: > > > > Today, there is no S2RAM support for switches. First, I proposed to add > > > > suspend/resume callbacks to the mv88e6xxx driver - just enough to avoid > > > > crashing the kernel. > > > > > > Then i would suggest th

[PATCH net-next] nfp: use struct_size() in kzalloc()

2019-01-30 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struc

Re: [PATCH] tty: Fix WARNING in tty_set_termios

2019-01-30 Thread shuah
On 1/30/19 3:32 AM, Johan Hovold wrote: On Mon, Jan 28, 2019 at 02:29:22PM -0700, shuah wrote: On 1/25/19 9:14 PM, Al Viro wrote: On Fri, Jan 25, 2019 at 04:29:05PM -0700, Shuah Khan wrote: tty_set_termios() has the following WARMN_ON which can be triggered with a syscall to invoke TIOCGETD __

[PATCH net-next] cxgb4: smt: use struct_size() in kvzalloc()

2019-01-30 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kvzalloc(sizeof(stru

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

2019-01-30 Thread Jakub Kicinski
On Wed, 30 Jan 2019 14:14:34 -0800, Roopa Prabhu wrote: > On Mon, Jan 28, 2019 at 3:45 PM Jakub Kicinski wrote: > > Hi! > > > > As I tried to explain in my slides at netconf 2018 we are lacking > > an expressive, standard API to report device statistics. > > > > Networking silicon generally maintai

[PATCH net-next] cxgb4: sched: use struct_size() in kvzalloc()

2019-01-30 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kvzalloc(sizeof(stru

Re: [PATCH net-next v8 0/8] devlink: Add configuration parameters support for devlink_port

2019-01-30 Thread Jakub Kicinski
On Mon, 28 Jan 2019 18:00:19 +0530, Vasundhara Volam wrote: > This patchset adds support for configuration parameters setting through > devlink_port. Each device registers supported configuration parameters > table. > > The user can retrieve data on these parameters by > "devlink port param show"

[PATCH bpf-next v5 3/5] bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c

2019-01-30 Thread Peter Oskolkov
This patch builds on top of the previous patch in the patchset, which added BPF_LWT_ENCAP_IP mode to bpf_lwt_push_encap. As the encapping can result in the skb needing to go via a different interface/route/dst, bpf programs can indicate this by returning BPF_LWT_REROUTE, which triggers a new route

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

2019-01-30 Thread Peter Oskolkov
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). This is useful when thousands of different short-liv

[PATCH bpf-next v5 1/5] bpf: add plumbing for BPF_LWT_ENCAP_IP in bpf_lwt_push_encap

2019-01-30 Thread Peter Oskolkov
This patch adds all needed plumbing in preparation to allowing bpf programs to do IP encapping via bpf_lwt_push_encap. Actual implementation is added in the next patch in the patchset. Of note: - bpf_lwt_push_encap can now be called from BPF_PROG_TYPE_LWT_XMIT prog types in addition to BPF_PROG_

[PATCH bpf-next v5 5/5] selftests: bpf: add test_lwt_ip_encap selftest

2019-01-30 Thread Peter Oskolkov
This patch adds a bpf self-test to cover BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap. Covered: - encapping in LWT_IN and LWT_XMIT - IPv4 and IPv6 Signed-off-by: Peter Oskolkov Change-Id: I9d0d1003a40c28a41467116f3c32a84730ff39b2 --- tools/testing/selftests/bpf/Makefile | 5 +- .../te

[PATCH bpf-next v5 4/5] bpf: sync //bpf.h with tools//bpf.h

2019-01-30 Thread Peter Oskolkov
This patch copies changes in bpf.h done by a previous patch in this patchset from the kernel uapi include dir into tools uapi include dir. Signed-off-by: Peter Oskolkov --- tools/include/uapi/linux/bpf.h | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a

[PATCH bpf-next v5 0/5] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2019-01-30 Thread Peter Oskolkov
This patchset 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). This is useful when thousands of different short-

Re: [PATCH] : net : hso : do not call unregister_netdev if not registered

2019-01-30 Thread Yavuz, Tuba
Hi David, I'll fix the spaces in the subject. When I checked my patch it only had a p0 patch warning but I am not sure how to fix it. WARNING: patch prefix 'drivers' exists, appears to be a -p0 patch total: 0 errors, 1 warnings, 0 checks, 8 lines checked drivers/net/usb/hso.patch has style p

[PATCH net-next v3 7/8] nfp: devlink: report the running and flashed versions

2019-01-30 Thread Jakub Kicinski
Report versions of firmware components using the new NSP command. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_devlink.c | 87 +++ 1 file changed, 87 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netr

[PATCH net-next v3 5/8] nfp: devlink: report fixed versions

2019-01-30 Thread Jakub Kicinski
Report information about the hardware. RFCv2: - add defines for board IDs which are likely to be reusable for other drivers (Jiri). Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_devlink.c | 36 ++- 1 file changed, 35 insertions(+), 1 deletion(-) diff

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

2019-01-30 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

[PATCH net] enic: fix checksum validation for IPv6

2019-01-30 Thread Govindarajulu Varadarajan
In case of IPv6 pkts, ipv4_csum_ok is 0. Because of this, driver does not set skb->ip_summed. So IPv6 rx checksum is not offloaded. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH net-next v3 3/8] devlink: add generic info version names

2019-01-30 Thread Jakub Kicinski
Add defines and docs for generic info versions. v3: - add docs; - separate patch (Jiri). Signed-off-by: Jakub Kicinski --- .../networking/devlink-info-versions.rst | 38 +++ Documentation/networking/index.rst| 1 + include/net/devlink.h

[PATCH net-next v3 8/8] ethtool: add compat for devlink info

2019-01-30 Thread Jakub Kicinski
If driver did not fill the fw_version field, try to call into the new devlink get_info op and collect the versions that way. We assume ethtool was always reporting running versions. v3 (Jiri): - do a dump and then parse it instead of special handling; - concatenate all versions (well, all that f

[PATCH net-next v3 2/8] devlink: add version reporting to devlink info API

2019-01-30 Thread Jakub Kicinski
ethtool -i has a few fixed-size fields which can be used to report firmware version and expansion ROM version. Unfortunately, modern hardware has more firmware components. There is usually some datapath microcode, management controller, PXE drivers, and a CPLD load. Running ethtool -i on modern con

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

2019-01-30 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 v3 1/8] devlink: add device information API

2019-01-30 Thread Jakub Kicinski
ethtool -i has served us well for a long time, but its showing its limitations more and more. The device information should also be reported per device not per-netdev. Lay foundation for a simple devlink-based way of reading device info. Add driver name and device serial number as initial pieces o

[PATCH net-next v3 4/8] nfp: devlink: report driver name and serial number

2019-01-30 Thread Jakub Kicinski
Report the basic info through new devlink info API. RFCv2: - add driver name; - align serial to core changes. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_devlink.c | 24 +++ 1 file changed, 24 insertions(+) diff --git a/drivers/net/ethernet/netronome

BUG: KASAN: double-free or invalid-free in ip_defrag after upgrade from 4.19.13

2019-01-30 Thread Ivan Babrou
Hey, Continuing from this thread earlier today: * https://marc.info/?t=15488672911&r=1&w=2 We fired up KASAN enabled kernel one one of those machine and this is what we saw: $ /tmp/decode_stacktrace.sh /usr/lib/debug/lib/modules/4.19.18-cloudflare-2019.1.8-1-gcabf55c/vmlinux linux-4.19.18 <

Re: [PATCH net] ipvlan, l3mdev: fix broken l3s mode wrt local routes

2019-01-30 Thread David Ahern
On 1/30/19 4:49 AM, Daniel Borkmann wrote: > While implementing ipvlan l3 and l3s mode for kubernetes CNI plugin, > I ran into the issue that while l3 mode is working fine, l3s mode > does not have any connectivity to kube-apiserver and hence all pods > end up in Error state as well. The ipvlan mas

[PATCH net-next v2 1/5] net: tls: Support 256 bit keys

2019-01-30 Thread Dave Watson
Wire up support for 256 bit keys from the setsockopt to the crypto framework Signed-off-by: Dave Watson --- include/net/tls.h | 5 ++- include/uapi/linux/tls.h | 15 net/tls/tls_main.c| 33 +++- net/tls/tls_sw.c | 29

Re: [PATCH net-next v2 6/7] nfp: devlink: report the running and flashed versions

2019-01-30 Thread Jakub Kicinski
On Wed, 30 Jan 2019 22:57:52 +0100, Jiri Pirko wrote: > >+/* Control processor FW version, FW is responsible for house keeping tasks, > >+ * PHY control etc. > >+ */ > >+#define DEVLINK_VERSION_GENERIC_FW_MGMT "fw.mgmt" > >+/* Data path microcode controlling high-speed packet processing

  1   2   3   >