Re: [PATCH net-next 6/8] devlink: introduce port's peer netdevs

2019-02-28 Thread Jiri Pirko
Thu, Feb 28, 2019 at 05:36:44PM CET, jakub.kicin...@netronome.com wrote: >On Thu, 28 Feb 2019 10:00:54 +0100, Jiri Pirko wrote: >> Wed, Feb 27, 2019 at 07:47:42PM CET, jakub.kicin...@netronome.com wrote: >> >On Wed, 27 Feb 2019 14:08:29 +0100, Jiri Pirko wrote: >> >> Tue, Feb 26, 2019 at 07:24:34

Re: [PATCH net-next 4/8] devlink: allow subports on devlink PCI ports

2019-02-28 Thread Jiri Pirko
Thu, Feb 28, 2019 at 05:24:04PM CET, jakub.kicin...@netronome.com wrote: >On Thu, 28 Feb 2019 09:56:24 +0100, Jiri Pirko wrote: >> Wed, Feb 27, 2019 at 07:30:00PM CET, jakub.kicin...@netronome.com wrote: >> >On Wed, 27 Feb 2019 13:37:53 +0100, Jiri Pirko wrote: >> >> Tue, Feb 26, 2019 at 07:24:32

Re: [PATCH net-next v4 1/6] net: devlink: turn devlink into a built-in

2019-02-28 Thread Jiri Pirko
Thu, Feb 28, 2019 at 05:02:56PM CET, jakub.kicin...@netronome.com wrote: >On Thu, 28 Feb 2019 16:01:25 +0100, Jiri Pirko wrote: >> Tue, Feb 26, 2019 at 04:34:02AM CET, jakub.kicin...@netronome.com wrote: >> >diff --git a/net/Kconfig b/net/Kconfig >> >index 62da6148e9f8..1efe1f9ee492 100644 >> >---

Re: [RFC net-next 8/8] net/mlx5: Add subdev driver to bind to subdev devices

2019-02-28 Thread Greg KH
On Thu, Feb 28, 2019 at 11:37:52PM -0600, Parav Pandit wrote: > Add a subdev driver to probe the subdev devices and create fake > netdevice for it. So I'm guessing here is the "meat" of the whole goal here? You just want multiple netdevices per PCI device? Why can't you do that today in your PCI

Re: [RFC net-next 7/8] net/mlx5: Add devlink subdev life cycle command support

2019-02-28 Thread Greg KH
On Thu, Feb 28, 2019 at 11:37:51PM -0600, Parav Pandit wrote: > --- /dev/null > +++ b/drivers/net/ethernet/mellanox/mlx5/core/subdev.c > @@ -0,0 +1,55 @@ > +// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB For new stuff, just use GPL-2.0, no need to keep the mistake of the Linux-OpenIB license

Re: [RFC net-next 1/8] subdev: Introducing subdev bus

2019-02-28 Thread Greg KH
On Thu, Feb 28, 2019 at 11:37:45PM -0600, Parav Pandit wrote: > Introduce a new subdev bus which holds sub devices created from a > primary device. These devices are named as 'subdev'. > A subdev is identified similarly to pci device using 16-bit vendor id > and device id. > Unlike PCI devices, sco

[PATCH bpf-next 1/2] bpf: Fix bpf_tcp_sock and bpf_sk_fullsock issue related to bpf_sk_release

2019-02-28 Thread Martin KaFai Lau
Lorenz Bauer [thanks!] reported that a ptr returned by bpf_tcp_sock(sk) can still be accessed after bpf_sk_release(sk). Both bpf_tcp_sock() and bpf_sk_fullsock() have the same issue. This patch addresses them together. A simple reproducer looks like this: sk = bpf_sk_lookup_tcp(); /* if (!sk) ...

[PATCH bpf-next 0/2] Fix bpf_tcp_sock and bpf_sk_fullsock issue related to bpf_sk_release

2019-02-28 Thread Martin KaFai Lau
This set addresses issue about accessing invalid ptr returned from bpf_tcp_sock() and bpf_sk_fullsock() after bpf_sk_release(). Martin KaFai Lau (2): bpf: Fix bpf_tcp_sock and bpf_sk_fullsock issue related to bpf_sk_release bpf: Test ref release issue in bpf_tcp_sock and bpf_sk_fullsock.

[PATCH bpf-next 2/2] bpf: Test ref release issue in bpf_tcp_sock and bpf_sk_fullsock

2019-02-28 Thread Martin KaFai Lau
Adding verifier tests to ensure the ptr returned from bpf_tcp_sock() and bpf_sk_fullsock() cannot be accessed after bpf_sk_release() is called. It is derived from a reproducer test from Lorenz Bauer. Cc: Lorenz Bauer Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/verifier/ref_tracking.c

Re: [PATCH bpf-next v2 5/7] bpf, libbpf: support global data/bss/rodata sections

2019-02-28 Thread Andrii Nakryiko
On Thu, Feb 28, 2019 at 3:31 PM Daniel Borkmann wrote: > > This work adds BPF loader support for global data sections > to libbpf. This allows to write BPF programs in more natural > C-like way by being able to define global variables and const > data. > > Back at LPC 2018 [0] we presented a first

Re: [PATCH bpf-next 0/4] Formatting and typo fixes in kernel/bpf

2019-02-28 Thread Song Liu
On Thu, Feb 28, 2019 at 6:08 PM Andrii Nakryiko wrote: > > Few formatting fixes, as well as some comments clean up. For the series: Acked-by: Song Liu > > Andrii Nakryiko (4): > bpf: formatting fixes in syscall.c > bpf/verifier: fix code formatting > bpf/verifier: typo fixes and reflow v

Re: [PATCH v2 bpf-next 0/3] bpf docs typo, wording and formatting fixes

2019-02-28 Thread Song Liu
On Thu, Feb 28, 2019 at 6:02 PM Andrii Nakryiko wrote: > > A bunch of BPF-related docs typo, wording and formatting fixes. > > v1->v2: > - split off non-documentation changes into separate patchset For the series: Acked-by: Song Liu > > Andrii Nakryiko (3): > docs/btf: fix typos, improve wor

Re: [PATCH bpf-next v2 0/7] selftests: bpf: break up test_progs

2019-02-28 Thread Song Liu
On Thu, Feb 28, 2019 at 5:38 PM Stanislav Fomichev wrote: > > Recently we had linux-next bpf/bpf-next conflict when we added new > functionality to the test_progs.c at the same location. Let's split > test_progs.c the same way we recently split test_verifier.c. > > I follow the same patten we did

Re: [Linuxptp-devel] strangeness

2019-02-28 Thread Harini Katakam
+netdev Hi Paul, On Fri, Mar 1, 2019 at 12:29 AM Richard Cochran wrote: > > On Thu, Feb 28, 2019 at 12:33:26PM -0500, Paul Thomas wrote: > > Yes changing it to TSTAMP_ALL_PTP_FRAMES instead of TSTAMP_ALL_FRAMES > > does seem to fix the ssh issue. My worry is that there is still a bug > > somewher

[PATCH bpf-next] samples/bpf: silence compiler warning for xdpsock_user.c

2019-02-28 Thread Yonghong Song
Compiling xdpsock_user.c with 4.8.5, I hit the following compilation warning: HOSTCC samples/bpf/xdpsock_user.o /data/users/yhs/work/net-next/samples/bpf/xdpsock_user.c: In function ‘main’: /data/users/yhs/work/net-next/samples/bpf/xdpsock_user.c:449:6: warning: ‘idx_cq’ may be used unini

[PATCH bpf-next] selftests/bpf: set unlimited RLIMIT_MEMLOCK for test_sock_fields

2019-02-28 Thread Yonghong Song
This is to avoid permission denied error. A lot of systems may have a much lower number, e.g., 64KB, for RLIMIT_MEMLOCK, which may not be sufficient for the test to run successfully. Fixes: e0b27b3f97b8 ("bpf: Add test_sock_fields for skb->sk and bpf_tcp_sock") Signed-off-by: Yonghong Song --- t

Re: [PATCH net-next] net: dsa: Do not configure VLAN ID 0

2019-02-28 Thread Heiner Kallweit
On 01.03.2019 00:49, Florian Fainelli wrote: > Because we skip the prepare phase, we would not get a chance to have the > port_vlan_prepare() callback return -EOPNOTSUPP and tell us about that. > This causes problems with mv88e6xxx which specifically checks for VLAN > ID = 0. Turns out we do not ac

[PATCH] netfilter: nf_ct_helper: Fix possible panic when nf_conntrack_helper_unregister is used in an unloadable module

2019-02-28 Thread Su Yanjun
From: Su Yanjun Because nf_conntrack_helper_unregister maybe used in an unloadable module, it uses 'synchronize_rcu' which may cause kernel panic. According to the artical: RCU and Unloadable Modules https://lwn.net/Articles/217484/ When we have a heavy rcu callback load, then some of the callb

Re: [PATCH bpf-next v2 3/7] bpf, obj: allow . char as part of the name

2019-02-28 Thread Andrii Nakryiko
On Thu, Feb 28, 2019 at 3:31 PM Daniel Borkmann wrote: > > Trivial addition to allow '.' aside from '_' as "special" characters > in the object name. Used to name maps from loader side as ".bss", > ".data", ".rodata". > > Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko > --- > kernel

Re: [PATCH bpf-next v2 1/7] bpf: implement lookup-free direct value access

2019-02-28 Thread Andrii Nakryiko
On Thu, Feb 28, 2019 at 3:31 PM Daniel Borkmann wrote: > > This generic extension to BPF maps allows for directly loading an > address residing inside a BPF map value as a single BPF ldimm64 > instruction. This is great! I'm going to review code more thoroughly tomorrow, but I also have few quest

RE: [PATCH net-next 0/8] Introducing subdev bus and devlink extension

2019-02-28 Thread Parav Pandit
> -Original Message- > From: Parav Pandit > Sent: Thursday, February 28, 2019 11:36 PM > To: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; > michal.l...@markovi.net; da...@davemloft.net; > gre...@linuxfoundation.org; Jiri Pirko > Cc: Parav Pandit > Subject: [PATCH net-next 0/8

[RFC net-next 2/8] subdev: Introduce pm callbacks

2019-02-28 Thread Parav Pandit
Keep power management callbacks in place to optionally notify drivers who register them. Signed-off-by: Parav Pandit --- drivers/subdev/subdev_main.c | 59 1 file changed, 59 insertions(+) diff --git a/drivers/subdev/subdev_main.c b/drivers/subdev/su

[RFC net-next 3/8] modpost: Add support for subdev device id table

2019-02-28 Thread Parav Pandit
Add support to parse subdev module device id table. Signed-off-by: Parav Pandit --- scripts/mod/devicetable-offsets.c | 4 scripts/mod/file2alias.c | 15 +++ 2 files changed, 19 insertions(+) diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-of

[RFC net-next 5/8] devlink: Add variant of devlink_register/unregister

2019-02-28 Thread Parav Pandit
Add variants of devlink_register and devlink_unregister which doesn't explicitly acquire/release devlink_mutex lock, but requires that caller hold the devlink_mutex lock. This is required to create child devlink devices while working on parent devlink device. Change-Id: I74417158144b28ff51ecfb2d1

[RFC net-next 8/8] net/mlx5: Add subdev driver to bind to subdev devices

2019-02-28 Thread Parav Pandit
Add a subdev driver to probe the subdev devices and create fake netdevice for it. Signed-off-by: Parav Pandit --- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h| 3 + ...

[RFC net-next 7/8] net/mlx5: Add devlink subdev life cycle command support

2019-02-28 Thread Parav Pandit
Implement devlink device add/del command which cretes dummy subdev devices that actual driver can bind to using standard device driver model. Signed-off-by: Parav Pandit --- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 1 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++ ...

[RFC net-next 1/8] subdev: Introducing subdev bus

2019-02-28 Thread Parav Pandit
Introduce a new subdev bus which holds sub devices created from a primary device. These devices are named as 'subdev'. A subdev is identified similarly to pci device using 16-bit vendor id and device id. Unlike PCI devices, scope of subdev is limited to Linux kernel. A central entry that assigns un

[RFC net-next 6/8] devlink: Add support for devlink subdev lifecycle

2019-02-28 Thread Parav Pandit
Add support for creating and deleting devlink subdevices. For every subdev created on subdev bus, has corresponding devlink device. This devlink device serves the control point for any internal device configuration which is usually required before setting up the protocol specific devices such as ne

[RFC net-next 4/8] devlink: Introduce and use devlink_init/cleanup() in alloc/free

2019-02-28 Thread Parav Pandit
There is usecase to allocate devlink instance along with other structure instance. This is case when struct devlink and struct device are desired to be part of single structure instance whose life cycle is driven by the life cycle of the core device. To support it, have more grandular init/cleanup

[RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-02-28 Thread Parav Pandit
Use case: - A user wants to create/delete hardware linked sub devices without using SR-IOV. These devices for a pci device can be netdev (optional rdma device) or other devices. Such sub devices share some of the PCI device resources and also have their own dedicated resources. Few example

[PATCH net-next 0/8] Introducing subdev bus and devlink extension

2019-02-28 Thread Parav Pandit
Use case: - A user wants to create/delete hardware linked sub devices without using SR-IOV. These devices for a pci device can be netdev (optional rdma device) or other devices. Such sub devices share some of the PCI device resources and also have their own dedicated resources. Few example

[net-next 06/12] i40e: Update i40e_init_dcb to return correct error

2019-02-28 Thread Jeff Kirsher
From: Chinh T Cao Modify the i40e_init_dcb to return the correct error when LLDP or DCBX is not in operational state. Signed-off-by: Chinh T Cao Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_dcb.c | 28 - drivers/net/ethern

[net-next 10/12] i40e: Report advertised link modes on 40GBASE_SR4

2019-02-28 Thread Jeff Kirsher
From: Adam Ludkiewicz Defined the advertised link mode field for 4baseSR4_Full for use with ethtool. Signed-off-by: Adam Ludkiewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 7 ++- 1 file changed, 6 insertions(+), 1 dele

[net-next 05/12] i40e: Fix for 10G ports LED not blinking

2019-02-28 Thread Jeff Kirsher
From: Piotr Marczak On some hardware LEDs would not blink after command 'ethtool -p {eth-port}' in certain circumstances. Now, function does not care about the activity of the LED (though still preserves its state) but forcibly executes identification blinking and then restores the LED state. Si

[net-next 04/12] i40e: save PTP time before a device reset

2019-02-28 Thread Jeff Kirsher
From: Jacob Keller In the case where PTP is running on the hardware clock, but the kernel system time is not being synced, a device reset can mess up the clock time. This occurs because we reset the clock time based on the kernel time every reset. This causes us to potentially completely reset t

[net-next 01/12] i40e: Queues are reserved despite "Invalid argument" error

2019-02-28 Thread Jeff Kirsher
From: Adam Ludkiewicz Added a new local variable in the i40e_setup_tc function named old_queue_pairs so num_queue_pairs can be restored to the correct value in case configuring queue channels fails. Additionally, moved the exit label in the i40e_setup_tc function so the if (need_reset) block can

[net-next 12/12] i40e: Fix misleading error message

2019-02-28 Thread Jeff Kirsher
From: Carolyn Wyborny This patch changes an error code for an admin queue head overrun to use I40E_ERR_ADMIN_QUEUE_FULL instead of I40E_ERR_QUEUE_EMPTY. Signed-off-by: Carolyn Wyborny Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 2 +

[net-next 03/12] i40e: don't allow changes to HW VLAN stripping on active port VLANs

2019-02-28 Thread Jeff Kirsher
From: Nicholas Nunley Modifying the VLAN stripping options when a port VLAN is configured will break traffic for the VSI, and conceptually doesn't make sense, so don't allow this. Signed-off-by: Nicholas Nunley Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++

[net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2019-02-28

2019-02-28 Thread Jeff Kirsher
This series contains updates to i40e driver only. Adam fixes i40e so that queues can be restored to its original value if configuring queue channels fails. Bumped the maximum API version supported and added the API version to error messages to clarify supported firmware API versions. Fixed the p

[net-next 02/12] i40e: Implement DDP support in i40e driver

2019-02-28 Thread Jeff Kirsher
From: Aleksandr Loktionov This patch introduces DDP (Dynamic Device Personalization) which allows loading profiles that change the way internal parser interprets processed frames. To load DDP profiles it utilizes ethtool flash feature. The files with recipes must be located in /var/lib/firmware d

[net-next 08/12] i40e: Changed maximum supported FW API version to 1.8

2019-02-28 Thread Jeff Kirsher
From: Adam Ludkiewicz A new FW has been released, which uses API version 1.8. Signed-off-by: Adam Ludkiewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 4 ++-- drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h | 2 +- 2 files

[net-next 07/12] i40e: Remove misleading messages for untrusted VF

2019-02-28 Thread Jeff Kirsher
From: Grzegorz Siwik Removed misleading messages when untrusted VF tries to add more addresses than NIC limit Signed-off-by: Grzegorz Siwik Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 21 - 1 file changed, 16 inse

[net-next 09/12] i40e: The driver now prints the API version in error message

2019-02-28 Thread Jeff Kirsher
From: Adam Ludkiewicz Added the API version in the error message for clarity. Signed-off-by: Adam Ludkiewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --

[net-next 11/12] i40e: Able to add up to 16 MAC filters on an untrusted VF

2019-02-28 Thread Jeff Kirsher
From: Adam Ludkiewicz This patch fixes the problem with the driver being able to add only 7 multicast MAC address filters instead of 16. The problem is fixed by changing the maximum number of MAC address filters to 16+1+1 (two extra are needed because the driver uses 1 for unicast MAC address and

Re: [PATCH v1 net-next 1/3] dt-bindings: net: dsa: document additional Microchip KSZ9477 family switches

2019-02-28 Thread Florian Fainelli
On 2/28/2019 7:57 PM, tristram...@microchip.com wrote: > From: Tristram Ha > > Document additional Microchip KSZ9477 family switches. > > Show how KSZ8565 switch should be configured as the host port is port 7 > instead of port 5. OK, so port 7, if you start numbering the ports from 1, and p

Re: [PATCH v1 net-next 2/3] net: dsa: add KSZ9893 switch tagging support

2019-02-28 Thread Florian Fainelli
On 2/28/2019 7:57 PM, tristram...@microchip.com wrote: > From: Tristram Ha > > KSZ9893 switch is similar to KSZ9477 switch except the ingress tail tag > has 1 byte instead of 2 bytes. The size of the portmap is smaller and > so the override and lookup bits are also moved. > > Signed-off-by:

Re: [PATCH v1 net-next 3/3] net: dsa: microchip: add KSZ9893 switch support

2019-02-28 Thread Florian Fainelli
On 2/28/2019 7:57 PM, tristram...@microchip.com wrote: > From: Tristram Ha > > Add KSZ9893 switch support in KSZ9477 driver. This switch is similar to > KSZ9477 except the ingress tail tag has 1 byte instead of 2 bytes, so > KSZ9893 tagging will be used. > > The XMII register that governs ho

Re: [PATCH bpf-next v2 1/7] bpf: implement lookup-free direct value access

2019-02-28 Thread kbuild test robot
Hi Daniel, I love your patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Daniel-Borkmann/BPF-support-for-global-data/20190301-112203 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master c

[PATCH v1 net-next 0/3] net: dsa: microchip: add KSZ9893 switch support

2019-02-28 Thread Tristram.Ha
From: Tristram Ha This series of patches is to modify the KSZ9477 DSA driver to support running KSZ9893 switch. The KSZ9893 switch is similar to KSZ9477 except the ingress tail tag has 1 byte instead of 2 bytes. The XMII register that governs the MAC communication also has different register de

[PATCH v1 net-next 3/3] net: dsa: microchip: add KSZ9893 switch support

2019-02-28 Thread Tristram.Ha
From: Tristram Ha Add KSZ9893 switch support in KSZ9477 driver. This switch is similar to KSZ9477 except the ingress tail tag has 1 byte instead of 2 bytes, so KSZ9893 tagging will be used. The XMII register that governs how the host port communicates with the MAC also has different register de

[PATCH v1 net-next 2/3] net: dsa: add KSZ9893 switch tagging support

2019-02-28 Thread Tristram.Ha
From: Tristram Ha KSZ9893 switch is similar to KSZ9477 switch except the ingress tail tag has 1 byte instead of 2 bytes. The size of the portmap is smaller and so the override and lookup bits are also moved. Signed-off-by: Tristram Ha --- include/net/dsa.h | 1 + net/dsa/dsa.c | 2 ++

[PATCH v1 net-next 1/3] dt-bindings: net: dsa: document additional Microchip KSZ9477 family switches

2019-02-28 Thread Tristram.Ha
From: Tristram Ha Document additional Microchip KSZ9477 family switches. Show how KSZ8565 switch should be configured as the host port is port 7 instead of port 5. Signed-off-by: Tristram Ha --- Documentation/devicetree/bindings/net/dsa/ksz.txt | 43 +++ 1 file changed, 43

Re: [PATCH bpf-next v2 2/7] bpf: add program side {rd,wr}only support

2019-02-28 Thread Jakub Kicinski
On Fri, 1 Mar 2019 00:18:24 +0100, Daniel Borkmann wrote: > This work adds two new map creation flags BPF_F_RDONLY_PROG > and BPF_F_WRONLY_PROG in order to allow for read-only or > write-only BPF maps from a BPF program side. > > Today we have BPF_F_RDONLY and BPF_F_WRONLY, but this only > applie

Re: Question on ptr_ring linux header

2019-02-28 Thread fei phung
Hi Michael , I have solved all the data race issue , it seems. The data race culprit is the ring index which I have removed in the latest datarace-free code. The diff can be found at https://www.diffchecker.com/w0Pxp2mF I plan to study the internal implementation of ptr_ring c coding in the comi

Re: [RFC v2 5/6] mlx4: report errors through extack

2019-02-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 13:54:40 -0800, Stephen Hemminger wrote: > @@ -2870,8 +2873,8 @@ static int mlx4_xdp_set(struct net_device *dev, struct > bpf_prog *prog) > if (port_up) { > err = mlx4_en_start_port(dev); > if (err) { > - en_err(priv, "Faile

Re: [PATCH net-next v2 3/3] xdp: Add devmap_idx map type for looking up devices by ifindex

2019-02-28 Thread kbuild test robot
Hi Toke, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/xdp-Use-a-default-map-for-xdp_redirect-helper/20190301-021039 config: powerpc-acadia_defconfig (attached as .config) compiler:

Re: [RFC v2 3/6] i40e: use extack for bpf errors

2019-02-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 13:54:38 -0800, Stephen Hemminger wrote: > @@ -12140,12 +12144,14 @@ static int i40e_xdp(struct net_device *dev, > struct i40e_netdev_priv *np = netdev_priv(dev); > struct i40e_vsi *vsi = np->vsi; > > - if (vsi->type != I40E_VSI_MAIN) > + if (vsi->type != I

[PATCH v2 2/2] appletalk: Fix use-after-free in atalk_proc_exit

2019-02-28 Thread Yue Haibing
From: YueHaibing KASAN report this: BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71 Read of size 8 at addr 8881f41fe5b0 by task syz-executor.0/2806 CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name: QEMU Standard PC (i440FX + PIIX,

[PATCH v2 1/2] appletalk: use remove_proc_subtree to simplify procfs code

2019-02-28 Thread Yue Haibing
From: YueHaibing Use remove_proc_subtree to remove the whole subtree on cleanup.Also do some cleanup. Signed-off-by: YueHaibing --- net/appletalk/atalk_proc.c | 56 ++ 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/net/appletalk/atal

[PATCH v2 0/2] appletalk: small cleanup and bugfix

2019-02-28 Thread Yue Haibing
From: YueHaibing v2: - Add cover letter log This patch series mainly fix a use-after-free bug in atalk_proc_exit. patch 1 use remove_proc_subtree helper to simplify atalk_proc fs code, also some other cleanup. patch 2 add proper error cleanup path in atalk_init to fix the issue, which based on t

Re: [PATCH 0/2] appletalk: A cleanup and bugfix

2019-02-28 Thread YueHaibing
On 2019/3/1 4:44, David Miller wrote: > > This series mixes cleanups with a bug fix. > > The cleanup is only appropriate for net-next, and the bug fix is > appropriate for net. patch 2 is based on patch 1 now, atalk_proc_exit context is changed, if they go separately, a small conflict will occur

Re: Realtek r8822be kernel module does not negotiate 802.11ac connection

2019-02-28 Thread David R. Bergstein
Tony, Thanks for your response.  Can you advise as to the availability of the new rtw88 driver?  As it appears to be under development, I could not locate a copy of the code for local compilation. Sincerely, David R. Bergstein On 2/27/19 5:23 AM, Tony Chuang wrote: >> This message is in regard

Re: [PATCH] net: ipv6: check net in ip6_call_ra_chain

2019-02-28 Thread David Miller
From: Francesco Ruggeri Date: Thu, 28 Feb 2019 16:09:17 -0800 > On Thu, Feb 28, 2019 at 3:31 PM David Ahern wrote: >> >> On 2/28/19 2:02 PM, David Miller wrote: >> > From: frugg...@arista.com (Francesco Ruggeri) >> > Date: Thu, 28 Feb 2019 11:01:46 -0800 >> > >> >> ip6_call_ra_chain is called wh

[PATCH bpf-next 1/4] bpf: formatting fixes in syscall.c

2019-02-28 Thread Andrii Nakryiko
Fix few formatting errors. Signed-off-by: Andrii Nakryiko --- kernel/bpf/syscall.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 174581dfe225..5272ba491e00 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@

[PATCH bpf-next 3/4] bpf/verifier: typo fixes and reflow verifier overview comment

2019-02-28 Thread Andrii Nakryiko
Fix few typos and reflow text in long high-level verifier comment. Signed-off-by: Andrii Nakryiko --- kernel/bpf/verifier.c | 94 +-- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index c09ec3

[PATCH bpf-next 4/4] bpf/verifier: fix minor typos in comments

2019-02-28 Thread Andrii Nakryiko
Few more minor fixes in comments. Signed-off-by: Andrii Nakryiko --- kernel/bpf/verifier.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index c6911ede94af..0ee788bfd462 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/b

[PATCH bpf-next 2/4] bpf/verifier: fix code formatting

2019-02-28 Thread Andrii Nakryiko
Fix few formatting problems. Signed-off-by: Andrii Nakryiko --- kernel/bpf/verifier.c | 66 +-- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 0e4edd7e3c5f..c09ec3222d13 100644 --- a/kern

[PATCH bpf-next 0/4] Formatting and typo fixes in kernel/bpf

2019-02-28 Thread Andrii Nakryiko
Few formatting fixes, as well as some comments clean up. Andrii Nakryiko (4): bpf: formatting fixes in syscall.c bpf/verifier: fix code formatting bpf/verifier: typo fixes and reflow verifier overview comment bpf/verifier: fix minor typos in comments kernel/bpf/syscall.c | 5 +- kerne

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-28 Thread si-wei liu
On 2/28/2019 6:26 AM, Michael S. Tsirkin wrote: On Thu, Feb 28, 2019 at 01:32:12AM -0800, si-wei liu wrote: Will the change break userspace further? -Siwei Didn't you show userspace is already broken. You can't "further break it", rename already fails. It's a race, userspace tends to give

[PATCH v2 bpf-next 2/3] docs/btf: reflow text to fill up to 78 characters

2019-02-28 Thread Andrii Nakryiko
Reflow paragraphs to more fully and evenly fill 78 character lines. Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song --- Documentation/bpf/btf.rst | 300 ++ 1 file changed, 140 insertions(+), 160 deletions(-) diff --git a/Documentation/bpf/btf.rst b/Do

[PATCH v2 bpf-next 3/3] docs/bpf: minor casing/punctuation fixes

2019-02-28 Thread Andrii Nakryiko
Fix few casing and punctuation glitches. Signed-off-by: Andrii Nakryiko --- Documentation/bpf/bpf_design_QA.rst | 24 Documentation/networking/filter.txt | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Documentation/bpf/bpf_design_QA.rst b/Docu

[PATCH v2 bpf-next 0/3] bpf docs typo, wording and formatting fixes

2019-02-28 Thread Andrii Nakryiko
A bunch of BPF-related docs typo, wording and formatting fixes. v1->v2: - split off non-documentation changes into separate patchset Andrii Nakryiko (3): docs/btf: fix typos, improve wording docs/btf: reflow text to fill up to 78 characters docs/bpf: minor casing/punctuation fixes Documen

[PATCH v2 bpf-next 1/3] docs/btf: fix typos, improve wording

2019-02-28 Thread Andrii Nakryiko
Fix various typos, some of the formatting and wording for Documentation/btf.rst. Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song --- Documentation/bpf/btf.rst | 108 +++--- 1 file changed, 53 insertions(+), 55 deletions(-) diff --git a/Documentation/bpf/b

SOCKET_FILTER regression - eBPF can't subtract when attached from unprivileged user

2019-02-28 Thread Marek Majkowski
Howdy, After some dramatic debugging, I think I managed to isolate a problem that looks like a funny eBPF runtime regression. It seems to be introduced somewhere after 4.14. The eBPF in question is running on network sockets with SO_ATTACH_BPF. The BPF_PROG_TYPE_SOCKET_FILTER code: uint64_t

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 16:20:28 -0800, Siwei Liu wrote: > On Thu, Feb 28, 2019 at 11:56 AM Jakub Kicinski wrote: > > On Thu, 28 Feb 2019 14:36:56 -0500, Michael S. Tsirkin wrote: > > > > It is a bit of a the chicken or the egg situation ;) But users can > > > > just blacklist, too. Anyway, I think

Re: [PATCH bpf-next 3/4] bpf: fix formatting, typos, reflow comments in syscall.c, verifier.c

2019-02-28 Thread Andrii Nakryiko
On Thu, Feb 28, 2019 at 4:28 PM Daniel Borkmann wrote: > > On 03/01/2019 01:27 AM, Daniel Borkmann wrote: > > On 02/28/2019 11:40 PM, Song Liu wrote: > >> On Thu, Feb 28, 2019 at 10:59 AM Andrii Nakryiko wrote: > >>> > >>> Fix few formatting errors. Fix few typos and reflow long descriptive > >>>

Re: [PATCH v2 bpf-next 0/5] btf_dedup algorithm and test fixes

2019-02-28 Thread Daniel Borkmann
On 03/01/2019 12:31 AM, Andrii Nakryiko wrote: > This patchset fixes a bug in btf_dedup() algorithm, which under specific hash > collision causes infinite loop. It also exposes ability to tune BTF > deduplication table size, with double purpose of allowing applications to > adjust size according to

Re: [PATCH bpf-next 3/4] bpf: fix formatting, typos, reflow comments in syscall.c, verifier.c

2019-02-28 Thread Daniel Borkmann
On 03/01/2019 01:27 AM, Daniel Borkmann wrote: > On 02/28/2019 11:40 PM, Song Liu wrote: >> On Thu, Feb 28, 2019 at 10:59 AM Andrii Nakryiko wrote: >>> >>> Fix few formatting errors. Fix few typos and reflow long descriptive >>> comments for more even text fill. >>> >>> Signed-off-by: Andrii Nakry

Re: [PATCH bpf-next 3/4] bpf: fix formatting, typos, reflow comments in syscall.c, verifier.c

2019-02-28 Thread Daniel Borkmann
On 02/28/2019 11:40 PM, Song Liu wrote: > On Thu, Feb 28, 2019 at 10:59 AM Andrii Nakryiko wrote: >> >> Fix few formatting errors. Fix few typos and reflow long descriptive >> comments for more even text fill. >> >> Signed-off-by: Andrii Nakryiko > > I think we should not change the code for for

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-28 Thread Siwei Liu
On Thu, Feb 28, 2019 at 11:56 AM Jakub Kicinski wrote: > > On Thu, 28 Feb 2019 14:36:56 -0500, Michael S. Tsirkin wrote: > > > It is a bit of a the chicken or the egg situation ;) But users can > > > just blacklist, too. Anyway, I think this is far better than module > > > parameters > > > > Sor

Re: [PATCH bpf-next v2 5/7] bpf, libbpf: support global data/bss/rodata sections

2019-02-28 Thread Daniel Borkmann
On 03/01/2019 12:41 AM, Stanislav Fomichev wrote: > On 03/01, Daniel Borkmann wrote: >> This work adds BPF loader support for global data sections >> to libbpf. This allows to write BPF programs in more natural >> C-like way by being able to define global variables and const >> data. >> >> Back at

Re: [PATCH] net: ipv6: check net in ip6_call_ra_chain

2019-02-28 Thread Francesco Ruggeri
On Thu, Feb 28, 2019 at 3:31 PM David Ahern wrote: > > On 2/28/19 2:02 PM, David Miller wrote: > > From: frugg...@arista.com (Francesco Ruggeri) > > Date: Thu, 28 Feb 2019 11:01:46 -0800 > > > >> ip6_call_ra_chain is called when IPv6 packet with Router Alert option > >> is forwarded. > >> It needs

Re: [PATCH v3] tools/libbpf: signedness bug in btf_dedup_ref_type()

2019-02-28 Thread Daniel Borkmann
On 02/28/2019 07:06 PM, Dan Carpenter wrote: > The "ref_type_id" variable needs to be signed for the error handling > to work. > > Fixes: d5caef5b5655 ("btf: add BTF types deduplication algorithm") > Signed-off-by: Dan Carpenter > Acked-by: Andrii Nakryiko Applied, thanks!

Re: [PATCH bpf-next v2 0/5] samples: bpf: continue effort to get rid of bpf_load

2019-02-28 Thread Daniel Borkmann
On 02/28/2019 04:04 AM, Jakub Kicinski wrote: > Hi! > > This set is next part of a quest to get rid of the bpf_load > ELF loader. It fixes some minor issues with the samples and > starts the conversion. > > First patch fixes ping invocations, ping localhost defaults > to IPv6 on modern setups. N

Re: [PATCH bpf-next] selftests/bpf: use __bpf_constant_htons in test_prog.c for flow dissector

2019-02-28 Thread Daniel Borkmann
On 02/27/2019 08:15 PM, Stanislav Fomichev wrote: > Older GCC (<4.8) isn't smart enough to optimize !__builtin_constant_p() > branch in bpf_htons. > > I recently fixed it for pkt_v4 and pkt_v6 in commit a0517a0f7ef23 > ("selftests/bpf: use __bpf_constant_htons in test_prog.c"), but later > added a

Re: [PATCH bpf-next] bpf: add missing entries to bpf_helpers.h

2019-02-28 Thread Daniel Borkmann
On 02/27/2019 05:08 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > This header defines the BPF functions enumerated in uapi/linux.bpf.h > in a callable format. Expand to include all registered functions. > > Signed-off-by: Willem de Bruijn Applied, thanks!

[PATCH net-next] net: dsa: Do not configure VLAN ID 0

2019-02-28 Thread Florian Fainelli
Because we skip the prepare phase, we would not get a chance to have the port_vlan_prepare() callback return -EOPNOTSUPP and tell us about that. This causes problems with mv88e6xxx which specifically checks for VLAN ID = 0. Turns out we do not actually need to program that VLAN ID since it should b

Re: [PATCH bpf-next 1/4] docs/btf: fix typos, improve wording

2019-02-28 Thread Yonghong Song
On 2/28/19 10:45 AM, Andrii Nakryiko wrote: > Fix various typos, some of the formatting and wording for > Documentation/btf.rst. > > Signed-off-by: Andrii Nakryiko Ack for Patch #1 and #2: Acked-by: Yonghong Song > --- > Documentation/bpf/btf.rst | 108 +++---

Re: [PATCH bpf-next v2 5/7] bpf, libbpf: support global data/bss/rodata sections

2019-02-28 Thread Stanislav Fomichev
On 03/01, Daniel Borkmann wrote: > This work adds BPF loader support for global data sections > to libbpf. This allows to write BPF programs in more natural > C-like way by being able to define global variables and const > data. > > Back at LPC 2018 [0] we presented a first prototype which > imple

[PATCH v2 bpf-next 2/5] libbpf: fix formatting for btf_ext__get_raw_data

2019-02-28 Thread Andrii Nakryiko
Fix invalid formatting of pointer arg. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- tools/lib/bpf/btf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/btf.h index 94bbc249b0f1..b60bb7cf5fff 100644 --- a/tools/lib/bpf/btf.h +++ b/

Re: [PATCH] net: ipv6: check net in ip6_call_ra_chain

2019-02-28 Thread David Ahern
On 2/28/19 2:02 PM, David Miller wrote: > From: frugg...@arista.com (Francesco Ruggeri) > Date: Thu, 28 Feb 2019 11:01:46 -0800 > >> ip6_call_ra_chain is called when IPv6 packet with Router Alert option >> is forwarded. >> It needs to check if the net of the socket is the same as the net of the >>

[PATCH v2 bpf-next 4/5] btf: fix bug with resolving STRUCT/UNION into corresponding FWD

2019-02-28 Thread Andrii Nakryiko
When checking available canonical candidates for struct/union algorithm utilizes btf_dedup_is_equiv to determine if candidate is suitable. This check is not enough when candidate is corresponding FWD for that struct/union, because according to equivalence logic they are equivalent. When it so happe

Re: [virtio-dev] Re: net_failover slave udev renaming (was Re: [RFC PATCH net-next v6 4/4] netvsc: refactor notifier/event handling code to use the bypass framework)

2019-02-28 Thread Jakub Kicinski
On Thu, 28 Feb 2019 15:14:55 -0500, Michael S. Tsirkin wrote: > On Thu, Feb 28, 2019 at 11:56:41AM -0800, Jakub Kicinski wrote: > > On Thu, 28 Feb 2019 14:36:56 -0500, Michael S. Tsirkin wrote: > > > > It is a bit of a the chicken or the egg situation ;) But users can > > > > just blacklist, too

[PATCH v2 bpf-next 5/5] selftests/bpf: add btf_dedup test of FWD/STRUCT resolution

2019-02-28 Thread Andrii Nakryiko
This patch adds a btf_dedup test exercising logic of STRUCT<->FWD resolution and validating that STRUCT is not resolved to a FWD. It also forces hash collisions, forcing both FWD and STRUCT to be candidates for each other. Previously this condition caused infinite loop due to FWD pointing to STRUCT

[PATCH v2 bpf-next 0/5] btf_dedup algorithm and test fixes

2019-02-28 Thread Andrii Nakryiko
This patchset fixes a bug in btf_dedup() algorithm, which under specific hash collision causes infinite loop. It also exposes ability to tune BTF deduplication table size, with double purpose of allowing applications to adjust size according to the size of BTF data, as well as allowing a simple way

[PATCH v2 bpf-next 3/5] btf: allow to customize dedup hash table size

2019-02-28 Thread Andrii Nakryiko
Default size of dedup table (16k) is good enough for most binaries, even typical vmlinux images. But there are cases of binaries with huge amount of BTF types (e.g., allyesconfig variants of kernel), which benefit from having bigger dedup table size to lower amount of unnecessary hash collisions. T

[PATCH v2 bpf-next 1/5] selftests/bpf: fix btf_dedup testing code

2019-02-28 Thread Andrii Nakryiko
btf_dedup testing code doesn't account for length of struct btf_header when calculating the start of a string section. This patch fixes this problem. Fixes: 49b57e0d01db ("tools/bpf: remove btf__get_strings() superseded by raw data API") Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-b

[PATCH bpf-next v2 4/7] selftests: bpf: break up test_progs - stackmap

2019-02-28 Thread Stanislav Fomichev
Move stackmap prog tests into separate files. Signed-off-by: Stanislav Fomichev --- .../bpf/prog_tests/stacktrace_build_id.c | 165 ++ .../bpf/prog_tests/stacktrace_build_id_nmi.c | 150 ++ .../selftests/bpf/prog_tests/stacktrace_map.c | 103 .../bpf/prog_tests/stacktrace_map_

[PATCH bpf-next v2 5/7] selftests: bpf: break up test_progs - tracepoint

2019-02-28 Thread Stanislav Fomichev
Move tracepoint prog tests into separate files. Signed-off-by: Stanislav Fomichev --- .../bpf/prog_tests/get_stack_raw_tp.c | 139 ++ .../bpf/prog_tests/task_fd_query_rawtp.c | 78 .../bpf/prog_tests/task_fd_query_tp.c | 82 .../bpf/prog_tests/tp_attach_query

[PATCH bpf-next v2 7/7] selftests: bpf: break up test_progs - misc

2019-02-28 Thread Stanislav Fomichev
Move the rest of prog tests into separate files. Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/prog_tests/bpf_obj_id.c | 249 ++ .../selftests/bpf/prog_tests/flow_dissector.c | 72 ++ .../selftests/bpf/prog_tests/l4lb_all.c | 90 +++ .../selftests/bpf/prog_tests/obj_nam

  1   2   3   4   5   >