INFO: task hung in __flush_work

2019-02-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:90cadbbf341d Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=10a565c740 kernel config: https://syzkaller.appspot.com/x/.config?x=9d41c8529d7e7362 da

general protection fault in rt_cache_valid

2019-02-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1582bc30c0 kernel config: https://syzkaller.appspot.com/x/.config?x=b03c5892bb940c76 da

WARNING in __vunmap

2019-02-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:a048a07d7f45 powerpc/64s: Add support for a store forwardi.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1418d5a780 kernel config: https://syzkaller.appspot.com/x/.config?x=982e2df1b9e60b02 da

general protection fault in __vunmap

2019-02-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:cb5b020a8d38 Revert "exec: load_script: don't blindly trun.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13c2886cc0 kernel config: https://syzkaller.appspot.com/x/.config?x=ee434566c893c7b1 da

general protection fault in reuseport_add_sock

2019-02-15 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:f9bcc9f3ee4f net: ethernet: freescale: set FEC ethtool reg.. git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=158a10f340 kernel config: https://syzkaller.appspot.com/x/.config?x=8f00801d7b7c4fe6 dashboa

Re: [RFC PATCH] bonding: use mutex lock in bond_get_stats()

2019-02-15 Thread Kefeng Wang
On 2019/2/15 21:57, Eric Dumazet wrote: > On Fri, Feb 15, 2019 at 5:37 AM Kefeng Wang > wrote: >> >> With CONFIG_DEBUG_SPINLOCK=y, we find following stack, >> >> BUG: spinlock wrong CPU on CPU#0, ip/16047 >> lock: 0x803f5febc998, .magic: dead4ead, .owner: ip/16047, .owner_cpu: 0 >> CPU

Re: [PATCH net-next v3 0/9] net: Get rid of switchdev_port_attr_get()

2019-02-15 Thread Florian Fainelli
On 2/15/2019 8:55 PM, Florian Fainelli wrote: > Hi all, > > This patch series splits the removal of the switchdev_ops that was > proposed a few times before and first tackles the easy part which is the > removal of the single call to switchdev_port_attr_get() within the > bridge code. > > As s

[PATCH net-next v3 1/9] Documentation: networking: switchdev: Update port parent ID section

2019-02-15 Thread Florian Fainelli
Update the section about switchdev drivers having to implement a switchdev_port_attr_get() function to return SWITCHDEV_ATTR_ID_PORT_PARENT_ID since that is no longer valid after commit bccb30254a4a ("net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID"). Fixes: bccb30254a4a ("net: Get rid of SWITCHD

[PATCH net-next v3 2/9] switchdev: Add SWITCHDEV_PORT_ATTR_SET, SWITCHDEV_PORT_ATTR_GET

2019-02-15 Thread Florian Fainelli
In preparation for allowing switchdev enabled drivers to veto specific attribute settings from within the context of the caller, introduce a new switchdev notifier type for port attributes. Suggested-by: Ido Schimmel Signed-off-by: Florian Fainelli --- include/net/switchdev.h | 10 ++ 1

[PATCH net-next v3 9/9] net: Remove switchdev_ops

2019-02-15 Thread Florian Fainelli
Now that we have converted all possible callers to using a switchdev notifier for attributes we do not have a need for implementing switchdev_ops anymore, and this can be removed from all drivers the net_device structure. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mellanox/mlxsw/sp

[PATCH net-next v3 7/9] net: dsa: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-15 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare DSA to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing dsa_slave_port_attr_{set

[PATCH net-next v3 0/9] net: Get rid of switchdev_port_attr_get()

2019-02-15 Thread Florian Fainelli
Hi all, This patch series splits the removal of the switchdev_ops that was proposed a few times before and first tackles the easy part which is the removal of the single call to switchdev_port_attr_get() within the bridge code. As suggestd by Ido, this patch series adds a SWITCHDEV_ATTR_ID_PORT_P

[PATCH net-next v3 5/9] net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-15 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare ocelot to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing ocelot_port_attr_{set

[PATCH net-next v3 4/9] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-15 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare mlxsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing mlxsw_sp_port_attr_{se

[PATCH net-next v3 8/9] net: switchdev: Replace port attr get/set SDO with a notification

2019-02-15 Thread Florian Fainelli
Drop switchdev_ops.switchdev_port_attr_get and _set. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_attr_notify() that sends the switchdev notifications SWITCHDEV_PORT_ATTR_GET and _SET. Up

[PATCH net-next v3 6/9] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-15 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare ethsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing swdev_port_attr_{set,g

[PATCH net-next v3 3/9] rocker: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-15 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting a port's attribute and use a blocking notifier to perform those tasks. Prepare rocker to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing rocker_port_attr_{set

Re: [MERGE HELP] cls_tcindex.c

2019-02-15 Thread David Miller
From: Cong Wang Date: Fri, 15 Feb 2019 17:31:41 -0800 > I will cherry-pick the first two patches for net-next and send them to you. Ok, thanks Cong.

Re: [PATCH net-next v2 0/9] net: Get rid of switchdev_port_attr_get()

2019-02-15 Thread David Miller
From: Florian Fainelli Date: Fri, 15 Feb 2019 16:37:38 -0800 > David, please ignore this version, I will repost one that actually > builds, need to keep mangling with my kernel configuration and keep > those drivers enabled... Ok.

Re: [PATCH net 0/5] net: dsa: b53: VLAN and L2 fixes

2019-02-15 Thread David Miller
From: Florian Fainelli Date: Fri, 15 Feb 2019 12:16:48 -0800 > This patch series contains a collection of fixes to the b53 driver in > order to: > > - consistently program the same default VLAN ID when a port is bridged > or not > - properly account for VLAN filtering being turned on/off and t

Re: [PATCH net-next 0/7] s390/qeth: updates 2019-02-15

2019-02-15 Thread David Miller
From: Julian Wiedmann Date: Fri, 15 Feb 2019 19:22:24 +0100 > please apply a few more qeth patches to net-next. Along with some smaller > improvements, this revamps our code for the SW statistics that are exposed > through ETHTOOL_GSTATS. Applied, thanks.

Re: [PATCH net-next] selftests: forwarding: Add some missing configuration symbols

2019-02-15 Thread David Miller
From: Florian Fainelli Date: Fri, 15 Feb 2019 10:14:52 -0800 > For the forwarding selftests to work, we need network namespaces when > using veth/vrf otherwise ping/ping6 commands like these: > > ip vrf exec vveth0 /bin/ping 192.0.2.2 -c 10 -i 0.1 -w 5 > > will fail because network namespaces m

Re: [PATCH net] net: validate untrusted gso packets without csum offload

2019-02-15 Thread David Miller
From: Willem de Bruijn Date: Fri, 15 Feb 2019 12:15:47 -0500 > From: Willem de Bruijn > > Syzkaller again found a path to a kernel crash through bad gso input. > By building an excessively large packet to cause an skb field to wrap. > > If VIRTIO_NET_HDR_F_NEEDS_CSUM was set this would have be

Re: [PATCH] net: Fix for_each_netdev_feature on Big endian

2019-02-15 Thread David Miller
From: Hauke Mehrtens Date: Fri, 15 Feb 2019 17:58:54 +0100 > The features attribute is of type u64 and stored in the native endianes on > the system. The for_each_set_bit() macro takes a pointer to a 32 bit array > and goes over the bits in this area. On little Endian systems this also > works wi

Re: [PATCH net-next] net/ipv6: prefer rcu_access_pointer() over rcu_dereference()

2019-02-15 Thread David Miller
From: Paolo Abeni Date: Fri, 15 Feb 2019 18:15:37 +0100 > rt6_cache_allowed_for_pmtu() checks for rt->from presence, but > it does not access the RCU protected pointer. We can use > rcu_access_pointer() and clean-up the code a bit. No functional > changes intended. > > Signed-off-by: Paolo Abeni

Re: [PATCH] net: phy: xgmiitorgmii: Support generic PHY status read

2019-02-15 Thread David Miller
From: Paul Kocialkowski Date: Fri, 15 Feb 2019 17:17:08 +0100 > Some PHY drivers like the generic one do not provide a read_status > callback on their own but rely on genphy_read_status being called > directly. > > With the current code, this results in a NULL function pointer call. > Call genph

Re: [PATCH][next] mlxsw: core: fix spelling mistake "temprature" -> "temperature"

2019-02-15 Thread David Miller
From: Colin King Date: Fri, 15 Feb 2019 15:11:53 + > From: Colin Ian King > > There is a spelling mistake in several dev_err messages, fix these. > > Signed-off-by: Colin Ian King Applied, thanks Colin.

Re: [PATCH net] net: ip6_gre: initialize erspan_ver just for erspan tunnels

2019-02-15 Thread David Miller
From: Lorenzo Bianconi Date: Fri, 15 Feb 2019 15:10:32 +0100 > After commit c706863bc890 ("net: ip6_gre: always reports o_key to > userspace"), ip6gre and ip6gretap tunnels started reporting TUNNEL_KEY > output flag even if it is not configured. > ip6gre_fill_info checks erspan_ver value to add T

[PATCH bpf-next] tools/libbpf: support bigger BTF data sizes

2019-02-15 Thread Andrii Nakryiko
While it's understandable why kernel limits number of BTF types to 65535 and size of string section to 64KB, in libbpf as user-space library it's too restrictive. E.g., pahole converting DWARF to BTF type information for Linux kernel generates more than 3 million BTF types and more than 3MB of stri

Re: pull-request: mac80211 2019-02-15

2019-02-15 Thread David Miller
From: Johannes Berg Date: Fri, 15 Feb 2019 13:51:45 +0100 > It's clear things are winding down, this is basically just the stuff > from Herbert that we've been discussing. I threw in a simple error > path fix, mostly because it's simple :-) > > Please pull and let me know if there's any problem.

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

2019-02-15 Thread YueHaibing
Fix coccinelle warning: ./drivers/net/phy/mdio_bus.c:51:5-12: ERROR: PTR_ERR applied after initialization to constant on line 44 ./drivers/net/phy/mdio_bus.c:52:5-12: ERROR: PTR_ERR applied after initialization to constant on line 44 fix this by using IS_ERR before PTR_ERR Fixes: bafbdd527d56

RE: [PATCH 2/2] i40e: add tracking of AF_XDP ZC state for each queue pair

2019-02-15 Thread Brown, Aaron F
> From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Björn Töpel > Sent: Tuesday, February 12, 2019 12:52 AM > To: intel-wired-...@lists.osuosl.org > Cc: Topel, Bjorn ; Karlsson, Magnus > ; magnus.karls...@gmail.com; > netdev@vger.kernel.org; Sokolowski, Jan >

RE: [PATCH 1/2] i40e: move i40e_xsk_umem function

2019-02-15 Thread Brown, Aaron F
> From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of Björn Töpel > Sent: Tuesday, February 12, 2019 12:52 AM > To: intel-wired-...@lists.osuosl.org > Cc: Topel, Bjorn ; Karlsson, Magnus > ; magnus.karls...@gmail.com; > netdev@vger.kernel.org; Sokolowski, Jan >

Re: [net-next 5/5] net: sock: remove the definition of SOCK_DEBUG()

2019-02-15 Thread Yafang Shao
On Sat, Feb 16, 2019 at 2:51 AM Joe Perches wrote: > > On Fri, 2019-02-15 at 10:22 -0800, Eric Dumazet wrote: > > On Fri, Feb 15, 2019 at 10:13 AM Cong Wang wrote: > > > On Fri, Feb 15, 2019 at 8:26 AM Eric Dumazet wrote: > > > > On Fri, Feb 15, 2019 at 6:50 AM Yafang Shao > > > > wrote: > > >

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

2019-02-15 Thread YueHaibing
On 2019/2/1 12:24, Al Viro wrote: > On Tue, Jan 29, 2019 at 11:30:27AM +0800, YueHaibing wrote: gpiod = fwnode_get_named_gpiod(&mdiodev->dev.of_node->fwnode, "reset-gpios", 0, GPIOD_OUT_LOW,

[PATCH net-next] ptr_ring: remove duplicated include from ptr_ring.h

2019-02-15 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- include/linux/ptr_ring.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h index 186cd8e..8da46ac 100644 --- a/include/linux/ptr_ring.h +++ b/include/linux/ptr_ring.h @@ -26,7 +26,6 @@

Re: [PATCH net 2/2] tcp: tcp_v4_err() should be more careful

2019-02-15 Thread Soheil Hassas Yeganeh
On Fri, Feb 15, 2019 at 9:21 PM Neal Cardwell wrote: > > On Fri, Feb 15, 2019 at 4:36 PM Eric Dumazet wrote: > > > > ICMP handlers are not very often stressed, we should > > make them more resilient to bugs that might surface in > > the future. > > > > If there is no packet in retransmit queue, w

Re: [PATCH net 2/2] tcp: tcp_v4_err() should be more careful

2019-02-15 Thread Neal Cardwell
On Fri, Feb 15, 2019 at 4:36 PM Eric Dumazet wrote: > > ICMP handlers are not very often stressed, we should > make them more resilient to bugs that might surface in > the future. > > If there is no packet in retransmit queue, we should > avoid a NULL deref. > > Signed-off-by: Eric Dumazet > Repo

Re: [PATCH net 1/2] tcp: clear icsk_backoff in tcp_write_queue_purge()

2019-02-15 Thread Neal Cardwell
On Fri, Feb 15, 2019 at 4:36 PM Eric Dumazet wrote: > > soukjin bae reported a crash in tcp_v4_err() handling > ICMP_DEST_UNREACH after tcp_write_queue_head(sk) > returned a NULL pointer. > > Current logic should have prevented this : > > if (seq != tp->snd_una || !icsk->icsk_retransmits || >

[PATCH net-next] igc: Make function igc_write_rss_indir_tbl() static

2019-02-15 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/intel/igc/igc_ethtool.c:646:6: warning: symbol 'igc_write_rss_indir_tbl' was not declared. Should it be static? Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/intel/igc/igc_ethtool.c

[net-next 12/13] net/mlx5: E-Switch, Load/unload VF reps according to event from host PF

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang When host PF changes the number of VFs, the ECPF esw driver will get a FW event. It should query the number of VFs enabled by host PF and update the VF reps accordingly. Note that host PF can't change the number of VFs dynamically, it has to reset the number of VFs to 0 before c

[net-next 13/13] net/mlx5: E-Switch, Allow transition to offloads mode for ECPF

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang Currently, the e-switch driver requires going to legacy mode before changing to the offloads mode. This makes sense for regular case as the legacy mode is done by creating VFs. However, it's problematic when ECPF is the eswitch manager. In such case, ECPF will control the vport

[net-next 05/13] net/mlx5: E-Switch, Split VF and special vports for offloads mode

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang When driver is entering offloads mode, there are two major tasks to do: initialize flow steering and create representors. Flow steering should make sure enough flow table/group spaces are reserved for all reps. Representors will be created in a group, all or none. With the intr

[net-next 06/13] net/mlx5: E-Switch, Use getter and iterator to access vport/rep

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang With only PF and VF, it is sufficient to have the vport/rep array index as the vport number. This is because PF and VF vports numbers are consecutive serial numbers. In downstream patches with introducing of ECPF and UPLINK vports, it's not consecutive any more. Use getter to g

[net-next 02/13] net/mlx5: E-Switch, Properly refer to the esw manager vport

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang In SmartNIC mode, the eswitch manager is not necessarily the PF (vport 0). Use a helper function to get the correct eswitch manager vport number and cache on the eswitch instance for fast reference. Signed-off-by: Bodong Wang Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz

[net-next 08/13] net/mlx5: E-Switch, Support load/unload reps of specific vport types

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang Currently the driver loads and unloads all reps in an unbreakable group. However, with ECPF, the reps of special vports such as uplink and host PF should always be loaded in switchdev mode where the reps for VFs will be loaded on-demand and unloaded on no-demand. This is a pre-s

[net-next 10/13] net/mlx5: E-Switch, Assign a different position for uplink rep and vport

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang In offloads mode, the current implementation puts the uplink representor at index zero of the vport reps array. It is not "natural" to place it at index 0 since we want to put the representor for vport 0 at index 0 with the introduction of SmartNIC. A separate patch will handle

[net-next 07/13] net/mlx5: E-Switch, Add state to eswitch vport representors

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang Currently the eswitch vport reps have a valid indicator, which is set on register and unset on unregister. However, a rep can be loaded or not loaded when doing unregister, current driver checks if the vport of that rep is enabled as a flag to imply the rep is loaded. However, f

[net-next 04/13] net/mlx5: E-Switch, Refactor offloads flow steering init/cleanup

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang E-switch offloads mode initialize/cleanup multiple steering related entities (flow table/group). Refactor these operations to internal helper functions for better block design. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Reviewed-by: Or Gerlitz Si

[net-next 11/13] net/mlx5: E-Switch, Consider ECPF vport depends on eswitch ownership

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang ECPF connects to the eswitch through vport 0xfffe. ECPF may or may not be the eswitch manager depending on firmware configuration. 1. If ECPF is eswitch manager: ECPF will take over the eswitch manager responsibility. A rep of the host PF shall be created at the ECPF side

[net-next 09/13] net/mlx5: E-Switch, Centralize repersentor reg/unreg to eswitch driver

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang Eswitch has two users: IB and ETH. They both register repersentors when mlx5 interface is added, and unregister the repersentors when mlx5 interface is removed. Ideally, each driver should only deal with the entities which are unique to itself. However, current IB and ETH driver

[net-next 01/13] net/mlx5: Correctly set LAG mode for ECPF

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang When bonding is added, driver assumes that it's RoCE LAG if no VF is enabled. This is not enough for ECPF as the VF is enabled in host PF side. LAG should only choose RoCE mode when both slave devices meet conditions below: 1. E-Switch offloads mode is NONE. 2. No VF is enable

[pull request][net-next 00/13] Mellanox, BlueField SmartNIC

2019-02-15 Thread Saeed Mahameed
Hi Dave, This series adds the support for Melanox BlueField SmartNIC. For more information please see tag log below. Please note the merge commit of mlx5-next at the base of the pull request: 259fae5a2cff ("Merge branch 'mlx5-next' of git://git.kernel.org/.../mellanox/linux") Please pull and le

[net-next 03/13] net/mlx5: E-Switch, Properly refer to host PF vport as other vport

2019-02-15 Thread Saeed Mahameed
From: Bodong Wang Commands referring to vports use the following scheme: 1. When referring to my own vport, put 0 in vport and 0 in other_vport. 2. When referring to another vport, put the vport number of the referred vport and put 1 in other_vport. It was assumed that driver is accessing

Re: [PATCH bpf 1/2] bpf/test_run: fix unkillable BPF_PROG_TEST_RUN

2019-02-15 Thread Daniel Borkmann
On 02/13/2019 12:42 AM, Stanislav Fomichev wrote: > Syzbot found out that running BPF_PROG_TEST_RUN with repeat=0x > makes process unkillable. The problem is that when CONFIG_PREEMPT is > enabled, we never see need_resched() return true. This is due to the > fact that preempt_enable() (whic

[PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock

2019-02-15 Thread Wei Yongjun
The function meth_init_tx_ring() is called from meth_tx_timeout(), in which spin_lock is held, so we should use GFP_ATOMIC instead. Fixes: 8d4c28fbc284 ("meth: pass struct device to DMA API functions") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/sgi/meth.c | 2 +- 1 file changed, 1 inser

Re: [MERGE HELP] cls_tcindex.c

2019-02-15 Thread Cong Wang
On Fri, Feb 15, 2019 at 12:41 PM David Miller wrote: > > > I've merged net into net-next. > > The worst conflict was cls_tcindex.c as Cong's fixes collided heavily > with Vlad's work. > > The interim solution I used for this merge was to revert back to RCU. > > Please take a look at what I did and

[PATCH net-next] ip_tunnel: Fix DST_METADATA dst_entry handle in tnl_update_pmtu

2019-02-15 Thread wenxu
From: wenxu BUG report in selftests: bpf: test_tunnel.sh Testing IPIP tunnel... BUG: unable to handle kernel NULL pointer dereference at PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI CPU: 0 PID: 16822 Comm: ping Not tainted 5.0.0-rc3-00352-gc8b34e6 #1 Hardware name: QEMU Standard PC (i440

Re: [PATCH net-next v2 0/9] net: Get rid of switchdev_port_attr_get()

2019-02-15 Thread Florian Fainelli
On 2/15/19 2:53 PM, Florian Fainelli wrote: > Hi all, > > This patch series splits the removal of the switchdev_ops that was > proposed a few times before and first tackles the easy part which is the > removal of the single call to switchdev_port_attr_get() within the > bridge code. > > As sugges

Re: [PATCH net-next 1/3] net: stmmac: Fix NAPI poll in TX path when in multi-queue

2019-02-15 Thread Florian Fainelli
On 2/15/19 5:42 AM, Jose Abreu wrote: > Commit 8fce33317023 introduced the concept of NAPI per-channel and > independent cleaning of TX path. > > This is currently breaking performance in some cases. The scenario > happens when all packets are being received in Queue 0 but the TX is > performed in

Re: [PATCH bpf-next v2] bpf: make LWTUNNEL_BPF dependent on INET

2019-02-15 Thread Daniel Borkmann
On 02/15/2019 11:55 PM, Randy Dunlap wrote: > On 2/15/19 9:51 AM, Peter Oskolkov wrote: >> Lightweight tunnels are L3 constructs that are used with IP/IP6. >> >> For example, lwtunnel_xmit is called from ip_output.c and >> ip6_output.c only. >> >> Make the dependency explicit at least for LWT-BPF,

Re: [PATCH] net: sched: matchall: verify that filter is not NULL in mall_walk()

2019-02-15 Thread Cong Wang
On Fri, Feb 15, 2019 at 4:11 AM Vlad Buslov wrote: > > Check that filter is not NULL before passing it to tcf_walker->fn() > callback. This can happen when mall_change() failed to offload filter to > hardware. > > Signed-off-by: Vlad Buslov > --- > net/sched/cls_matchall.c | 3 +++ > 1 file chan

Re: [PATCH net-next v5] ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs

2019-02-15 Thread Nikolay Aleksandrov
On 14/02/2019 04:44, Callum Sinclair wrote: > Currently the only way to clear the forwarding cache was to delete the > entries one by one using the MRT_DEL_MFC socket option or to destroy and > recreate the socket. > > Create a new socket option which with the use of optional flags can > clear any

[PATCH bpf-next] selftests: bpf: test_lwt_ip_encap: add negative tests.

2019-02-15 Thread Peter Oskolkov
As requested by David Ahern: - add negative tests (no routes, explicitly unreachable destinations) to exercize error handling code paths; - do not exit on test failures, but instead print a summary of passed/failed tests at the end. Future patches will add TSO and VRF tests. Signed-off-by: P

Re: [PATCH net-next v4 10/17] net: sched: refactor tp insert/delete for concurrent execution

2019-02-15 Thread Cong Wang
On Mon, Feb 11, 2019 at 12:56 AM Vlad Buslov wrote: > +static bool tcf_proto_is_empty(struct tcf_proto *tp) > +{ > + struct tcf_walker walker = { .fn = walker_noop, }; > + > + if (tp->ops->walk) { > + tp->ops->walk(tp, &walker); > + return !walker.stop; > +

[PATCH RFC 3/5] net/sched: act_bpf: validate the control action inside init()

2019-02-15 Thread Davide Caratti
Don't overwrite act_bpf data if the control control action is not valid, to prevent loosing the previous configuration in case validation failed. Not doing that caused NULL dereference in the data path if 'goto chain' is used. Tested with: # ./tdc.py -c bpf Fixes: db50514f9a9c ("net: sched: add

[PATCH RFC 1/5] net/sched: fix refcount leak when 'goto_chain' is used

2019-02-15 Thread Davide Caratti
when replacing valid 'goto chain' actions with another valid 'goto chain' action, the kernel leaks chain->action_refcnt and chain->refcnt. Since we unconditionally take the refcount again, if the control action is a 'goto chain', we can just drop them after ->init() has ended successfully. Fixes:

[PATCH RFC 4/5] net/sched: act_csum: validate the control action inside init()

2019-02-15 Thread Davide Caratti
Don't overwrite act_csum data if the control control action is not valid, to prevent loosing the previous configuration in case validation failed. Not doing that caused NULL dereference in the data path if 'goto chain' is used. Tested with: # ./tdc.py -c csum Fixes: db50514f9a9c ("net: sched: ad

[PATCH RFC 2/5] net/sched: prepare TC actions to properly validate the control action

2019-02-15 Thread Davide Caratti
- add tcf_action_check_ctrlact(), and pass a pointer to struct tcf_proto in each actions's init() function, to allow validation of 'goto chain' control action. - add tcf_action_set_ctrlact(), to set the control action, release the previous 'goto_chain' handle and replace it with the new one.

[PATCH RFC 0/5] net/sched: validate the control action with all the other parameters

2019-02-15 Thread Davide Caratti
currently, the kernel checks for bad values of the control action in tcf_action_init_1(), after a successful call to the action's init() function. This causes three bad behaviors: 1. the "half configuration" if the action is overwritten, the new configuration data are applied successfully

[PATCH RFC 5/5] net/sched: act_gact: validate the control action inside init()

2019-02-15 Thread Davide Caratti
Don't overwrite act_gact data if the control control action is not valid, to prevent loosing the previous configuration in case validation failed. Not doing that caused NULL dereference in the data path if 'goto chain' is used. Tested with: # ./tdc.py -c gact Fixes: db50514f9a9c ("net: sched: ad

Re: [PATCH bpf-next v2] bpf: make LWTUNNEL_BPF dependent on INET

2019-02-15 Thread Randy Dunlap
On 2/15/19 9:51 AM, Peter Oskolkov wrote: > Lightweight tunnels are L3 constructs that are used with IP/IP6. > > For example, lwtunnel_xmit is called from ip_output.c and > ip6_output.c only. > > Make the dependency explicit at least for LWT-BPF, as now they > call into IP routing. > > V2: added

[PATCH net-next v2 5/9] net: dsa: Add setter for SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

2019-02-15 Thread Florian Fainelli
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, add support for a function that processes the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS and SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attributes and returns not supported for any flag set, since DSA does not currently support toggling

[PATCH net-next v2 1/9] Documentation: networking: switchdev: Update port parent ID section

2019-02-15 Thread Florian Fainelli
Update the section about switchdev drivers having to implement a switchdev_port_attr_get() function to return SWITCHDEV_ATTR_ID_PORT_PARENT_ID since that is no longer valid after commit bccb30254a4a ("net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID"). Fixes: bccb30254a4a ("net: Get rid of SWITCHD

[PATCH net-next v2 0/9] net: Get rid of switchdev_port_attr_get()

2019-02-15 Thread Florian Fainelli
Hi all, This patch series splits the removal of the switchdev_ops that was proposed a few times before and first tackles the easy part which is the removal of the single call to switchdev_port_attr_get() within the bridge code. As suggestd by Ido, this patch series adds a SWITCHDEV_ATTR_ID_PORT_P

[PATCH net-next v2 2/9] net: switchdev: Add PORT_PRE_BRIDGE_FLAGS

2019-02-15 Thread Florian Fainelli
In preparation for removing switchdev_port_attr_get(), introduce PORT_PRE_BRIDGE_FLAGS which will be called through switchdev_port_attr_set(), in the caller's context (possibly atomic) and which must be checked by the switchdev driver in order to return whether the operation is supported or not. T

[PATCH net-next v2 3/9] mlxsw: spectrum: Handle PORT_PRE_BRIDGE_FLAGS

2019-02-15 Thread Florian Fainelli
In preparation for getting rid of switchdev_port_attr_get(), have mlxsw check for the bridge flags being set through switchdev_port_attr_set() when the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attribute identifier is used. Signed-off-by: Florian Fainelli --- .../mellanox/mlxsw/spectrum_switchdev.

[PATCH net-next v2 6/9] rocker: Check Handle PORT_PRE_BRIDGE_FLAGS

2019-02-15 Thread Florian Fainelli
In preparation for getting rid of switchdev_port_attr_get(), have rocker check for the bridge flags being set through switchdev_port_attr_set() with the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attribute identifier. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker/rocker_main.c | 5

[PATCH net-next v2 4/9] staging: fsl-dpaa2: ethsw: Handle PORT_PRE_BRIDGE_FLAGS

2019-02-15 Thread Florian Fainelli
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, handle the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attribute and check that the bridge port flags being configured are supported. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 17

[PATCH net-next v2 7/9] net: bridge: Stop calling switchdev_port_attr_get()

2019-02-15 Thread Florian Fainelli
Now that all switchdev drivers have been converted to check the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS flags and report flags that they do not support accordingly, we can migrate the bridge code to try to set that attribute first, check the results and then do the actual setting. Signed-off-by: F

[PATCH net-next v2 8/9] net: Remove SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT

2019-02-15 Thread Florian Fainelli
Now that we have converted the bridge code and the drivers to check for bridge port(s) flags at the time we try to set them, there is no need for a get() -> set() sequence anymore and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT therefore becomes unused. Reviewed-by: Ido Schimmel Signed-off-by: Fl

[PATCH net-next v2 9/9] net: Get rid of switchdev_port_attr_get()

2019-02-15 Thread Florian Fainelli
With the bridge no longer calling switchdev_port_attr_get() to obtain the supported bridge port flags from a driver but instead trying to set the bridge port flags directly and relying on driver to reject unsupported configurations, we can effectively get rid of switchdev_port_attr_get() entirely s

Re: [PATCH net-next 06/12] net: sched: flower: handle concurrent mask insertion

2019-02-15 Thread Stefano Brivio
On Thu, 14 Feb 2019 09:47:06 +0200 Vlad Buslov wrote: > @@ -1327,19 +1330,36 @@ static int fl_check_assign_mask(struct cls_fl_head > *head, > int ret = 0; > > rcu_read_lock(); > - fnew->mask = rhashtable_lookup_fast(&head->ht, mask, mask_ht_params); > + > + /* Insert mask a

Re: [rdma-rc PATCH 0/2] iw_cxgb4: Adjust the cq/qp mask

2019-02-15 Thread Jason Gunthorpe
On Thu, Feb 14, 2019 at 05:40:52PM +0530, Raju Rangoju wrote: > Export the LLD sge_host_page_size field to ULDs via > cxgb4_lld_info, so that iw_cxgb4 can adjust the cq/qp > mask based on no.of bar2 pages in a host page. > > This series has both net(cxgb4) and rdma(iw_cxgb4) changes, > and I would

Re: Three questions about busy poll

2019-02-15 Thread Willem de Bruijn
> > > 2. Why there is no socket option for sysctl.net.busy_poll? Clearly > > > sysctl_net_busy_poll is global and SO_BUSY_POLL only works for > > > sysctl.net.busy_read. > > > > I guess because of how sock_poll works. In that case it is not needed. > > The poll duration applies more to the pollset

[net PATCH 2/2] net: Do not allocate page fragments that are not skb aligned

2019-02-15 Thread Alexander Duyck
From: Alexander Duyck This patch addresses the fact that there are drivers, specifically tun, that will call into the network page fragment allocators with buffer sizes that are not cache aligned. Doing this could result in data alignment and DMA performance issues as these fragment pools are als

[net PATCH 1/2] mm: Use fixed constant in page_frag_alloc instead of size + 1

2019-02-15 Thread Alexander Duyck
From: Alexander Duyck This patch replaces the size + 1 value introduced with the recent fix for 1 byte allocs with a constant value. The idea here is to reduce code overhead as the previous logic would have to read size into a register, then increment it, and write it back to whatever field was

[net PATCH 0/2] Address recent issues found in netdev page_frag_alloc usage

2019-02-15 Thread Alexander Duyck
This patch set addresses a couple of issues that I had pointed out to Jann Horn in response to a recent patch submission. The first issue is that I wanted to avoid the need to read/modify/write the size value in order to generate the value for pagecnt_bias. Instead we can just use a fixed constant

Re: [PATCH net-next 11/12] net: sched: flower: track rtnl lock state

2019-02-15 Thread Stefano Brivio
On Thu, 14 Feb 2019 09:47:11 +0200 Vlad Buslov wrote: > static int fl_hw_replace_filter(struct tcf_proto *tp, > - struct cls_fl_filter *f, > + struct cls_fl_filter *f, bool rtnl_held, > struct netlink_ext_ack *

Re: [PATCH net-next v4 07/17] net: sched: protect filter_chain list with filter_chain_lock mutex

2019-02-15 Thread Cong Wang
On Mon, Feb 11, 2019 at 12:56 AM Vlad Buslov wrote: > +#ifdef CONFIG_PROVE_LOCKING > +static inline bool lockdep_tcf_chain_is_locked(struct tcf_chain *chain) > +{ > + return lockdep_is_held(&chain->filter_chain_lock); > +} > +#else > +static inline bool lockdep_tcf_chain_is_locked(struct tcf

Re: [RFC v1 12/19] RDMA/irdma: Implement device supported verb APIs

2019-02-15 Thread Jason Gunthorpe
On Fri, Feb 15, 2019 at 04:19:02PM -0600, Shiraz Saleem wrote: > On Fri, Feb 15, 2019 at 10:35:39AM -0700, Jason Gunthorpe wrote: > > On Fri, Feb 15, 2019 at 11:10:59AM -0600, Shiraz Saleem wrote: > > > [..] > > > > + */ > > > +int irdma_register_rdma_device(struct irdma_device *iwdev) > > > +{ >

Re: [PATCH net-next v4 05/17] net: sched: traverse chains in block with tcf_get_next_chain()

2019-02-15 Thread Cong Wang
(Sorry for joining this late.) On Mon, Feb 11, 2019 at 12:56 AM Vlad Buslov wrote: > @@ -2432,7 +2474,11 @@ static int tc_dump_chain(struct sk_buff *skb, struct > netlink_callback *cb) > index_start = cb->args[0]; > index = 0; > > - list_for_each_entry(chain, &block->chain_

Re: [RFC v1 12/19] RDMA/irdma: Implement device supported verb APIs

2019-02-15 Thread Shiraz Saleem
On Fri, Feb 15, 2019 at 10:35:39AM -0700, Jason Gunthorpe wrote: > On Fri, Feb 15, 2019 at 11:10:59AM -0600, Shiraz Saleem wrote: > [..] > > + */ > > +int irdma_register_rdma_device(struct irdma_device *iwdev) > > +{ > > + int ret; > > + struct irdma_ib_device *iwibdev; > > + > > + ret = ird

Re: [PATCH net-next] net/ipv6: prefer rcu_access_pointer() over rcu_dereference()

2019-02-15 Thread David Ahern
On 2/15/19 10:15 AM, Paolo Abeni wrote: > rt6_cache_allowed_for_pmtu() checks for rt->from presence, but > it does not access the RCU protected pointer. We can use > rcu_access_pointer() and clean-up the code a bit. No functional > changes intended. > > Signed-off-by: Paolo Abeni > --- > net/ipv

[PATCH v3 perf,bpf 09/11] perf-top: add option --no-bpf-event

2019-02-15 Thread Song Liu
bpf events should be tracked by default for perf-top. This patch makes it on by default, and adds option to disable bpf events. Signed-off-by: Song Liu --- tools/perf/builtin-top.c | 3 +++ tools/perf/util/top.h| 1 + 2 files changed, 4 insertions(+) diff --git a/tools/perf/builtin-top.c b/

[PATCH v3 perf,bpf 03/11] bpf: bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()

2019-02-15 Thread Song Liu
This patches uses bpf_program__get_prog_info_linear() to simplify the logic in prog.c do_dump(). Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Song Liu --- tools/bpf/bpftool/prog.c | 266 +-- 1 file changed, 59 insertions(+), 207 deletions(-) di

Re: [RESEND PATCH net] mm: page_alloc: fix ref bias in page_frag_alloc() for 1-byte allocs

2019-02-15 Thread Jann Horn
On Fri, Feb 15, 2019 at 7:35 PM Alexander Duyck wrote: > On Fri, Feb 15, 2019 at 6:10 AM Jann Horn wrote: > > On Thu, Feb 14, 2019 at 11:21 PM David Miller wrote: > > > From: Jann Horn > > > Date: Thu, 14 Feb 2019 22:26:22 +0100 > > > > > > > On Thu, Feb 14, 2019 at 6:13 PM David Miller > > >

Re: [PATCH net] vhost: correctly check the return value of translate_desc() in log_used()

2019-02-15 Thread Michael S. Tsirkin
On Fri, Feb 15, 2019 at 03:53:24PM +0800, Jason Wang wrote: > When fail, translate_desc() returns negative value, otherwise the > number of iovs. So we should fail when the return value is negative > instead of a blindly check against zero. > > Reported-by: Stephen Hemminger > Fixes: cc5e71075947

[PATCH v3 perf,bpf 11/11] perf, bpf: save information about short living bpf programs

2019-02-15 Thread Song Liu
To annotate bpf programs in perf, it is necessary to save information in bpf_prog_info and btf. For short living bpf program, it is necessary to save these information before it is unloaded. This patch saves these information in a separate thread. This thread creates its own evlist, that only trac

Re: [PATCH v2 perf,bpf 08/11] perf, bpf: save btf information as headers to perf.data

2019-02-15 Thread Song Liu
> On Feb 15, 2019, at 10:20 AM, Arnaldo Carvalho de Melo > wrote: > > Em Fri, Feb 15, 2019 at 05:47:58PM +, Song Liu escreveu: >> >> >>> On Feb 15, 2019, at 9:40 AM, Arnaldo Carvalho de Melo >>> wrote: >>> >>> Em Fri, Feb 15, 2019 at 05:25:01PM +, Song Liu escreveu: > On Feb

  1   2   3   4   >