[PATCH] brcmfmac: stop watchdog before detach and free everything

2018-05-28 Thread Michael Trimarchi
Watchdog need to be stopped in brcmf_sdio_remove to avoid i The system is going down NOW! [ 1348.110759] Unable to handle kernel NULL pointer dereference at virtual address 02f8 Sent SIGTERM to all processes [ 1348.121412] Mem abort info: [ 1348.126962] ESR = 0x9604 [ 1348.130023] Exce

Re: 4.16 issue with mbim modem and ping with size > 14552 bytes

2018-05-28 Thread Daniele Palmas
2018-05-25 0:54 GMT+02:00 Daniele Palmas : > Hi Greg, > > 2018-05-24 17:53 GMT+02:00 Greg KH : >> On Thu, May 24, 2018 at 05:04:49PM +0200, Daniele Palmas wrote: >>> Hello, >>> >>> I have an issue with an USB mbim modem when trying to send with ping >>> more than 14552 bytes: it looks like to me a

Re: 4.16 issue with mbim modem and ping with size > 14552 bytes

2018-05-28 Thread Greg KH
On Mon, May 28, 2018 at 09:58:01AM +0200, Daniele Palmas wrote: > 2018-05-25 0:54 GMT+02:00 Daniele Palmas : > > Hi Greg, > > > > 2018-05-24 17:53 GMT+02:00 Greg KH : > >> On Thu, May 24, 2018 at 05:04:49PM +0200, Daniele Palmas wrote: > >>> Hello, > >>> > >>> I have an issue with an USB mbim modem

Re: [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs

2018-05-28 Thread Petr Machata
Vivien Didelot writes: > Hi Petr, > > Petr Machata writes: > >> Vivien Didelot writes: >> + } else { + err = br_switchdev_port_obj_add(dev, v->vid, flags); + if (err && err != -EOPNOTSUPP) + goto out; } >>> >>> Except that br_switc

Re: [PATCH net] mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG

2018-05-28 Thread Petr Machata
Ido Schimmel writes: > On Mon, May 28, 2018 at 05:55:58AM +0200, Andrew Lunn wrote: >> > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c >> > b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c >> > index ca38a30fbe91..adc6ab2cf429 100644 >> > --- a/drivers/net/ethernet/mellanox/mlxsw/s

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

2018-05-28 Thread Christoph Hellwig
On Mon, May 28, 2018 at 08:23:35AM +0200, Thomas Gleixner wrote: > > > They remove the commandline switch before having the replacement in place > > > unless I'm misreading something. > > > > The command line switch to force 32-bit dma is removed without > > replacement. The PCI quirk for force

Re: [PATCH mlx5-next v1 02/13] net/mlx5: Export flow counter related API

2018-05-28 Thread Or Gerlitz
On Sun, May 27, 2018 at 1:23 PM, Leon Romanovsky wrote: > From: Raed Salem > > Exports counters API to be used in both IB and EN. > > Reviewed-by: Yishai Hadas > Signed-off-by: Raed Salem > Signed-off-by: Leon Romanovsky > --- > drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 23 > -

Re: [PATCH 7/7] x86: switch the VIA 32-bit DMA quirk to use the struct device flag

2018-05-28 Thread Thomas Gleixner
On Mon, 28 May 2018, Christoph Hellwig wrote: > On Mon, May 28, 2018 at 08:23:35AM +0200, Thomas Gleixner wrote: > > > > They remove the commandline switch before having the replacement in > > > > place > > > > unless I'm misreading something. > > > > > > The command line switch to force 32-bit d

Re: [PATCH] net: qmi_wwan: Add Netgear Aircard 779S

2018-05-28 Thread Bjørn Mork
Josh Hill writes: > Add support for Netgear Aircard 779S > > Signed-off-by: Josh Hill Acked-by: Bjørn Mork Please queue this for stable too. Thanks. Bjørn

Unable to create ip alias on bridge interface

2018-05-28 Thread Akshat Kakkar
I am having a bridge named br0 having ports eno1 and eno2 as members. I have given IP to br0 as 10.10.10.1/24 Now I want to create alias on br0 as br0:1 and give IP as 10.10.10.2/24, but I am unable to. I know, we can add multiple IPs to br0 using "ip addr" command, but I dont want to do it that

Re: [PATCH v4 net-next 00/19] inet: frags: bring rhashtables to IP defrag

2018-05-28 Thread Tariq Toukan
On 01/04/2018 6:25 AM, David Miller wrote: From: Eric Dumazet Date: Sat, 31 Mar 2018 12:58:41 -0700 IP defrag processing is one of the remaining problematic layer in linux. It uses static hash tables of 1024 buckets, and up to 128 items per bucket. A work queue is supposed to garbage colle

Re: STMMAC driver with TSO enabled issue

2018-05-28 Thread Bhadram Varka
Hi Jose, On 5/25/2018 8:02 PM, Jose Abreu wrote: On 25-05-2018 15:25, Bhadram Varka wrote: Hi Jose, On 5/25/2018 7:35 PM, Jose Abreu wrote: Hi Bhadram, On 25-05-2018 05:41, Bhadram Varka wrote: Hi Jose, On 5/24/2018 3:01 PM, Jose Abreu wrote: Hi Bhadram, On 24-05-2018 06:58, Bhadram Vark

[PATCH net-next] netfilter: fix null-ptr-deref in nf_nat_decode_session

2018-05-28 Thread Prashant Bhole
Add null check for nat_hook in nf_nat_decode_session() [ 195.648098] UBSAN: Undefined behaviour in ./include/linux/netfilter.h:348:14 [ 195.651366] BUG: KASAN: null-ptr-deref in __xfrm_policy_check+0x208/0x1d70 [ 195.653888] member access within null pointer of type 'struct nf_nat_hook' [ 195.

Re: [PATCH mlx5-next v1 02/13] net/mlx5: Export flow counter related API

2018-05-28 Thread Leon Romanovsky
On Mon, May 28, 2018 at 11:34:18AM +0300, Or Gerlitz wrote: > On Sun, May 27, 2018 at 1:23 PM, Leon Romanovsky wrote: > > From: Raed Salem > > > > Exports counters API to be used in both IB and EN. > > > > Reviewed-by: Yishai Hadas > > Signed-off-by: Raed Salem > > Signed-off-by: Leon Romanovsk

Re: [PATCH 3/6] ravb: remove custom .set_link_ksettings from ethtool ops

2018-05-28 Thread Vladimir Zapolskiy
Hello Sergei, On 05/26/2018 10:50 PM, Sergei Shtylyov wrote: > On 05/24/2018 02:11 PM, Vladimir Zapolskiy wrote: > >> The change replaces a custom implementation of .set_link_ksettings >> callback with a shared phy_ethtool_set_link_ksettings(), this fixes >> sleep in atomic context bug, which is

Re: [PATCH] brcmfmac: stop watchdog before detach and free everything

2018-05-28 Thread Arend van Spriel
On 5/28/2018 9:50 AM, Michael Trimarchi wrote: Watchdog need to be stopped in brcmf_sdio_remove to avoid i The system is going down NOW! [ 1348.110759] Unable to handle kernel NULL pointer dereference at virtual address 02f8 Sent SIGTERM to all processes [ 1348.121412] Mem abort info: [ 1348

Re: [PATCH] brcmfmac: stop watchdog before detach and free everything

2018-05-28 Thread Michael Nazzareno Trimarchi
Hi Arend On Mon, May 28, 2018 at 11:51 AM, Arend van Spriel wrote: > On 5/28/2018 9:50 AM, Michael Trimarchi wrote: >> >> Watchdog need to be stopped in brcmf_sdio_remove to avoid >> i >> The system is going down NOW! >> [ 1348.110759] Unable to handle kernel NULL pointer dereference at virtual >

[PATCH net-next v2 5/7] staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index c723a04..a

Re: STMMAC driver with TSO enabled issue

2018-05-28 Thread Jose Abreu
Hi Bhadram, On 28-05-2018 10:15, Bhadram Varka wrote: > Hi Jose, > > On 5/25/2018 8:02 PM, Jose Abreu wrote: >> On 25-05-2018 15:25, Bhadram Varka wrote: >>> Hi Jose, >>> >>> On 5/25/2018 7:35 PM, Jose Abreu wrote: Hi Bhadram, On 25-05-2018 05:41, Bhadram Varka wrote: > Hi Jose,

Re: [PATCH net-next] netfilter: fix null-ptr-deref in nf_nat_decode_session

2018-05-28 Thread Florian Westphal
Prashant Bhole wrote: > Add null check for nat_hook in nf_nat_decode_session() Acked-by: Florian Westphal

[PATCH net-next v2 6/7] net: bridge: Notify about bridge VLANs

2018-05-28 Thread Petr Machata
A driver might need to react to changes in settings of brentry VLANs. Therefore send switchdev port notifications for these as well. Reuse SWITCHDEV_OBJ_ID_PORT_VLAN for this purpose. Listeners should use netif_is_bridge_master() on orig_dev to determine whether the notification is about a bridge p

[PATCH net-next v2 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare

2018-05-28 Thread Petr Machata
Since there's no special support for the bridge events, the driver returns -EOPNOTSUPP, and thus the commit never happens. Therefore schedule respin during the prepare stage: there's no real difference one way or another. This fixes the problem that mirror-to-gretap offload wouldn't adapt to chang

[PATCH net-next v2 3/7] rocker: rocker_main: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata --- drivers/net/ethernet/rocker/rocker_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c index e73e

[PATCH net-next v2 4/7] dsa: port: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata Reviewed-by: Vivien Didelot --- net/dsa/port.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/port.c index 2413beb..ed05954 100644 --- a/net/dsa/port.c +++ b/net/ds

[PATCH net-next v2 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.

[PATCH net-next v2 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-28 Thread Petr Machata
A call to switchdev_port_obj_add() or switchdev_port_obj_del() involves initializing a struct switchdev_obj_port_vlan, a piece of code that repeats on each call site almost verbatim. While in the current codebase there is just one duplicated add call, the follow-up patches add more of both add and

[PATCH net-next v2 0/7] net: bridge: Notify about bridge VLANs

2018-05-28 Thread Petr Machata
In commit 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap mirror"), mlxsw got support for offloading mirror-to-gretap such that the underlay packet path involves a bridge. In that case, the offload is also influenced by PVID setting of said bridge. However, changes to VLAN configuratio

Re: [RFC net-next 0/4] net: sched: support replay of filter offload when binding to block

2018-05-28 Thread Or Gerlitz
On Fri, May 25, 2018 at 5:25 AM, Jakub Kicinski wrote: > This series from John adds the ability to replay filter offload requests > when new offload callback is being registered on a TC block. This is most > likely to take place for shared blocks today, when a block which already > has rules is b

Re: [PATCH net-next v2 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-28 Thread Petr Machata
Petr Machata writes: > diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h > index 11520ed..33bd914 100644 > --- a/net/bridge/br_private.h > +++ b/net/bridge/br_private.h > @@ -1178,6 +1178,9 @@ static inline void br_switchdev_frame_unmark(struct > sk_buff *skb) > } > #endif /* CONF

[PATCH v2 net] tun: Fix NULL pointer dereference in XDP redirect

2018-05-28 Thread Toshiaki Makita
Calling XDP redirection requires bh disabled. Softirq can call another XDP function and redirection functions, then the percpu static variable ri->map can be overwritten to NULL. This is a generic XDP case called from tun. [ 3535.736058] BUG: unable to handle kernel NULL pointer dereference at 0

Re: [PATCH v3 03/11] net: sched: implement unlocked action init API

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:21PM CEST, vla...@mellanox.com wrote: >Add additional 'rtnl_held' argument to act API init functions. It is >required to implement actions that need to release rtnl lock before loading >kernel module and reacquire if afterwards. > >Signed-off-by: Vlad Buslov Signed-off-

Re: [PATCH v3 04/11] net: sched: always take reference to action

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:22PM CEST, vla...@mellanox.com wrote: >Without rtnl lock protection it is no longer safe to use pointer to tc >action without holding reference to it. (it can be destroyed concurrently) > >Remove unsafe action idr lookup function. Instead of it, implement safe tcf >idr ch

Re: [PATCH v3 05/11] net: sched: implement action API that deletes action by index

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:23PM CEST, vla...@mellanox.com wrote: >Implement new action API function that atomically finds and deletes action >from idr by index. Intended to be used by lockless actions that do not rely >on rtnl lock. > >Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko

Re: [PATCH v3 06/11] net: sched: add 'delete' function to action ops

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:24PM CEST, vla...@mellanox.com wrote: >Extend action ops with 'delete' function. Each action type to implements >its own delete function that doesn't depend on rtnl lock. > >Implement delete function that is required to delete actions without >holding rtnl lock. Use actio

[PATCH net-next v16 5/8] sch_cake: Add NAT awareness to packet classifier

2018-05-28 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack me

[PATCH net-next v16 8/8] sch_cake: Conditionally split GSO segments

2018-05-28 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on ban

[PATCH net-next v16 2/8] sch_cake: Add ingress mode

2018-05-28 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to alway

Re: [PATCH v3 08/11] net: sched: don't release reference on action overwrite

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:26PM CEST, vla...@mellanox.com wrote: >Return from action init function with reference to action taken, >even when overwriting existing action. > >Action init API initializes its fourth argument (pointer to pointer to tc >action) to either existing action with same index

[PATCH net-next v16 0/8] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-28 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most d

[PATCH net-next v16 4/8] netfilter: Add nf_ct_get_tuple_skb callback

2018-05-28 Thread Toke Høiland-Jørgensen
This adds a callback to netfilter to extract a conntrack tuple from an skb that works before the _nfct skb field has been initialised (e.g., in an ingress qdisc). The tuple is copied to the caller to avoid issues with reference counting. The callback will return false when conntrack is not loaded,

[PATCH net-next v16 6/8] sch_cake: Add DiffServ handling

2018-05-28 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple, three-tier

[PATCH net-next v16 3/8] sch_cake: Add optional ACK filter

2018-05-28 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs capab

[PATCH net-next v16 7/8] sch_cake: Add overhead compensation support to the rate shaper

2018-05-28 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature is

[PATCH net-next v16 1/8] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-28 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth 20

Re: [PATCH 1/5] ptp: rework gianfar_ptp as QorIQ common PTP driver

2018-05-28 Thread Richard Cochran
On Fri, May 25, 2018 at 12:40:34PM +0800, Yangbo Lu wrote: > gianfar_ptp was the PTP clock driver for 1588 timer > module of Freescale QorIQ eTSEC (Enhanced Three-Speed > Ethernet Controllers) platforms. Actually QorIQ DPAA > (Data Path Acceleration Architecture) platforms is > also using the same

Re: [PATCH v3 07/11] net: sched: implement reference counted action release

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:25PM CEST, vla...@mellanox.com wrote: >Implement helper delete function that uses new action ops 'delete', instead >of destroying action directly. This is required so act API could delete >actions by index, without holding any references to action that is being >deleted.

possible deadlock in bpf_tcp_close

2018-05-28 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:7a1a98c171ea Merge branch 'bpf-sendmsg-hook' git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=10fd82d780 kernel config: https://syzkaller.appspot.com/x/.config?x=e4078980b886800c dashboard link: ht

Re: possible deadlock in bpf_tcp_close

2018-05-28 Thread Daniel Borkmann
[ +John ] On 05/28/2018 04:47 PM, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:    7a1a98c171ea Merge branch 'bpf-sendmsg-hook' > git tree:   bpf-next > console output: https://syzkaller.appspot.com/x/log.txt?x=10fd82d780 > kernel config:  https://syzka

Re: [PATCH v4 net-next 00/19] inet: frags: bring rhashtables to IP defrag

2018-05-28 Thread Alexander Aring
Hi, On Mon, May 28, 2018 at 12:12:42PM +0300, Tariq Toukan wrote: > > > On 01/04/2018 6:25 AM, David Miller wrote: > > From: Eric Dumazet > > Date: Sat, 31 Mar 2018 12:58:41 -0700 > > > > > IP defrag processing is one of the remaining problematic layer in linux. > > > > > > It uses static has

Re: [PATCH v3 09/11] net: sched: use reference counting action init

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:27PM CEST, vla...@mellanox.com wrote: >Change action API to assume that action init function always takes >reference to action, even when overwriting existing action. This is >necessary because action API continues to use action pointer after init >function is done. At th

[PATCH net-next v3 0/7] net: bridge: Notify about bridge VLANs

2018-05-28 Thread Petr Machata
In commit 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap mirror"), mlxsw got support for offloading mirror-to-gretap such that the underlay packet path involves a bridge. In that case, the offload is also influenced by PVID setting of said bridge. However, changes to VLAN configuratio

[PATCH net-next v3 4/7] dsa: port: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata Reviewed-by: Vivien Didelot --- net/dsa/port.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/port.c index 2413beb..ed05954 100644 --- a/net/dsa/port.c +++ b/net/ds

[PATCH net-next v3 5/7] staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index c723a04..a

[PATCH net-next v3 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.

[PATCH net-next v3 6/7] net: bridge: Notify about bridge VLANs

2018-05-28 Thread Petr Machata
A driver might need to react to changes in settings of brentry VLANs. Therefore send switchdev port notifications for these as well. Reuse SWITCHDEV_OBJ_ID_PORT_VLAN for this purpose. Listeners should use netif_is_bridge_master() on orig_dev to determine whether the notification is about a bridge p

[PATCH net-next v3 3/7] rocker: rocker_main: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata --- drivers/net/ethernet/rocker/rocker_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c index e73e

[PATCH net-next v3 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-28 Thread Petr Machata
A call to switchdev_port_obj_add() or switchdev_port_obj_del() involves initializing a struct switchdev_obj_port_vlan, a piece of code that repeats on each call site almost verbatim. While in the current codebase there is just one duplicated add call, the follow-up patches add more of both add and

[PATCH net-next v3 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare

2018-05-28 Thread Petr Machata
Since there's no special support for the bridge events, the driver returns -EOPNOTSUPP, and thus the commit never happens. Therefore schedule respin during the prepare stage: there's no real difference one way or another. This fixes the problem that mirror-to-gretap offload wouldn't adapt to chang

Re: [bpf-next PATCH] bpf: sockhash fix race with bpf_tcp_close and map delete

2018-05-28 Thread John Fastabend
On 05/27/2018 03:36 PM, Daniel Borkmann wrote: > On 05/25/2018 07:37 PM, John Fastabend wrote: >> syzbot reported two related splats, a use after free and null >> pointer dereference, when a TCP socket is closed while the map is >> also being removed. >> >> The psock keeps a reference to all map sl

Re: [PATCH v3 10/11] net: sched: atomically check-allocate action

2018-05-28 Thread Jiri Pirko
Sun, May 27, 2018 at 11:17:28PM CEST, vla...@mellanox.com wrote: >Implement function that atomically checks if action exists and either takes >reference to it, or allocates idr slot for action index to prevent >concurrent allocations of actions with same index. Use EBUSY error pointer >to indicate

Re: [PATCH] brcmfmac: stop watchdog before detach and free everything

2018-05-28 Thread Andy Shevchenko
On Mon, May 28, 2018 at 12:54 PM, Michael Nazzareno Trimarchi wrote: > Hi Arend > > On Mon, May 28, 2018 at 11:51 AM, Arend van Spriel > wrote: >> On 5/28/2018 9:50 AM, Michael Trimarchi wrote: >>> >>> Watchdog need to be stopped in brcmf_sdio_remove to avoid >>> i >>> The system is going down NO

Re: [PATCH] brcmfmac: stop watchdog before detach and free everything

2018-05-28 Thread Michael Nazzareno Trimarchi
Hi On Mon, May 28, 2018 at 5:25 PM, Andy Shevchenko wrote: > On Mon, May 28, 2018 at 12:54 PM, Michael Nazzareno Trimarchi > wrote: >> Hi Arend >> >> On Mon, May 28, 2018 at 11:51 AM, Arend van Spriel >> wrote: >>> On 5/28/2018 9:50 AM, Michael Trimarchi wrote: Watchdog need to be sto

Re: [PATCH] brcmfmac: stop watchdog before detach and free everything

2018-05-28 Thread Michael Nazzareno Trimarchi
Hi Andy The problem seems really easy to solve: diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 412a05b..ba60b151 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/br

[PATCH] [net-next, wrong] make BPFILTER_UMH depend on X86

2018-05-28 Thread Arnd Bergmann
When build testing across architectures, I run into a build error on all targets other than X86: gcc-8.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objdump: net/bpfilter/bpfilter_umh: File format not recognized gcc-8.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy:net/bpfilter/bp

[PATCH v3 net-next 1/2] tcp: use data length instead of skb->len in tcp_probe

2018-05-28 Thread Yafang Shao
At this point skb->len is including tcp header length, so it is meaningless to user. data length could be more helpful, with which we can easily filter out the packet without payload. Cc: Eric Dumazet Acked-by: Song Liu Signed-off-by: Yafang Shao --- v3: tcp_hdr() is a little expensive than sk

[PATCH v3 net-next 2/2] tcp: minor optimization around tcp_hdr() usage in tcp receive path

2018-05-28 Thread Yafang Shao
This is additional to the commit ea1627c20c34 ("tcp: minor optimizations around tcp_hdr() usage"). At this point, skb->data is same with tcp_hdr() as tcp header has not been pulled yet. Cc: Eric Dumazet Signed-off-by: Yafang Shao --- net/ipv4/tcp_ipv4.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- 2 fi

Re: [PATCH v2 net-next] net:sched: add action inheritdsfield to skbedit

2018-05-28 Thread Marcelo Ricardo Leitner
On Mon, May 28, 2018 at 05:40:18AM +, Fu, Qiaobin wrote: > The new action inheritdsfield copies the field DS of > IPv4 and IPv6 packets into skb->priority. This enables > later classification of packets based on the DS field. > > Original idea by Jamal Hadi Salim > > Signed-off-by: Qiaobin F

[PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Petr Machata
Callers of br_fdb_find() need to hold the hash lock, which br_fdb_find_port() doesn't do. Add the missing lock/unlock pair. Signed-off-by: Petr Machata --- net/bridge/br_fdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index b19e310..3f5691a 1

Re: [bpf-next PATCH] bpf: sockhash fix race with bpf_tcp_close and map delete

2018-05-28 Thread Daniel Borkmann
On 05/28/2018 05:13 PM, John Fastabend wrote: > On 05/27/2018 03:36 PM, Daniel Borkmann wrote: >> On 05/25/2018 07:37 PM, John Fastabend wrote: >>> syzbot reported two related splats, a use after free and null >>> pointer dereference, when a TCP socket is closed while the map is >>> also being remo

Re: [PATCH net-next 05/14] nfp: abm: add simple RED offload

2018-05-28 Thread Nogah Frankel
On 26-May-18 7:53 AM, Jakub Kicinski wrote: Offload simple RED configurations. For now support only DCTCP like scenarios where min and max are the same. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/abm/main.c | 82 +++ drivers/net/ethernet/netronome/n

[PATCH, net-next] net: ethernet: freescale: fix false-positive string overflow warning

2018-05-28 Thread Arnd Bergmann
While compile-testing on arm64 with gcc-8.1, I ran into a build diagnostic: drivers/net/ethernet/freescale/fec_main.c: In function 'fec_probe': drivers/net/ethernet/freescale/fec_main.c:3517:25: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow

[PATCH] net: davinci: fix building davinci mdio code without CONFIG_OF

2018-05-28 Thread Arnd Bergmann
Test-building this driver on targets without CONFIG_OF revealed a build failure: drivers/net/ethernet/ti/davinci_mdio.c: In function 'davinci_mdio_probe': drivers/net/ethernet/ti/davinci_mdio.c:380:9: error: implicit declaration of function 'davinci_mdio_probe_dt'; did you mean 'davinci_mdio_prob

Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Nikolay Aleksandrov
On 28/05/18 18:44, Petr Machata wrote: > Callers of br_fdb_find() need to hold the hash lock, which > br_fdb_find_port() doesn't do. Add the missing lock/unlock > pair. > > Signed-off-by: Petr Machata > --- > net/bridge/br_fdb.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/bri

Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Nikolay Aleksandrov
On 28/05/18 18:52, Nikolay Aleksandrov wrote: > On 28/05/18 18:44, Petr Machata wrote: >> Callers of br_fdb_find() need to hold the hash lock, which >> br_fdb_find_port() doesn't do. Add the missing lock/unlock >> pair. >> >> Signed-off-by: Petr Machata >> --- >> net/bridge/br_fdb.c | 2 ++ >> 1

Re: Unable to create ip alias on bridge interface

2018-05-28 Thread Michal Kubecek
On Mon, May 28, 2018 at 02:35:41PM +0530, Akshat Kakkar wrote: > I am having a bridge named br0 having ports eno1 and eno2 as members. > I have given IP to br0 as 10.10.10.1/24 > > Now I want to create alias on br0 as br0:1 and give IP as > 10.10.10.2/24, but I am unable to. > > I know, we can ad

Re: [PATCH v2 net-next] net:sched: add action inheritdsfield to skbedit

2018-05-28 Thread Jamal Hadi Salim
On 28/05/18 11:42 AM, Marcelo Ricardo Leitner wrote: On Mon, May 28, 2018 at 05:40:18AM +, Fu, Qiaobin wrote: The new action inheritdsfield copies the field DS of IPv4 and IPv6 packets into skb->priority. This enables later classification of packets based on the DS field. Original idea by J

Re: [PATCH] net: sched: split tc_ctl_tfilter into three handlers

2018-05-28 Thread Jamal Hadi Salim
On 27/05/18 03:55 PM, Vlad Buslov wrote: tc_ctl_tfilter handles three netlink message types: RTM_NEWTFILTER, RTM_DELTFILTER, RTM_GETTFILTER. However, implementation of this function involves a lot of branching on specific message type because most of the code is message-specific. This significant

Re: [PATCH] net: sched: split tc_ctl_tfilter into three handlers

2018-05-28 Thread Jamal Hadi Salim
On 28/05/18 12:02 PM, Jamal Hadi Salim wrote: On 27/05/18 03:55 PM, Vlad Buslov wrote: tc_ctl_tfilter handles three netlink message types: RTM_NEWTFILTER, RTM_DELTFILTER, RTM_GETTFILTER. However, implementation of this function involves a lot of branching on specific message type because most of

Re: [PATCH v4 net-next 00/19] inet: frags: bring rhashtables to IP defrag

2018-05-28 Thread Eric Dumazet
On 05/28/2018 07:52 AM, Alexander Aring wrote: > as somebody who had similar issues with this patch series I can tell you > about what happened for the 6LoWPAN fragmentation. > > The issue sounds similar, but there is too much missing information here > to say something about if you have exactl

Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format

2018-05-28 Thread Jason Gunthorpe
On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote: > From: Yonatan Cohen > > The new mini-CQE format includes the stride index, byte count and > packet checksum. > Stride index is needed for striding WQ feature. > This patch exposes this capability and enables its setting > via mlx5

Re: Is it possible to get device information via CMSG?

2018-05-28 Thread Michal Kubecek
On Sat, May 26, 2018 at 05:39:12AM -0400, Eric S. Raymond wrote: > I'm trying to untangle some nasty code in the Mills implementation of > NTP. I could simplify it a lot if there were a way to query a packet > to find out the name of the network interface it arrived on. (At the > moment the code

Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Petr Machata
Nikolay Aleksandrov writes: > Fixes: 4d4fd36126d6 ("net: bridge: Publish bridge accessor functions") Correct. Thanks, Petr

Re: [PATCH v3 net-next 2/2] tcp: minor optimization around tcp_hdr() usage in tcp receive path

2018-05-28 Thread Eric Dumazet
On Mon, May 28, 2018 at 8:36 AM Yafang Shao wrote: > This is additional to the commit ea1627c20c34 ("tcp: minor optimizations around tcp_hdr() usage"). > At this point, skb->data is same with tcp_hdr() as tcp header has not > been pulled yet. > Cc: Eric Dumazet > Signed-off-by: Yafang Shao > -

[PATCH net] ixgbe: fix parsing of TC actions for HW offload

2018-05-28 Thread Ondřej Hlavatý
The previous code was optimistic, accepting the offload of whole action chain when there was a single known action (drop/redirect). This results in offloading a rule which should not be offloaded, because its behavior cannot be reproduced in the hardware. For example: $ tc filter add dev eno1 par

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-28 Thread Jason Gunthorpe
On Fri, May 25, 2018 at 05:32:52PM -0700, Greg Thelen wrote: > On Fri, May 25, 2018 at 2:32 PM Arnd Bergmann wrote: > > > Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends > > on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a > > link error when another

Re: [PATCH] IB: Revert "remove redundant INFINIBAND kconfig dependencies"

2018-05-28 Thread Jason Gunthorpe
On Fri, May 25, 2018 at 11:29:59PM +0200, Arnd Bergmann wrote: > Several subsystems depend on INFINIBAND_ADDR_TRANS, which in turn depends > on INFINIBAND. However, when with CONFIG_INIFIBAND=m, this leads to a > link error when another driver using it is built-in. The > INFINIBAND_ADDR_TRANS depen

Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format

2018-05-28 Thread Yishai Hadas
On 5/28/2018 7:11 PM, Jason Gunthorpe wrote: On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote: From: Yonatan Cohen The new mini-CQE format includes the stride index, byte count and packet checksum. Stride index is needed for striding WQ feature. This patch exposes this capabilit

Re: [PATCH rdma-next v1 11/13] IB/mlx5: Add flow counters binding support

2018-05-28 Thread Jason Gunthorpe
On Sun, May 27, 2018 at 01:23:44PM +0300, Leon Romanovsky wrote: > + if (!mcounters->hw_cntrs_hndl) { > + mcounters->hw_cntrs_hndl = > + (void > *)mlx5_fc_create(to_mdev(ibcounters->device)->mdev, > +false); No unnec

Re: possible deadlock in bpf_tcp_close

2018-05-28 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:7a1a98c171ea Merge branch 'bpf-sendmsg-hook' git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=149ae2b780 kernel config: https://syzkaller.appspot.com/x/.config?x=e4078980b886800c dashb

Re: [PATCH rdma-next 3/3] IB/mlx5: Introduce a new mini-CQE format

2018-05-28 Thread Jason Gunthorpe
On Mon, May 28, 2018 at 07:52:03PM +0300, Yishai Hadas wrote: > On 5/28/2018 7:11 PM, Jason Gunthorpe wrote: > >On Sun, May 27, 2018 at 01:42:34PM +0300, Leon Romanovsky wrote: > >>From: Yonatan Cohen > >> > >>The new mini-CQE format includes the stride index, byte count and > >>packet checksum. >

Re: [PATCH net-next] net: bridge: Lock before br_fdb_find()

2018-05-28 Thread Stephen Hemminger
On Mon, 28 May 2018 17:44:16 +0200 Petr Machata wrote: > Callers of br_fdb_find() need to hold the hash lock, which > br_fdb_find_port() doesn't do. Add the missing lock/unlock > pair. > > Signed-off-by: Petr Machata > --- > net/bridge/br_fdb.c | 2 ++ > 1 file changed, 2 insertions(+) > > di

Re: [PATCH net] net: sched: check netif_xmit_frozen_or_stopped() in sch_direct_xmit()

2018-05-28 Thread Song Liu
> On May 26, 2018, at 12:43 PM, John Fastabend wrote: > > On 05/25/2018 12:46 PM, Song Liu wrote: >> On Fri, May 25, 2018 at 11:11 AM, Song Liu wrote: >>> Summary: >>> >>> At the end of sch_direct_xmit(), we are in the else path of >>> !dev_xmit_complete(ret), which means ret == NETDEV_TX_OK

Re: INFO: rcu detected stall in is_bpf_text_address

2018-05-28 Thread Marcelo Ricardo Leitner
On Sun, May 20, 2018 at 04:26:03PM +0800, Xin Long wrote: > On Sat, May 19, 2018 at 11:57 PM, Eric Dumazet wrote: > > SCTP experts, please take a look. > > > > On 05/19/2018 08:55 AM, syzbot wrote: > >> Hello, > >> > >> syzbot found the following crash on: > >> > >> HEAD commit:73fcb1a370c7 Me

Re: Unable to create ip alias on bridge interface

2018-05-28 Thread Akshat Kakkar
Thanks for clarifying that first ip will be used as primary ip. I have 2 further queries on this. 1. How can this survive across reboots without having a custom script on boot up? Like some ifcfg file,etc. 2. is there a way to tell to make a given ip as primary, irrespective of order? On Mon, May

Re: [PATCH 0/4 RFCv2] Realtek SMI RTL836x DSA driver

2018-05-28 Thread Andrew Lunn
On Mon, May 28, 2018 at 07:47:48PM +0200, Linus Walleij wrote: > This is a second RFC version of the DSA driver for Realtek > RTL8366x especially RTL8366RB. > > I've been beating my head against this one and I'm not really > clear on why my ethernet frames are not coming through to the > CPU port

Re: [PATCH 2/4 RFCv2] net: dsa: Add bindings for Realtek SMI DSAs

2018-05-28 Thread Andrew Lunn
> +Examples: > + > +switch { > + compatible = "realtek,rtl8366rb"; > + /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */ > + mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; > + mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; > + reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; > +

Re: [PATCH net] sctp: not allow to set rto_min with a value below 200 msecs

2018-05-28 Thread Marcelo Ricardo Leitner
On Sun, May 27, 2018 at 10:58:35AM +0200, Michael Tuexen wrote: ... > >>> Patch looks fine, you probably want to note this hard minimum in man(7) > >>> sctp as > >>> well > >>> > >> I'm aware of some signalling networks which use RTO.min of smaller values > >> than 200ms. > >> So could this be r

[PATCH 4/4 RFCv2] ARM: dts: Add ethernet and switch to D-Link DIR-685

2018-05-28 Thread Linus Walleij
This adds the Ethernet and Realtek switch device to the D-Link DIR-685 Gemini-based device. Signed-off-by: Linus Walleij --- ChangeLog RFCv1->RFCv2 - Rebased, use the new DT bindings --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 153 - 1 file changed, 152 insertions(+), 1

[PATCH 1/4 RFCv2] net: phy: realtek: Support RTL8366RB variant

2018-05-28 Thread Linus Walleij
The RTL8366RB is an ASIC with five internal PHYs for LAN0..LAN3 and WAN. The PHYs are spawn off the main device so they can be handled in a distributed manner by the Realtek PHY driver. All that is really needed is the power save feature enablement and letting the PHY driver core pick up the IRQ fr

[PATCH 0/4 RFCv2] Realtek SMI RTL836x DSA driver

2018-05-28 Thread Linus Walleij
This is a second RFC version of the DSA driver for Realtek RTL8366x especially RTL8366RB. I've been beating my head against this one and I'm not really clear on why my ethernet frames are not coming through to the CPU port on the chip. It appears when using ethtool -S on the ports that packets ar

  1   2   3   >