Re: [net-next 00/10][pull request] 1GbE Intel Wired LAN Driver Updates 2019-05-28

2019-05-28 Thread David Miller
From: Jeff Kirsher Date: Tue, 28 May 2019 17:17:16 -0700 > This series contains updates to e1000e, igb and igc. Pulled, thanks Jeff.

Re: [patch net-next v2 6/7] mlxsw: Implement flash update status notifications

2019-05-28 Thread Ido Schimmel
On Tue, May 28, 2019 at 01:48:45PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Implement mlxfw status_notify op by passing notification down to > devlink. Also notify about flash update begin and end. > > Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel

Re: [patch net-next v2 5/7] mlxfw: Introduce status_notify op and call it to notify about the status

2019-05-28 Thread Ido Schimmel
On Tue, May 28, 2019 at 01:48:44PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add new op status_notify which is called to update the user about > flashing status. > > Signed-off-by: Jiri Pirko As I wrote during internal review, I think it is weird to have drivers implement this status_not

Re: [patch net-next v2 4/7] devlink: allow driver to update progress of flash update

2019-05-28 Thread Ido Schimmel
On Tue, May 28, 2019 at 01:48:43PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Introduce a function to be called from drivers during flash. It sends > notification to userspace about flash update progress. > > Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel

Re: [patch net-next v2 3/7] mlxfw: Propagate error messages through extack

2019-05-28 Thread Ido Schimmel
On Tue, May 28, 2019 at 01:48:42PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the error messages are printed to dmesg. Propagate them also > to directly to user doing the flashing through extack. > > Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel

Re: [patch net-next v2 1/7] mlxsw: Move firmware flash implementation to devlink

2019-05-28 Thread Ido Schimmel
On Tue, May 28, 2019 at 01:48:40PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Benefit from the devlink flash update implementation and ethtool > fallback to it and move firmware flash implementation there. > > Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel

[PATCH V4 net-next 0/6] Peer to Peer One-Step time stamping

2019-05-28 Thread Richard Cochran
This series adds support for PTP (IEEE 1588) P2P one-step time stamping along with a driver for a hardware device that supports this. If the hardware supports p2p one-step, it subtracts the ingress time stamp value from the Pdelay_Request correction field. The user space software stack then simpl

[PATCH V4 net-next 1/6] net: Introduce peer to peer one step PTP time stamping.

2019-05-28 Thread Richard Cochran
The 1588 standard defines one step operation for both Sync and PDelay_Resp messages. Up until now, hardware with P2P one step has been rare, and kernel support was lacking. This patch adds support of the mode in anticipation of new hardware developments. Signed-off-by: Richard Cochran --- driv

[PATCH V4 net-next 6/6] ptp: Add a driver for InES time stamping IP core.

2019-05-28 Thread Richard Cochran
The InES at the ZHAW offers a PTP time stamping IP core. The FPGA logic recognizes and time stamps PTP frames on the MII bus. This patch adds a driver for the core along with a device tree binding to allow hooking the driver to MII buses. Signed-off-by: Richard Cochran --- drivers/ptp/Kconfig

[PATCH V4 net-next 5/6] net: mdio: of: Register discovered MII time stampers.

2019-05-28 Thread Richard Cochran
When parsing a PHY node, register its time stamper, if any, and attach the instance to the PHY device. Signed-off-by: Richard Cochran --- drivers/net/phy/phy_device.c | 3 +++ drivers/of/of_mdio.c | 30 +- 2 files changed, 32 insertions(+), 1 deletion(-) dif

[PATCH V4 net-next 4/6] dt-bindings: ptp: Introduce MII time stamping devices.

2019-05-28 Thread Richard Cochran
This patch add a new binding that allows non-PHY MII time stamping devices to find their buses. The new documentation covers both the generic binding and one upcoming user. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn --- Documentation/devicetree/bindings/ptp/ptp-ines.txt | 35 +

[PATCH V4 net-next 2/6] net: Introduce a new MII time stamping interface.

2019-05-28 Thread Richard Cochran
Currently the stack supports time stamping in PHY devices. However, there are newer, non-PHY devices that can snoop an MII bus and provide time stamps. In order to support such devices, this patch introduces a new interface to be used by both PHY and non-PHY devices. In addition, the one and onl

[PATCH V4 net-next 3/6] net: Add a layer for non-PHY MII time stamping drivers.

2019-05-28 Thread Richard Cochran
While PHY time stamping drivers can simply attach their interface directly to the PHY instance, stand alone drivers require support in order to manage their services. Non-PHY MII time stamping drivers have a control interface over another bus like I2C, SPI, UART, or via a memory mapped peripheral.

Re: [PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-28 Thread Herbert Xu
On Wed, May 29, 2019 at 07:43:51AM +0200, Dmitry Vyukov wrote: > > If fqdir->dead read/write are concurrent, then this still needs to be > READ_ONCE/WRITE_ONCE. Ordering is orthogonal to atomicity. No they do not. READ_ONCE/WRITE_ONCE are basically a more fine-tuned version of barrier(). In this

Re: [PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-28 Thread Dmitry Vyukov
On Wed, May 29, 2019 at 7:40 AM Herbert Xu wrote: > > On Tue, May 28, 2019 at 06:31:00AM -0700, Eric Dumazet wrote: > > > > This smp_store_release() is a left over of the first version of the patch, > > where > > there was no rcu grace period enforcement. > > > > I do not believe there is harm le

[PATCH net] r8169: fix MAC address being lost in PCI D3

2019-05-28 Thread Heiner Kallweit
(At least) RTL8168e forgets its MAC address in PCI D3. To fix this set the MAC address when resuming. For resuming from runtime-suspend we had this in place already, for resuming from S3/S5 it was missing. The commit referenced as being fixed isn't wrong, it's just the first one where the patch ap

[PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-28 Thread Herbert Xu
On Tue, May 28, 2019 at 06:31:00AM -0700, Eric Dumazet wrote: > > This smp_store_release() is a left over of the first version of the patch, > where > there was no rcu grace period enforcement. > > I do not believe there is harm letting this, but if you disagree > please send a patch ;) I see no

Re: PROBLEM: [1/2] Marvell 88E8040 (sky2) stopped working

2019-05-28 Thread Petr Štetiar
Octavio Alvarez [2019-05-28 22:59:24]: Hi, > On 5/18/19 8:22 PM, Octavio Alvarez wrote: > > Hi, Petr, > > > > > I'm just shooting out of the blue, as I don't have currently any rational > > > explanation for that now, but could you please change the line above to > > > following: > > > > > >

Re: [PATCH net-next 0/6] net: API and initial implementation for nexthop objects

2019-05-28 Thread David Miller
From: David Ahern Date: Fri, 24 May 2019 14:43:02 -0700 > From: David Ahern > > This set contains the API and initial implementation for nexthops as > standalone objects. > > Patch 1 contains the UAPI and updates to selinux struct. > > Patch 2 contains the barebones code for nexthop commands,

Re: PROBLEM: [1/2] Marvell 88E8040 (sky2) stopped working

2019-05-28 Thread Octavio Alvarez
On 5/18/19 8:22 PM, Octavio Alvarez wrote: Hi, Petr, I'm just shooting out of the blue, as I don't have currently any rational explanation for that now, but could you please change the line above to following: if (!IS_ERR_OR_NULL(iap)) It worked! Thank you for being so quick! Hi

Re: PROBLEM: [2/2] Marvell 88E8040 (sky2) fails after hibernation

2019-05-28 Thread Octavio Alvarez
Hi! On 5/18/19 11:07 AM, Octavio Alvarez wrote: PROBLEM: [2/2] Marvell 88E8040 (sky2) fails after hibernation Hibernating the machine and bringing it back does not properly bring back the Marvell NIC. Most of the time a module reload does not help. Problem starts on the following commit: comm

[net 6/6] net/mlx5e: Disable rxhash when CQE compress is enabled

2019-05-28 Thread Saeed Mahameed
When CQE compression is enabled (Multi-host systems), compressed CQEs might arrive to the driver rx, compressed CQEs don't have a valid hash offload and the driver already reports a hash value of 0 and invalid hash type on the skb for compressed CQEs, but this is not good enough. On a congested PC

[net 5/6] net/mlx5e: restrict the real_dev of vlan device is the same as uplink device

2019-05-28 Thread Saeed Mahameed
From: wenxu When register indr block for vlan device, it should check the real_dev of vlan device is same as uplink device. Or it will set offload rule to mlx5e which will never hit. Fixes: 35a605db168c ("net/mlx5e: Offload TC e-switch rules with ingress VLAN device") Signed-off-by: wenxu Revi

[net 2/6] net/mlx5: Avoid double free of root ns in the error flow path

2019-05-28 Thread Saeed Mahameed
From: Parav Pandit When root ns setup for rdma, sniffer tx and sniffer rx fails, such root ns cleanup is done by the error unwinding path of mlx5_cleanup_fs(). Below call graph shows an example for sniffer_rx_root_ns. mlx5_init_fs() init_sniffer_rx_root_ns() cleanup_root_ns(steering->sniff

[net 1/6] net/mlx5: Fix error handling in mlx5_load()

2019-05-28 Thread Saeed Mahameed
In case mlx5_core_set_hca_defaults fails, it should jump to mlx5_cleanup_fs, fix that. Fixes: c85023e153e3 ("IB/mlx5: Add raw ethernet local loopback support") Signed-off-by: Saeed Mahameed Reviewed-by: Huy Nguyen Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c

[net 3/6] net/mlx5: Avoid double free in fs init error unwinding path

2019-05-28 Thread Saeed Mahameed
From: Parav Pandit In below code flow, for ingress acl table root ns memory leads to double free. mlx5_init_fs init_ingress_acls_root_ns() init_ingress_acl_root_ns kfree(steering->esw_ingress_root_ns); /* steering->esw_ingress_root_ns is not marked NULL */ mlx5_cleanup_fs

[net 4/6] net/mlx5: Allocate root ns memory using kzalloc to match kfree

2019-05-28 Thread Saeed Mahameed
From: Parav Pandit root ns is yet another fs core node which is freed using kfree() by tree_put_node(). Rest of the other fs core objects are also allocated using kmalloc variants. However, root ns memory is allocated using kvzalloc(). Hence allocate root ns memory using kzalloc(). Fixes: 25302

[pull request][net 0/6] Mellanox, mlx5 fixes 2019-05-28

2019-05-28 Thread Saeed Mahameed
Hi Dave, This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.13: ('net/mlx5: Allocate root ns memory using kzalloc to match kfree') For -stable v4.16: ('net/mlx5: Avoid double free in fs init error unwinding path') For -stable v

Re: [RFC PATCH net-next 00/12] Add drop monitor for offloaded data paths

2019-05-28 Thread Florian Fainelli
On 5/28/2019 5:21 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Users have several ways to debug the kernel and understand why a packet > was dropped. For example, using "drop monitor" and "perf". Both > utilities trace kfree_skb(), which is the function called when a packet > is freed as p

[PATCH bpf-next 1/9] libbpf: fix detection of corrupted BPF instructions section

2019-05-28 Thread Andrii Nakryiko
Ensure that size of a section w/ BPF instruction is exactly a multiple of BPF instruction size. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index ca4432f

[PATCH bpf-next 6/9] libbpf: use negative fd to specify missing BTF

2019-05-28 Thread Andrii Nakryiko
0 is a valid FD, so it's better to initialize it to -1, as is done in other places. Also, technically, BTF type ID 0 is valid (it's a VOID type), so it's more reliable to check btf_fd, instead of btf_key_type_id, to determine if there is any BTF associated with a map. Signed-off-by: Andrii Nakryik

[PATCH bpf-next 0/9] libbpf random fixes

2019-05-28 Thread Andrii Nakryiko
This patch set is a collection of unrelated fixes for libbpf. Patch #1 fixes detection of corrupted BPF section w/ instructions. Patch #2 fixes possible errno clobbering. Patch #3 simplifies endianness check and brings it in line with few other similar checks in libbpf. Patch #4 adds check for fai

[PATCH bpf-next 5/9] libbpf: fix error code returned on corrupted ELF

2019-05-28 Thread Andrii Nakryiko
All of libbpf errors are negative, except this one. Fix it. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 7abe71ee507a..9c45856e7fd6 100644 --- a/tools/lib/bpf/li

[PATCH bpf-next 2/9] libbpf: preserve errno before calling into user callback

2019-05-28 Thread Andrii Nakryiko
pr_warning ultimately may call into user-provided callback function, which can clobber errno value, so we need to save it before that. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/to

[PATCH bpf-next 4/9] libbpf: check map name retrieved from ELF

2019-05-28 Thread Andrii Nakryiko
Validate there was no error retrieving symbol name corresponding to a BPF map. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index c98f9942fba4..7abe71ee507a 100644 --- a/tools/li

[PATCH bpf-next 9/9] libbpf: reduce unnecessary line wrapping

2019-05-28 Thread Andrii Nakryiko
There are a bunch of lines of code or comments that are unnecessary wrapped into multi-lines. Fix that without violating any code guidelines. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 52 +- 1 file changed, 16 insertions(+), 36 deletions(

[PATCH bpf-next 3/9] libbpf: simplify endianness check

2019-05-28 Thread Andrii Nakryiko
Rewrite endianness check to use "more canonical" way, using compiler-defined macros, similar to few other places in libbpf. It also is more obvious and shorter. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 37 - 1 file changed, 12 insertions(+),

[PATCH bpf-next 7/9] libbpf: simplify two pieces of logic

2019-05-28 Thread Andrii Nakryiko
Extra check for type is unnecessary in first case. Extra zeroing is unnecessary, as snprintf guarantees that it will zero-terminate string. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/t

[PATCH bpf-next 8/9] libbpf: typo and formatting fixes

2019-05-28 Thread Andrii Nakryiko
A bunch of typo and formatting fixes. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index e3bc00933145..9d9c19a1b2fe 100644 --- a/tools/lib/bpf/libbpf.c

Re: [PATCH net] net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports

2019-05-28 Thread Greg Ungerer
Hi Andrew, On 28/5/19 11:17 pm, Andrew Lunn wrote: My hardware has the CPU port on 9, and it is SGMII. The existing working devicetree setup I used is: port@9 { reg = <9>; label = "cpu";

Re: [PATCH net 2/2] net: dsa: tag_8021q: Create a stable binary format

2019-05-28 Thread Florian Fainelli
On 5/28/2019 3:50 PM, Vladimir Oltean wrote: > Tools like tcpdump need to be able to decode the significance of fake > VLAN headers that DSA uses to separate switch ports. > > But currently these have no global significance - they are simply an > ordered list of DSA_MAX_SWITCHES x DSA_MAX_PORTS

[PATCH v4.14.x] net: erspan: fix use-after-free

2019-05-28 Thread Christoph Paasch
When building the erspan header for either v1 or v2, the eth_hdr() does not point to the right inner packet's eth_hdr, causing kasan report use-after-free and slab-out-of-bouds read. The patch fixes the following syzkaller issues: [1] BUG: KASAN: slab-out-of-bounds in erspan_xmit+0x22d4/0x2430 ne

Re: [PATCH v4.14.x] net: erspan: fix use-after-free

2019-05-28 Thread Greg KH
On Tue, May 28, 2019 at 05:14:21PM -0700, Christoph Paasch wrote: > On 28/05/19 - 17:07:44, Greg KH wrote: > > On Tue, May 28, 2019 at 05:01:13PM -0700, Christoph Paasch wrote: > > > When building the erspan header for either v1 or v2, the eth_hdr() > > > does not point to the right inner packet's

Re: [PATCH bpf-next v3 2/3] libbpf: add bpf_object__load_xattr() API function to pass log_level

2019-05-28 Thread Alexei Starovoitov
On Fri, May 24, 2019 at 3:36 AM Quentin Monnet wrote: > > libbpf was recently made aware of the log_level attribute for programs, > used to specify the level of information expected to be dumped by the > verifier. Function bpf_prog_load_xattr() got support for this log_level > parameter. > > But s

Re: [PATCH net] llc: fix skb leak in llc_build_and_send_ui_pkt()

2019-05-28 Thread David Miller
From: Eric Dumazet Date: Mon, 27 May 2019 17:35:52 -0700 > If llc_mac_hdr_init() returns an error, we must drop the skb > since no llc_build_and_send_ui_pkt() caller will take care of this. ... > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Eric Dumazet > Reported-by: syzbot Appl

Re: [PATCH net-next 0/3] inet: frags: followup to 'inet-frags-avoid-possible-races-at-netns-dismantle'

2019-05-28 Thread David Miller
From: Eric Dumazet Date: Mon, 27 May 2019 16:56:46 -0700 > Latest patch series ('inet-frags-avoid-possible-races-at-netns-dismantle') > brought another syzbot report shown in the third patch changelog. > > While fixing the issue, I had to call inet_frags_fini() later > in IPv6 and ilowpan. > >

Re: [PATCH net-next] selftests/net: ipv6 flowlabel

2019-05-28 Thread David Miller
From: Willem de Bruijn Date: Mon, 27 May 2019 16:47:51 -0400 > From: Willem de Bruijn > > Test the IPv6 flowlabel control and datapath interfaces: > > Acquire and release the right to use flowlabels with socket option > IPV6_FLOWLABEL_MGR. > > Then configure flowlabels on send and read them o

[net-next 09/10] igc: Add flow control support

2019-05-28 Thread Jeff Kirsher
From: Sasha Neftin This change adds flow control settings. This is required to enable the legacy flow control support. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 3 +++ drivers/net/ethernet/intel/igc/igc_

[net-next 00/10][pull request] 1GbE Intel Wired LAN Driver Updates 2019-05-28

2019-05-28 Thread Jeff Kirsher
This series contains updates to e1000e, igb and igc. Feng adds additional information on a warning message when a read of a hardware register fails. Gustavo A. R. Silva fixes up two "fall through" code comments so that the checkers can actually determine that we did comment that the case statemen

[net-next 01/10] igb/igc: warn when fatal read failure happens

2019-05-28 Thread Jeff Kirsher
From: Feng Tang Failed in read the HW register is very serious for igb/igc driver, as its hw_addr will be set to NULL and cause the adapter be seen as "REMOVED". We saw the error only a few times in the MTBF test for suspend/resume, but can hardly get any useful info to debug. Adding WARN() so

[net-next 05/10] igc: Clean up unused pointers

2019-05-28 Thread Jeff Kirsher
From: Sasha Neftin Few function pointers from phy_operations structure were unused. This patch cleans those. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_hw.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/driver

[net-next 02/10] igb: mark expected switch fall-through

2019-05-28 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/igb/igb_main.c: In function ‘__igb_notify_dca’: drivers/net/ethernet/intel/igb/igb_main.c:6

[net-next 06/10] igc: Remove the obsolete workaround

2019-05-28 Thread Jeff Kirsher
From: Sasha Neftin Enables a resend request after the completion timeout workaround is not relevant for i225 device. This patch is clean code relevant this workaround. Minor cosmetic fixes, replace the 'spaces' with 'tabs' Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff

[net-next 04/10] igc: Fix double definitions

2019-05-28 Thread Jeff Kirsher
From: Sasha Neftin Collision threshold and threshold's shift has been defined twice. This patch comes to fix that. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 3 --- 1 file changed, 3 deletions(-) diff --g

[net-next 03/10] igb: mark expected switch fall-through

2019-05-28 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/igb/e1000_82575.c: In function ‘igb_get_invariants_82575’: drivers/net/ethernet/intel/igb/

[net-next 08/10] e1000e: start network tx queue only when link is up

2019-05-28 Thread Jeff Kirsher
From: Konstantin Khlebnikov Driver does not want to keep packets in Tx queue when link is lost. But present code only reset NIC to flush them, but does not prevent queuing new packets. Moreover reset sequence itself could generate new packets via netconsole and NIC falls into endless reset loop.

[net-next 10/10] igc: Cleanup the redundant code

2019-05-28 Thread Jeff Kirsher
From: Sasha Neftin The default flow control settings for the i225 device is both 'rx' and 'tx' pause frames. There is no depend on the NVM value. This patch comes to fix this and clean up the driver code. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- driv

[net-next 07/10] Revert "e1000e: fix cyclic resets at link up with active tx"

2019-05-28 Thread Jeff Kirsher
From: Konstantin Khlebnikov This reverts commit 0f9e980bf5ee1a97e2e401c846b2af989eb21c61. That change cased false-positive warning about hardware hang: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready e1000e :00:1

Re: [PATCH net] selftests: pmtu: Fix encapsulating device in pmtu_vti6_link_change_mtu

2019-05-28 Thread David Miller
From: Stefano Brivio Date: Mon, 27 May 2019 19:42:23 +0200 > In the pmtu_vti6_link_change_mtu test, both local and remote addresses > for the vti6 tunnel are assigned to the same address given to the dummy > interface that we use as encapsulating device with a known MTU. > > This works as long a

Re: [PATCH v4.14.x] net: erspan: fix use-after-free

2019-05-28 Thread Christoph Paasch
On 28/05/19 - 17:07:44, Greg KH wrote: > On Tue, May 28, 2019 at 05:01:13PM -0700, Christoph Paasch wrote: > > When building the erspan header for either v1 or v2, the eth_hdr() > > does not point to the right inner packet's eth_hdr, > > causing kasan report use-after-free and slab-out-of-bouds rea

Re: [PATCH net-next] enetc: Enable TC offloading with mqprio

2019-05-28 Thread David Miller
From: Claudiu Manoil Date: Mon, 27 May 2019 18:21:31 +0300 > From: Camelia Groza > > Add support to configure multiple prioritized TX traffic > classes with mqprio. > > Configure one BD ring per TC for the moment, one netdev > queue per TC. > > Signed-off-by: Camelia Groza > Signed-off-by: C

Re: [PATCH v4.14.x] net: erspan: fix use-after-free

2019-05-28 Thread Greg KH
On Tue, May 28, 2019 at 05:01:13PM -0700, Christoph Paasch wrote: > When building the erspan header for either v1 or v2, the eth_hdr() > does not point to the right inner packet's eth_hdr, > causing kasan report use-after-free and slab-out-of-bouds read. > > The patch fixes the following syzkaller

[PATCH v4 bpf-next 3/6] bpf: Update __cgroup_bpf_run_filter_skb with cn

2019-05-28 Thread brakmo
For egress packets, __cgroup_bpf_fun_filter_skb() will now call BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() instead of PROG_CGROUP_RUN_ARRAY() in order to propagate congestion notifications (cn) requests to TCP callers. For egress packets, this function can return: NET_XMIT_SUCCESS(0)- cont

[PATCH v4 bpf-next 6/6] bpf: Add more stats to HBM

2019-05-28 Thread brakmo
Adds more stats to HBM, including average cwnd and rtt of all TCP flows, percents of packets that are ecn ce marked and distribution of return values. Signed-off-by: Lawrence Brakmo --- samples/bpf/hbm.c | 33 +++ samples/bpf/hbm.h | 6 samples/bpf/hbm_ker

[PATCH v4 bpf-next 4/6] bpf: Update BPF_CGROUP_RUN_PROG_INET_EGRESS calls

2019-05-28 Thread brakmo
Update BPF_CGROUP_RUN_PROG_INET_EGRESS() callers to support returning congestion notifications from the BPF programs. Signed-off-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov --- net/ipv4/ip_output.c | 34 +++--- net/ipv6/ip6_output.c | 26 +-

[PATCH v4 bpf-next 5/6] bpf: Add cn support to hbm_out_kern.c

2019-05-28 Thread brakmo
Update hbm_out_kern.c to support returning cn notifications. Also updates relevant files to allow disabling cn notifications. Signed-off-by: Lawrence Brakmo --- samples/bpf/do_hbm_test.sh | 10 +++--- samples/bpf/hbm.c | 18 +++--- samples/bpf/hbm.h | 3 ++- sa

[PATCH v4 bpf-next 2/6] bpf: cgroup inet skb programs can return 0 to 3

2019-05-28 Thread brakmo
Allows cgroup inet skb programs to return values in the range [0, 3]. The second bit is used to deterine if congestion occurred and higher level protocol should decrease rate. E.g. TCP would call tcp_enter_cwr() The bpf_prog must set expected_attach_type to BPF_CGROUP_INET_EGRESS at load time if i

[PATCH v4 bpf-next 0/6] bpf: Propagate cn to TCP

2019-05-28 Thread brakmo
This patchset adds support for propagating congestion notifications (cn) to TCP from cgroup inet skb egress BPF programs. Current cgroup skb BPF programs cannot trigger TCP congestion window reductions, even when they drop a packet. This patch-set adds support for cgroup skb BPF programs to send c

[PATCH v4 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread brakmo
Create new macro BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() to be used by __cgroup_bpf_run_filter_skb for EGRESS BPF progs so BPF programs can request cwr for TCP packets. Current cgroup skb programs can only return 0 or 1 (0 to drop the packet. This macro changes the behavior so the low order bit in

Urgent!!!

2019-05-28 Thread Ms Karen~CIO/GMD
Hello Just a quick remindal, did you get the proposal i sent to you on the 24th of this month ? Kindly Reply Regional Group Manager Mrs Karen Ngui

[PATCH net-next] ipv6: Send ICMP errors for exceeding extension header limits

2019-05-28 Thread Tom Herbert
Define constants and add support to send ICMPv6 Parameter Problem errors as defined in draft-ietf-6man-icmp-limits-02. ICMPV6_TOOBIG_OPTION is sent if a packet exceeding the padding limit is received (more than seven consecutive bytes of padding), ICMPV6_TOOMANY_OPTIONS is sent if a packet is rece

Re: [PATCH net 1/2] net: dsa: tag_8021q: Change order of rx_vid setup

2019-05-28 Thread Florian Fainelli
On 5/28/19 3:50 PM, Vladimir Oltean wrote: > From: Ioana Ciornei > > The 802.1Q tagging performs an unbalanced setup in terms of RX VIDs on > the CPU port. For the ingress path of a 802.1Q switch to work, the RX > VID of a port needs to be seen as tagged egress on the CPU port. > > While configu

Re: [PATCH] netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression

2019-05-28 Thread Greg KH
On Tue, May 28, 2019 at 03:57:37PM +0200, Nicolas Dichtel wrote: > Le 24/05/2019 à 11:22, Pablo Neira Ayuso a écrit : > > On Mon, May 20, 2019 at 10:35:07AM +0200, Nicolas Dichtel wrote: > >> Le 06/05/2019 à 15:16, Pablo Neira Ayuso a écrit : > >>> On Mon, May 06, 2019 at 10:49:52AM +0200, Nicolas

[PATCH net 1/2] net: dsa: tag_8021q: Change order of rx_vid setup

2019-05-28 Thread Vladimir Oltean
From: Ioana Ciornei The 802.1Q tagging performs an unbalanced setup in terms of RX VIDs on the CPU port. For the ingress path of a 802.1Q switch to work, the RX VID of a port needs to be seen as tagged egress on the CPU port. While configuring the other front-panel ports to be part of this VID,

[PATCH net 2/2] net: dsa: tag_8021q: Create a stable binary format

2019-05-28 Thread Vladimir Oltean
Tools like tcpdump need to be able to decode the significance of fake VLAN headers that DSA uses to separate switch ports. But currently these have no global significance - they are simply an ordered list of DSA_MAX_SWITCHES x DSA_MAX_PORTS numbers ending at 4095. The reason why this is submitted

[PATCH net 0/2] Fixes for DSA tagging using 802.1Q

2019-05-28 Thread Vladimir Oltean
During the prototyping for the "Decoupling PHYLINK from struct net_device" patchset, the CPU port of the sja1105 driver was moved to a different spot. This uncovered an issue in the tag_8021q DSA code, which used to work by mistake - the CPU port was the last hardware port numerically, and this wa

Re: [PATCH net-next v1 3/7] taprio: Add the skeleton to enable hardware offloading

2019-05-28 Thread Jakub Kicinski
On Tue, 28 May 2019 10:46:44 -0700, Vedang Patel wrote: > From: Vinicius Costa Gomes > > This adds the UAPI and the core bits necessary for userspace to > request hardware offloading to be enabled. > > The future commits will enable hybrid or full offloading for taprio. This > commit sets up the

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-05-28 Thread Cong Wang
On Tue, May 28, 2019 at 10:05 AM Kevin 'ldir' Darbyshire-Bryant wrote: > > ctinfo is a new tc filter action module. It is designed to restore > information contained in firewall conntrack marks to other packet fields > and is typically used on packet ingress paths. At present it has two > indepe

Re: [PATCH bpf-next v4 3/4] bpf: cgroup: properly use bpf_prog_array api

2019-05-28 Thread Roman Gushchin
On Tue, May 28, 2019 at 02:14:43PM -0700, Stanislav Fomichev wrote: > Now that we don't have __rcu markers on the bpf_prog_array helpers, > let's use proper rcu_dereference_protected to obtain array pointer > under mutex. > > We also don't need __rcu annotations on cgroup_bpf.inactive since > it's

Re: [PATCH net] net/sched: act_pedit: fix 'ex munge' on network header in case of QinQ packet

2019-05-28 Thread Davide Caratti
hi Eric, thanks for looking at this! On Tue, 2019-05-28 at 14:02 -0700, Eric Dumazet wrote: > > On 5/28/19 1:50 PM, Davide Caratti wrote: > > + vlan = (struct vlan_hdr *)skb->data; > > + protocol = vlan->h_vlan_encapsulated_proto; > > +

Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Lawrence Brakmo
On 5/28/19, 1:43 PM, "Eric Dumazet" wrote: On 5/28/19 11:54 AM, Lawrence Brakmo wrote: > On 5/28/19, 6:43 AM, "netdev-ow...@vger.kernel.org on behalf of Eric Dumazet" wrote: > > Why are you using preempt_enable_no_resched() here ? > > Because that is

[PATCH bpf-next v4 1/4] bpf: remove __rcu annotations from bpf_prog_array

2019-05-28 Thread Stanislav Fomichev
Drop __rcu annotations and rcu read sections from bpf_prog_array helper functions. They are not needed since all existing callers call those helpers from the rcu update side while holding a mutex. This guarantees that use-after-free could not happen. In the next patches I'll fix the callers with m

[PATCH bpf-next v4 3/4] bpf: cgroup: properly use bpf_prog_array api

2019-05-28 Thread Stanislav Fomichev
Now that we don't have __rcu markers on the bpf_prog_array helpers, let's use proper rcu_dereference_protected to obtain array pointer under mutex. We also don't need __rcu annotations on cgroup_bpf.inactive since it's not read/updated concurrently. v4: * drop cgroup_rcu_xyz wrappers and use rcu

[PATCH bpf-next v4 4/4] bpf: tracing: properly use bpf_prog_array api

2019-05-28 Thread Stanislav Fomichev
Now that we don't have __rcu markers on the bpf_prog_array helpers, let's use proper rcu_dereference_protected to obtain array pointer under mutex. Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Stanislav Fomichev --- kernel/trace/bpf_trace.c | 18 ++ 1 file changed, 10 inse

Re: [RFC][PATCH kernel_bpf] honor CAP_NET_ADMIN for BPF_PROG_LOAD

2019-05-28 Thread Song Liu
On Tue, May 28, 2019 at 9:59 AM Andreas Steinmetz wrote: > > [sorry for crossposting but this affects both lists] > > BPF_PROG_TYPE_SCHED_CLS and BPF_PROG_TYPE_XDP should be allowed > for CAP_NET_ADMIN capability. Nearly everything one can do with > these program types can be done some other way w

Re: [PATCH net] net/sched: act_pedit: fix 'ex munge' on network header in case of QinQ packet

2019-05-28 Thread Eric Dumazet
On 5/28/19 1:50 PM, Davide Caratti wrote: > Like it has been done in commit 2ecba2d1e45b ("net: sched: act_csum: Fix > csum calc for tagged packets"), also 'pedit' needs to adjust the network > offset when multiple tags are present in the packets: otherwise wrong IP > headers (but good checksums

Re: [PATCH bpf-next v3 3/4] bpf: cgroup: properly use bpf_prog_array api

2019-05-28 Thread Roman Gushchin
On Tue, May 28, 2019 at 01:16:46PM -0700, Stanislav Fomichev wrote: > On 05/28, Roman Gushchin wrote: > > On Tue, May 28, 2019 at 11:29:45AM -0700, Stanislav Fomichev wrote: > > > Now that we don't have __rcu markers on the bpf_prog_array helpers, > > > let's use proper rcu_dereference_protected to

[PATCH net] net/sched: act_pedit: fix 'ex munge' on network header in case of QinQ packet

2019-05-28 Thread Davide Caratti
Like it has been done in commit 2ecba2d1e45b ("net: sched: act_csum: Fix csum calc for tagged packets"), also 'pedit' needs to adjust the network offset when multiple tags are present in the packets: otherwise wrong IP headers (but good checksums) can be observed with the following command: # tc

Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Eric Dumazet
On 5/28/19 11:54 AM, Lawrence Brakmo wrote: > On 5/28/19, 6:43 AM, "netdev-ow...@vger.kernel.org on behalf of Eric Dumazet" > wrote: > > Why are you using preempt_enable_no_resched() here ? > > Because that is what __BPF_PROG_RUN_ARRAY() calls and the macro > BPF_PROG_CGROUP_INET_EGRESS

Re: [PATCH bpf-next v3 3/4] bpf: cgroup: properly use bpf_prog_array api

2019-05-28 Thread Stanislav Fomichev
On 05/28, Roman Gushchin wrote: > On Tue, May 28, 2019 at 11:29:45AM -0700, Stanislav Fomichev wrote: > > Now that we don't have __rcu markers on the bpf_prog_array helpers, > > let's use proper rcu_dereference_protected to obtain array pointer > > under mutex. > > > > We also don't need __rcu ann

Re: [PATCH net-next 2/3] net: phy: add callback for custom interrupt handler to struct phy_driver

2019-05-28 Thread Heiner Kallweit
On 28.05.2019 21:37, Florian Fainelli wrote: > On 5/27/19 12:36 PM, Heiner Kallweit wrote: >> On 27.05.2019 21:25, Florian Fainelli wrote: >>> >>> >>> On 5/27/2019 11:28 AM, Heiner Kallweit wrote: The phylib interrupt handler handles link change events only currently. However PHY drivers

[PATCH] net: mvpp2: setup link irqs for ports with in-band-status phylink

2019-05-28 Thread Yanko Kaneti
Hello This might be misguided but it seems to fix link status on my mcbin- singleshot SFP+ ports -Yanko -- >8 -- MACCHIATObin Single-shot uses the direct-to-MAC SFP+ ports setup which phylink supports in in-band-status mode. Don't assume phylink means external phy and connect the link irqs. Si

Re: [patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-28 Thread Jakub Kicinski
On Tue, 28 May 2019 13:48:46 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Signed-off-by: Jiri Pirko > --- > v1->v2: > - added debugfs toggle to enable/disable flash status notifications Could you please add a selftest making use of netdevsim code? Sorry, I must have liked the feature so muc

Re: [patch net-next v2 4/7] devlink: allow driver to update progress of flash update

2019-05-28 Thread Jakub Kicinski
On Tue, 28 May 2019 13:48:43 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Introduce a function to be called from drivers during flash. It sends > notification to userspace about flash update progress. > > Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski

Re: [PATCH bpf-next v3 3/4] bpf: cgroup: properly use bpf_prog_array api

2019-05-28 Thread Roman Gushchin
On Tue, May 28, 2019 at 11:29:45AM -0700, Stanislav Fomichev wrote: > Now that we don't have __rcu markers on the bpf_prog_array helpers, > let's use proper rcu_dereference_protected to obtain array pointer > under mutex. > > We also don't need __rcu annotations on cgroup_bpf.inactive since > it's

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-05-28 Thread Toke Høiland-Jørgensen
Kevin 'ldir' Darbyshire-Bryant writes: >> On 28 May 2019, at 19:08, Toke Høiland-Jørgensen wrote: >> > >> >> Thank you for doing another iteration! >> >> No further comments on the actual code, but I still get the whitespace >> issue with the patch... And now it results in stray ^M character

Re: [PATCH net-next 2/3] net: phy: add callback for custom interrupt handler to struct phy_driver

2019-05-28 Thread Florian Fainelli
On 5/27/19 12:36 PM, Heiner Kallweit wrote: > On 27.05.2019 21:25, Florian Fainelli wrote: >> >> >> On 5/27/2019 11:28 AM, Heiner Kallweit wrote: >>> The phylib interrupt handler handles link change events only currently. >>> However PHY drivers may want to use other interrupt sources too, >>> e.g.

Re: [PATCH] tc: flower: fix port value truncation

2019-05-28 Thread Stephen Hemminger
On Mon, 27 May 2019 23:03:49 +0200 Lukasz Czapnik wrote: > sscanf truncates read port values silently without any error. As sscanf > man says: > (...) sscanf() conform to C89 and C99 and POSIX.1-2001. These standards > do not specify the ERANGE error. > > Replace sscanf with safer get_be16 that

Re: [PATCH iproute2] lib: suppress error msg when filling the cache

2019-05-28 Thread Stephen Hemminger
On Fri, 24 May 2019 10:08:28 -0600 David Ahern wrote: > On 5/24/19 2:59 AM, Nicolas Dichtel wrote: > > Before the patch: > > $ ip netns add foo > > $ ip link add name veth1 address 2a:a5:5c:b9:52:89 type veth peer name > > veth2 address 2a:a5:5c:b9:53:90 netns foo > > RTNETLINK answers: No such

Re: [PATCH bpf-next v3 3/4] bpf: cgroup: properly use bpf_prog_array api

2019-05-28 Thread Roman Gushchin
On Tue, May 28, 2019 at 11:29:45AM -0700, Stanislav Fomichev wrote: > Now that we don't have __rcu markers on the bpf_prog_array helpers, > let's use proper rcu_dereference_protected to obtain array pointer > under mutex. > > We also don't need __rcu annotations on cgroup_bpf.inactive since > it's

  1   2   3   >