[GIT] Networking

2017-09-22 Thread David Miller
1) Fix NAPI poll list corruption in enic driver, from Christian Lamparter. 2) Fix route use after free, from Eric Dumazet. 3) Fix regression in reuseaddr handling, from Josef Bacik. 4) Assert the size of control messages in compat handling since we copy it in from userspace twice. From M

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-22 Thread Y Song
On Fri, Sep 22, 2017 at 9:23 AM, Edward Cree wrote: > On 22/09/17 16:16, Alexei Starovoitov wrote: >> looks like we're converging on >> "be16/be32/be64/le16/le32/le64 #register" for BPF_END. >> I guess it can live with that. I would prefer more C like syntax >> to match the rest, but llvm parsing

Re: pull-request: ieee802154 2017-09-20

2017-09-22 Thread David Miller
From: Stefan Schmidt Date: Thu, 21 Sep 2017 22:56:07 +0200 > Here comes a pull request for ieee802154 changes I have queued up for > this merge window. > > Normally these have been coming through the bluetooth tree but as this > three have been falling through the cracks so far and I have to rev

Re: [PATCH net-next v2 0/4] cxgb4: add support to offload tc flower

2017-09-22 Thread David Miller
From: Rahul Lakkireddy Date: Thu, 21 Sep 2017 23:41:12 +0530 > This series of patches add support to offload tc flower onto Chelsio > NICs. > > Patch 1 adds basic skeleton to prepare for offloading tc flower flows. > > Patch 2 adds support to add/remove flows for offload. Flows can have > acco

Re: [PATCH] net: use 32-bit arithmetic while allocating net device

2017-09-22 Thread David Miller
From: Alexey Dobriyan Date: Thu, 21 Sep 2017 23:33:29 +0300 > Private part of allocation is never big enough to warrant size_t. > > Space savings: > > add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10) > function old new delta > all

Re: [PATCH net-next v2] net: Remove useless function skb_header_release

2017-09-22 Thread David Miller
From: gfree.w...@vip.163.com Date: Fri, 22 Sep 2017 10:25:22 +0800 > From: Gao Feng > > There is no one which would invokes the function skb_header_release. > So just remove it now. > > Signed-off-by: Gao Feng Applied, thanks.

Re: [PATCH 0/3] fix reuseaddr regression

2017-09-22 Thread David Miller
From: Josef Bacik Date: Fri, 22 Sep 2017 20:20:05 -0400 > I introduced a regression when reworking the fastreuse port stuff that allows > bind conflicts to occur once a reuseaddr successfully opens on an existing tb. > The root cause is I reversed an if statement which caused us to set the tb as

Re: [PATCH net v2] net: orphan frags on stand-alone ptype in dev_queue_xmit_nit

2017-09-22 Thread David Miller
From: Willem de Bruijn Date: Fri, 22 Sep 2017 19:42:37 -0400 > Zerocopy skbs frags are copied when the skb is looped to a local sock. > Commit 1080e512d44d ("net: orphan frags on receive") introduced calls > to skb_orphan_frags to deliver_skb and __netif_receive_skb for this. > > With msg_zeroco

Re: [PATCH] MAINTAINERS: update git tree locations for ieee802154 subsystem

2017-09-22 Thread David Miller
From: Stefan Schmidt Date: Fri, 22 Sep 2017 14:28:46 +0200 > Patches for ieee802154 will go through my new trees towards netdev from > now on. The 6LoWPAN subsystem will stay as is (shared between ieee802154 > and bluetooth) and go through the bluetooth tree as usual. > > Signed-off-by: Stefan S

Re: [PATCH] net: stmmac: Meet alignment requirements for DMA

2017-09-22 Thread David Miller
From: Matt Redfearn Date: Fri, 22 Sep 2017 12:13:53 +0100 > According to Documentation/DMA-API.txt: > Warnings: Memory coherency operates at a granularity called the cache > line width. In order for memory mapped by this API to operate > correctly, the mapped region must begin exactly on a c

Re: [PATCH 0/5] use setup_timer() helper function.

2017-09-22 Thread David Miller
From: Allen Pais Date: Fri, 22 Sep 2017 16:28:17 +0530 > This series uses setup_timer() helper function. The series > addresses the files under net/*. There was a recent change to the nfc code in net-next which causes your patches to not apply. Please repsin against net-next, thanks.

Re: tools: selftests: psock_tpacket: skip un-supported tpacket_v3 test

2017-09-22 Thread David Miller
From: Orson Zhai Date: Fri, 22 Sep 2017 18:17:17 +0800 > The TPACKET_V3 test of PACKET_TX_RING will fail with kernel version > lower than v4.11. Supported code of tx ring was add with commit id > <7f953ab2ba46: af_packet: TX_RING support for TPACKET_V3> at Jan. 3 > of 2017. > > So skip this item

Re: [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer

2017-09-22 Thread David Miller
From: Jason Wang Date: Fri, 22 Sep 2017 14:38:58 +0800 > We should set xdp_xmit only when xdp_do_redirect() succeed. > > Cc: John Fastabend > Signed-off-by: Jason Wang Applied, thanks Jason.

Re: [PATCH net-next 10/10] net: hns3: Add mqprio support when interacting with network stack

2017-09-22 Thread Yunsheng Lin
Hi, Jiri On 2017/9/23 0:03, Jiri Pirko wrote: > Fri, Sep 22, 2017 at 04:11:51PM CEST, linyunsh...@huawei.com wrote: >> Hi, Jiri >> - if (!tc) { + if (if_running) { + (void)hns3_nic_net_stop(netdev); + msleep(100); + } + + ret = (kinfo->dcb_ops && kinfo->dcb_ops->

[PATCH net-next] liquidio: pass date and time info to NIC firmware

2017-09-22 Thread Felix Manlunas
From: Veerasenareddy Burru Signed-off-by: Veerasenareddy Burru Signed-off-by: Manish Awasthi Signed-off-by: Felix Manlunas --- .../net/ethernet/cavium/liquidio/octeon_console.c | 28 +++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ca

Re: [PATCH 0/3] fix reuseaddr regression

2017-09-22 Thread Josef Bacik
On Tue, Sep 19, 2017 at 01:50:56PM -0700, David Miller wrote: > From: jo...@toxicpanda.com > Date: Mon, 18 Sep 2017 12:28:54 -0400 > > > I introduced a regression when reworking the fastreuse port stuff that > > allows > > bind conflicts to occur once a reuseaddr socket successfully opens on an >

[PATCH 1/3] net: set tb->fast_sk_family

2017-09-22 Thread Josef Bacik
From: Josef Bacik We need to set the tb->fast_sk_family properly so we can use the proper comparison function for all subsequent reuseport bind requests. Fixes: 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") Reported-and-tested-by: Cole Robinson Signed-off-by: Josef B

[PATCH 0/3] fix reuseaddr regression

2017-09-22 Thread Josef Bacik
I introduced a regression when reworking the fastreuse port stuff that allows bind conflicts to occur once a reuseaddr successfully opens on an existing tb. The root cause is I reversed an if statement which caused us to set the tb as if there were no owners on the socket if there were, which obvio

[PATCH 2/3] net: use inet6_rcv_saddr to compare sockets

2017-09-22 Thread Josef Bacik
From: Josef Bacik In ipv6_rcv_saddr_equal() we need to use inet6_rcv_saddr(sk) for the ipv6 compare with the fast socket information to make sure we're doing the proper comparisons. Fixes: 637bc8bbe6c0 ("inet: reset tb->fastreuseport when adding a reuseport sk") Reported-and-tested-by: Cole Robi

[PATCH 3/3] inet: fix improper empty comparison

2017-09-22 Thread Josef Bacik
From: Josef Bacik When doing my reuseport rework I screwed up and changed a if (hlist_empty(&tb->owners)) to if (!hlist_empty(&tb->owners)) This is obviously bad as all of the reuseport/reuse logic was reversed, which caused weird problems like allowing an ipv4 bind conflict if we opened an i

[PATCH net-next 2/3] liquidio: verify firmware version when auto-loaded from flash.

2017-09-22 Thread Felix Manlunas
From: Rick Farrington Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/

[PATCH net-next 3/3] liquidio: update module parameter fw_type to reflect firmware type loaded

2017-09-22 Thread Felix Manlunas
From: Rick Farrington Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquid

[PATCH net-next 1/3] liquidio: allow override of firmware present in flash

2017-09-22 Thread Felix Manlunas
From: Rick Farrington Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_main.c| 68 ++ .../net/ethernet/cavium/liquidio/liquidio_image.h | 1 + .../net/ethernet/cavium/liquidio/octeon_device.c | 11 +++- .../ne

[PATCH net-next 0/3] liquidio: firmware loading

2017-09-22 Thread Felix Manlunas
From: Rick Farrington 1. Allow host driver parameter to override auto-loaded firmware (in flash). 2. Verify version of firmware that is auto-loaded from flash. 3. Change value of fw_type module parameter to reflect default firmware image name that is loaded by host driver (in /sys/module/liqui

Re: [PATCH net v2] net: orphan frags on stand-alone ptype in dev_queue_xmit_nit

2017-09-22 Thread Eric Dumazet
On Fri, 2017-09-22 at 19:42 -0400, Willem de Bruijn wrote: > Zerocopy skbs frags are copied when the skb is looped to a local sock. > Commit 1080e512d44d ("net: orphan frags on receive") introduced calls > to skb_orphan_frags to deliver_skb and __netif_receive_skb for this. > > With msg_zerocopy,

[PATCH net v2] net: orphan frags on stand-alone ptype in dev_queue_xmit_nit

2017-09-22 Thread Willem de Bruijn
Zerocopy skbs frags are copied when the skb is looped to a local sock. Commit 1080e512d44d ("net: orphan frags on receive") introduced calls to skb_orphan_frags to deliver_skb and __netif_receive_skb for this. With msg_zerocopy, these skbs can also exist in the tx path and thus loop from dev_queue

Re: [PATCH net] net: orphan frags on stand-alone ptype in dev_queue_xmit_nit

2017-09-22 Thread Willem de Bruijn
On Fri, Sep 22, 2017 at 7:04 PM, Eric Dumazet wrote: > On Fri, 2017-09-22 at 18:51 -0400, Willem de Bruijn wrote: >> Zerocopy skbs frags are copied when the skb is looped to a local sock. >> Commit 1080e512d44d ("net: orphan frags on receive") introduced calls >> to skb_orphan_frags to deliver_skb

[PATCH net-next v3 0/2] net: dsa: port enabling

2017-09-22 Thread Vivien Didelot
This patchset makes slave open and close symmetrical and provides helpers for enabling or disabling a given DSA port. Changes in v3: - save the phy_device change for a future patchset Changes in v2: - do not remove the phy argument from port enable/disable Vivien Didelot (2): net: dsa: mak

[PATCH net-next v3 1/2] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Vivien Didelot
The DSA slave open function configures the unicast MAC addresses on the master device, enable the switch port, change its STP state, then start the PHY device. Make the close function symmetric, by first stopping the PHY device, then changing the STP state, disabling the switch port and restore th

[PATCH net-next v3 2/2] net: dsa: add port enable and disable helpers

2017-09-22 Thread Vivien Didelot
Provide dsa_port_enable and dsa_port_disable helpers to respectively enable and disable a switch port. This makes the dsa_port_set_state_now helper static. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/dsa_priv.h | 3 ++- net/dsa/port.c |

Re: [PATCH net] net: orphan frags on stand-alone ptype in dev_queue_xmit_nit

2017-09-22 Thread Eric Dumazet
On Fri, 2017-09-22 at 18:51 -0400, Willem de Bruijn wrote: > Zerocopy skbs frags are copied when the skb is looped to a local sock. > Commit 1080e512d44d ("net: orphan frags on receive") introduced calls > to skb_orphan_frags to deliver_skb and __netif_receive_skb. > > With msg_zerocopy, these skb

[PATCH net] net: orphan frags on stand-alone ptype in dev_queue_xmit_nit

2017-09-22 Thread Willem de Bruijn
Zerocopy skbs frags are copied when the skb is looped to a local sock. Commit 1080e512d44d ("net: orphan frags on receive") introduced calls to skb_orphan_frags to deliver_skb and __netif_receive_skb. With msg_zerocopy, these skbs can also exist in the tx path and thus loop from dev_queue_xmit_nit

[PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases

2017-09-22 Thread Haiyang Zhang
From: Haiyang Zhang For older hosts without multi-channel (vRSS) support, and some error cases, we still need to set the real number of queues to one. This patch adds this missing setting. Fixes: 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") Signed-off-by: Haiyang Zhang --- drivers/net/h

Re: [RFC PATCH 00/11] udp: full early demux for unconnected sockets

2017-09-22 Thread Eric Dumazet
On Fri, 2017-09-22 at 23:06 +0200, Paolo Abeni wrote: > This series refactor the UDP early demux code so that: > > * full socket lookup is performed for unicast packets > * a sk is grabbed even for unconnected socket match > * a dst cache is used even in such scenario > > To perform this tasks a

[PATCH v4 0/9] bring back stack frame warning with KASAN

2017-09-22 Thread Arnd Bergmann
This is a new version of patches I originally submitted back in March [1], and last time in June [2]. This time I have basically rewritten the entire patch series based on a new approach that came out of GCC PR81715 that I opened[3]. The upcoming gcc-8 release is now much better at consolidating st

[PATCH v4 1/9] brcmsmac: make some local variables 'static const' to reduce stack size

2017-09-22 Thread Arnd Bergmann
With KASAN and a couple of other patches applied, this driver is one of the few remaining ones that actually use more than 2048 bytes of kernel stack: broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy_gainctrl': broadcom/brcm80211/brcmsmac/phy/phy_n.c:16065:1: warning

[PATCH v4 8/9] netlink: fix nla_put_{u8,u16,u32} for KASAN

2017-09-22 Thread Arnd Bergmann
When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large stack frames in some functions. This goes unnoticed normally because CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN

[PATCH v4 2/9] brcmsmac: split up wlc_phy_workarounds_nphy

2017-09-22 Thread Arnd Bergmann
The stack consumption in this driver is still relatively high, with one remaining warning if the warning level is lowered to 1536 bytes: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: error: the frame size of 1880 bytes is larger than 1536 bytes [-Werror=frame-larger-than=

[PATCH v4 9/9] kasan: rework Kconfig settings

2017-09-22 Thread Arnd Bergmann
We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan-stack=1 options, which can easily cause an overflow of the kernel stack, e.g. drivers/gpu/drm/i915/gvt/handlers.c:2407:1: error: the frame size of 31216 bytes is larger than 20

[PATCH v4 7/9] rocker: fix rocker_tlv_put_* functions for KASAN

2017-09-22 Thread Arnd Bergmann
Inlining these functions creates lots of stack variables that each take 64 bytes when KASAN is enabled, leading to this warning about potential stack overflow: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_cmd_flow_tbl_add': drivers/net/ethernet/rocker/rocker_ofdpa.c:621:1: error

[PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-22 Thread Arnd Bergmann
With CONFIG_KASAN, the init function uses a large amount of kernel stack: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init.part.4': drivers/media/usb/em28xx/em28xx-dvb.c:2061:1: error: the frame size of 3232 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] It seems

[PATCH v4 3/9] brcmsmac: reindent split functions

2017-09-22 Thread Arnd Bergmann
In the previous commit I left the indentation alone to help reviewing the patch, this one now runs the three new functions through 'indent -kr -8' with some manual fixups to avoid silliness. No changes other than whitespace are intended here. Signed-off-by: Arnd Bergmann Acked-by: Arend van Spri

[PATCH v4 6/9] dvb-frontends: fix i2c access helpers for KASAN

2017-09-22 Thread Arnd Bergmann
A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with with CONFIG_KASAN on gcc-5/6/7: drivers/media/dvb-frontends/cxd2841er.c:3225:1: error: the frame size of 3992 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] drivers/medi

[PATCH v4 5/9] r820t: fix r820t_write_reg for KASAN

2017-09-22 Thread Arnd Bergmann
With CONFIG_KASAN, we get an overly long stack frame due to inlining the register access functions: drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7': drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

[RFC PATCH 07/11] ipv6/addrconf: add an helper for inet6 address lookup

2017-09-22 Thread Paolo Abeni
reduce code duplication and will simplify follow-up patch Signed-off-by: Paolo Abeni --- net/ipv6/addrconf.c | 65 + 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c2e2a78787ec..5

[RFC PATCH 01/11] net: add support for noref skb->sk

2017-09-22 Thread Paolo Abeni
Noref sk do not carry a socket refcount, are valid only inside the current RCU section and must be explicitly cleared before exiting such section. They will be used in a later patch to allow early demux without sock refcounting. Signed-off-by: Paolo Abeni --- include/linux/skbuff.h | 31 +++

[RFC PATCH 05/11] udp: perform full socket lookup in early demux

2017-09-22 Thread Paolo Abeni
Since UDP early demux lookup fetches noref socket references, we can safely be optimistic about it and set the sk reference even if the skb is not going to land on such socket, avoiding the rx dst cache usage for unconnected unicast sockets. This avoids a second lookup for unconnected sockets, and

[RFC PATCH 02/11] net: allow early demux to fetch noref socket

2017-09-22 Thread Paolo Abeni
We must be careful to avoid leaking such sockets outside the RCU section containing the early demux call; we clear them on nonlocal delivery. For ipv4 we clear sknoref even for multicast traffic entering the ip_mr_input() path; we will lose the mcast early demux optimization when the host is actin

[RFC PATCH 09/11] route: add ipv4/6 helpers to do partial route lookup vs local dst

2017-09-22 Thread Paolo Abeni
For ipv4 also implement the proper source address validation, even against martian addresses and return an error code accordingly. Will be used by later patches to perform dst lookup in early demux for unconnected sockets. Signed-off-by: Paolo Abeni --- include/net/ip6_route.h | 1 + include/n

[RFC PATCH 06/11] ip/route: factor out helper for local route creation

2017-09-22 Thread Paolo Abeni
Will be used by a later patch to build the ifaddr dst cache. No functional changes are introduced here. Signed-off-by: Paolo Abeni --- include/net/route.h | 2 ++ net/ipv4/route.c| 30 ++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/include/net

[RFC PATCH 08/11] net: implement local route cache inside ifaddr

2017-09-22 Thread Paolo Abeni
add storage and helpers to associate an ipv{4,6} address with the local route to self. This will be used by a later patch to implement early demux for unconnected UDP sockets. The caches are filled on address creation, with DST_OBSOLETE_NONE. Ipv6 cache are explicitly clearered and refreshed on un

[RFC PATCH 00/11] udp: full early demux for unconnected sockets

2017-09-22 Thread Paolo Abeni
This series refactor the UDP early demux code so that: * full socket lookup is performed for unicast packets * a sk is grabbed even for unconnected socket match * a dst cache is used even in such scenario To perform this tasks a couple of facilities are added: * noref socket references, scoped i

[RFC PATCH 03/11] udp: do not touch socket refcount in early demux

2017-09-22 Thread Paolo Abeni
use noref sockets instead. This gives some small performance improvements and will allow efficient early demux for unconnected sockets in a later patch. Signed-off-by: Paolo Abeni --- net/ipv4/udp.c | 18 ++ net/ipv6/udp.c | 10 ++ 2 files changed, 16 insertions(+), 12 de

[RFC PATCH 04/11] net: add simple socket-like dst cache helpers

2017-09-22 Thread Paolo Abeni
It will be used by later patches to reduce code duplication. Signed-off-by: Paolo Abeni --- include/net/dst.h | 20 net/core/dst.c| 12 2 files changed, 32 insertions(+) diff --git a/include/net/dst.h b/include/net/dst.h index 93568bd0a352..4fcca0e368c6 100

[PATCH,v3,net-next 2/2] tun: enable napi_gro_frags() for TUN/TAP driver

2017-09-22 Thread Petar Penkov
Add a TUN/TAP receive mode that exercises the napi_gro_frags() interface. This mode is available only in TAP mode, as the interface expects packets with Ethernet headers. Furthermore, packets follow the layout of the iovec_iter that was received. The first iovec is the linear data, and every one a

[PATCH,v3,net-next 1/2] tun: enable NAPI for TUN/TAP driver

2017-09-22 Thread Petar Penkov
Changes TUN driver to use napi_gro_receive() upon receiving packets rather than netif_rx_ni(). Adds flag IFF_NAPI that enables these changes and operation is not affected if the flag is disabled. SKBs are constructed upon packet arrival and are queued to be processed later. The new path was evalu

[PATCH,v3,net-next 0/2] Improve code coverage of syzkaller

2017-09-22 Thread Petar Penkov
This patch series is intended to improve code coverage of syzkaller on the early receive path, specifically including flow dissector, GRO, and GRO with frags parts of the networking stack. Syzkaller exercises the stack through the TUN driver and this is therefore where changes reside. Current cover

[PATCH] [for 4.14] net: qcom/emac: specify the correct size when mapping a DMA buffer

2017-09-22 Thread Timur Tabi
When mapping the RX DMA buffers, the driver was accidentally specifying zero for the buffer length. Under normal circumstances, SWIOTLB does not need to allocate a bounce buffer, so the address is just mapped without checking the size field. This is why the error was not detected earlier. Fixes:

Re: [PATCH net-next v2 1/3] net: dsa: use slave device phydev

2017-09-22 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > On 09/22/2017 12:40 PM, Vivien Didelot wrote: >> There is no need to store a phy_device in dsa_slave_priv since >> net_device already provides one. Simply s/p->phy/dev->phydev/. > > You can therefore remove the phy_device from dsa_slave_priv, see below > fo

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic

2017-09-22 Thread Andrew Lunn
> >I'm wondering how this is supposed to work. Please add a good comment > >here, since the hardware is forcing you to do something odd. > > > >Maybe it would be a good idea to save the STP state in chip. And then > >when chip->is_bridged is set true, change the state in the hardware to > >the sav

Re: [PATCH net-next v2 1/3] net: dsa: use slave device phydev

2017-09-22 Thread Andrew Lunn
On Fri, Sep 22, 2017 at 03:40:43PM -0400, Vivien Didelot wrote: > There is no need to store a phy_device in dsa_slave_priv since > net_device already provides one. Simply s/p->phy/dev->phydev/. > > While at it, return -ENODEV when it is NULL instead of -EOPNOTSUPP. I just did a quick poll for cal

Re: [PATCH net-next v2 1/3] net: dsa: use slave device phydev

2017-09-22 Thread Florian Fainelli
On 09/22/2017 12:40 PM, Vivien Didelot wrote: > There is no need to store a phy_device in dsa_slave_priv since > net_device already provides one. Simply s/p->phy/dev->phydev/. You can therefore remove the phy_device from dsa_slave_priv, see below for more comments. I will have to regress test the

[PATCH net-next v2 2/3] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Vivien Didelot
The DSA slave open function configures the unicast MAC addresses on the master device, enable the switch port, change its STP state, then start the PHY device. Make the close function symmetric, by first stopping the PHY device, then changing the STP state, disabling the switch port and restore th

[PATCH net-next v2 3/3] net: dsa: add port enable and disable helpers

2017-09-22 Thread Vivien Didelot
Provide dsa_port_enable and dsa_port_disable helpers to respectively enable and disable a switch port. This makes the dsa_port_set_state_now helper static. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- net/dsa/dsa_priv.h | 3 ++- net/dsa/port.c |

[PATCH net-next v2 0/3] net: dsa: use slave device phydev

2017-09-22 Thread Vivien Didelot
This patchset removes the private phy_device in favor of the one provided by the slave net_device, makes slave open and close symmetrical and finally provides helpers for enabling or disabling a DSA port. Changes in v2: - do not remove the phy argument from port enable/disable Vivien Didelot (3

[PATCH net-next v2 1/3] net: dsa: use slave device phydev

2017-09-22 Thread Vivien Didelot
There is no need to store a phy_device in dsa_slave_priv since net_device already provides one. Simply s/p->phy/dev->phydev/. While at it, return -ENODEV when it is NULL instead of -EOPNOTSUPP. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 126 ++---

Re: [PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Andrew Lunn
> Historical reasons mostly. Considering the complexity of > dsa_slave_phy_setup(), I would certainly be extremely careful in > changing any of this, the potential for breakage is pretty big. Yes, i took a look at this, wondering how to convert to phylink. I went away and got a stiff drink :-)

[PATCH] r8152: add Linksys USB3GIGV1 id

2017-09-22 Thread Grant Grundler
This Linksys dongle by default comes up in cdc_ether mode. This patch allows r8152 to claim the device: Bus 002 Device 002: ID 13b1:0041 Linksys Signed-off-by: Grant Grundler --- drivers/net/usb/r8152.c | 2 ++ 1 file changed, 2 insertions(+) This was tested on chromeos-3.14, chromeos-3.18,

Re: [PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Florian Fainelli
On 09/22/2017 11:12 AM, Vivien Didelot wrote: > Hi Florian, > > Florian Fainelli writes: > >> On 09/22/2017 09:17 AM, Vivien Didelot wrote: >>> The .port_enable and .port_disable functions are meant to deal with the >>> switch ports only, and no driver is using the phy argument anyway. >>> Remov

Re: [PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > On 09/22/2017 09:17 AM, Vivien Didelot wrote: >> The .port_enable and .port_disable functions are meant to deal with the >> switch ports only, and no driver is using the phy argument anyway. >> Remove it. > > I don't think this makes sense, there are perfec

Re: [PATCH,v2,net-next 1/2] tun: enable NAPI for TUN/TAP driver

2017-09-22 Thread महेश बंडेवार
On Fri, Sep 22, 2017 at 11:03 AM, Willem de Bruijn wrote: > On Fri, Sep 22, 2017 at 1:11 PM, Mahesh Bandewar (महेश बंडेवार) > wrote: >>> #ifdef CONFIG_TUN_VNET_CROSS_LE >>> static inline bool tun_legacy_is_little_endian(struct tun_struct *tun) >>> { >>> @@ -541,6 +604,11 @@ static void __tun_d

Re: [Intel-wired-lan] [PATCH][V3] e1000: avoid null pointer dereference on invalid stat type

2017-09-22 Thread Alexander Duyck
On Fri, Sep 22, 2017 at 10:13 AM, Colin King wrote: > From: Colin Ian King > > Currently if the stat type is invalid then data[i] is being set > either by dereferencing a null pointer p, or it is reading from > an incorrect previous location if we had a valid stat type > previously. Fix this by

Re: [PATCH,v2,net-next 1/2] tun: enable NAPI for TUN/TAP driver

2017-09-22 Thread Willem de Bruijn
On Fri, Sep 22, 2017 at 1:11 PM, Mahesh Bandewar (महेश बंडेवार) wrote: >> #ifdef CONFIG_TUN_VNET_CROSS_LE >> static inline bool tun_legacy_is_little_endian(struct tun_struct *tun) >> { >> @@ -541,6 +604,11 @@ static void __tun_detach(struct tun_file *tfile, bool >> clean) >> >> tun = r

Re: [PATCH] Add a driver for Renesas uPD60620 and uPD60620A PHYs

2017-09-22 Thread Andrew Lunn
On Fri, Sep 22, 2017 at 05:08:45PM +, Bernd Edlinger wrote: > Signed-off-by: Bernd Edlinger > --- > drivers/net/phy/Kconfig| 5 + > drivers/net/phy/Makefile | 1 + > drivers/net/phy/uPD60620.c | 226 > + > 3 files changed, 232 inserti

Re: [PATCH,v2,net-next 2/2] tun: enable napi_gro_frags() for TUN/TAP driver

2017-09-22 Thread Willem de Bruijn
On Fri, Sep 22, 2017 at 1:48 PM, Petar Penkov wrote: > On Fri, Sep 22, 2017 at 9:51 AM, Mahesh Bandewar (महेश बंडेवार) > wrote: >> On Fri, Sep 22, 2017 at 7:06 AM, Willem de Bruijn >> wrote: @@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq

Re: [PATCH,v2,net-next 2/2] tun: enable napi_gro_frags() for TUN/TAP driver

2017-09-22 Thread Petar Penkov
On Fri, Sep 22, 2017 at 9:51 AM, Mahesh Bandewar (महेश बंडेवार) wrote: > On Fri, Sep 22, 2017 at 7:06 AM, Willem de Bruijn > wrote: >>> @@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file >>> *file, struct ifreq *ifr) >>> if (tfile->detached) >>> ret

Re: [PATCH net-next 4/4] net: dsa: add port enable and disable helpers

2017-09-22 Thread Florian Fainelli
On 09/22/2017 09:17 AM, Vivien Didelot wrote: > Provide dsa_port_enable and dsa_port_disable helpers to respectively > enable and disable a switch port. This makes the dsa_port_set_state_now > helper static. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Florian Fainelli
On 09/22/2017 09:17 AM, Vivien Didelot wrote: > The .port_enable and .port_disable functions are meant to deal with the > switch ports only, and no driver is using the phy argument anyway. > Remove it. I don't think this makes sense, there are perfectly legit reasons why a switch driver may have s

Re: [PATCH net-next 3/4] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Florian Fainelli
On 09/22/2017 09:17 AM, Vivien Didelot wrote: > The DSA slave open function configures the unicast MAC addresses on the > master device, enable the switch port, change its STP state, then start > the PHY device. > > Make the close function symmetric, by first stopping the PHY device, > then changi

[PATCH][V3] e1000: avoid null pointer dereference on invalid stat type

2017-09-22 Thread Colin King
From: Colin Ian King Currently if the stat type is invalid then data[i] is being set either by dereferencing a null pointer p, or it is reading from an incorrect previous location if we had a valid stat type previously. Fix this by skipping over the read of p on an invalid stat type. Detected b

Re: [PATCH,v2,net-next 1/2] tun: enable NAPI for TUN/TAP driver

2017-09-22 Thread महेश बंडेवार
> #ifdef CONFIG_TUN_VNET_CROSS_LE > static inline bool tun_legacy_is_little_endian(struct tun_struct *tun) > { > @@ -541,6 +604,11 @@ static void __tun_detach(struct tun_file *tfile, bool > clean) > > tun = rtnl_dereference(tfile->tun); > > + if (tun && clean) { > +

Re: [PATCH iproute2 v2] man: fix documentation for range of route table ID

2017-09-22 Thread Stephen Hemminger
On Fri, 22 Sep 2017 13:28:54 +0200 Thomas Haller wrote: > Signed-off-by: Thomas Haller > --- > Changes in v2: > - "0" is not a valid table ID. > > man/man8/ip-route.8.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in

[PATCH] Add a driver for Renesas uPD60620 and uPD60620A PHYs

2017-09-22 Thread Bernd Edlinger
Signed-off-by: Bernd Edlinger --- drivers/net/phy/Kconfig| 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/uPD60620.c | 226 + 3 files changed, 232 insertions(+) create mode 100644 drivers/net/phy/uPD60620.c diff --git a/drivers/n

Re: [PATCH iproute2 master 0/2] BPF/XDP json follow-up

2017-09-22 Thread Stephen Hemminger
On Thu, 21 Sep 2017 10:42:27 +0200 Daniel Borkmann wrote: > After merging net-next branch into master, Stephen asked to > fix up json dump for XDP as there were some merge conflicts, > so here it is. > > Thanks! > > Daniel Borkmann (2): > json: move json printer to common library > bpf: pro

usb/wireless/rsi_91x: use-after-free write in __run_timers

2017-09-22 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 6e80ecdddf4ea6f3cd84e83720f3d852e6624a68 (Sep 21). == BUG: KASAN: use-after-free in __run_timers+0xc0e/0xd40 Write of size 8 at addr 880069f701

Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core

2017-09-22 Thread Florian Fainelli
On 09/22/2017 09:32 AM, Andrew Lunn wrote: > On Fri, Sep 22, 2017 at 12:17:50PM -0400, Vivien Didelot wrote: >> bcm_sf2 is currently the only driver using the phy argument passed to >> .port_enable. It resets the state machine if the phy has been hard >> reset. This check is generic and can be move

Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core

2017-09-22 Thread Florian Fainelli
On 09/22/2017 09:17 AM, Vivien Didelot wrote: > bcm_sf2 is currently the only driver using the phy argument passed to > .port_enable. It resets the state machine if the phy has been hard > reset. This check is generic and can be moved to DSA core. This is completely specific to bcm_sf2 because it

Re: [PATCH] brcm80211: make const array ucode_ofdm_rates static, reduces object code size

2017-09-22 Thread Arend van Spriel
Please use 'brcmsmac:' as prefix instead of 'brcm80211:'. On 22-09-17 16:03, Colin King wrote: From: Colin Ian King Don't populate const array ucode_ofdm_rates on the stack, instead make it static. Makes the object code smaller by 100 bytes: Before: text data bss dec

Re: [PATCH,v2,net-next 2/2] tun: enable napi_gro_frags() for TUN/TAP driver

2017-09-22 Thread महेश बंडेवार
On Fri, Sep 22, 2017 at 7:06 AM, Willem de Bruijn wrote: >> @@ -2061,6 +2174,9 @@ static int tun_set_iff(struct net *net, struct file >> *file, struct ifreq *ifr) >> if (tfile->detached) >> return -EINVAL; >> >> + if ((ifr->ifr_flags & IFF_NAPI_FRAGS) && !capable(CAP

Re: [Intel-wired-lan] [PATCH] i40e: make const array patterns static, reduces object code size

2017-09-22 Thread Jesse Brandeburg
On Fri, 22 Sep 2017 15:11:38 +0100 Colin King wrote: > From: Colin Ian King > > Don't populate const array patterns on the stack, instead make it > static. Makes the object code smaller by over 60 bytes: > > Before: >text data bss dec hex filename >1953 4

Re: [PATCH net-next 4/4] net: dsa: add port enable and disable helpers

2017-09-22 Thread Andrew Lunn
On Fri, Sep 22, 2017 at 12:17:53PM -0400, Vivien Didelot wrote: > Provide dsa_port_enable and dsa_port_disable helpers to respectively > enable and disable a switch port. This makes the dsa_port_set_state_now > helper static. > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Andre

Re: [PATCH net-next 3/4] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Andrew Lunn
On Fri, Sep 22, 2017 at 12:17:52PM -0400, Vivien Didelot wrote: > The DSA slave open function configures the unicast MAC addresses on the > master device, enable the switch port, change its STP state, then start > the PHY device. > > Make the close function symmetric, by first stopping the PHY dev

Re: [PATCH net-next 1/4] net: dsa: move up phy enabling in core

2017-09-22 Thread Andrew Lunn
On Fri, Sep 22, 2017 at 12:17:50PM -0400, Vivien Didelot wrote: > bcm_sf2 is currently the only driver using the phy argument passed to > .port_enable. It resets the state machine if the phy has been hard > reset. This check is generic and can be moved to DSA core. > > dsa_port_set_state_no

Re: [PATCH net-next] bpf/verifier: improve disassembly of BPF_END instructions

2017-09-22 Thread Edward Cree
On 22/09/17 16:16, Alexei Starovoitov wrote: > looks like we're converging on > "be16/be32/be64/le16/le32/le64 #register" for BPF_END. > I guess it can live with that. I would prefer more C like syntax > to match the rest, but llvm parsing point is a strong one. Yep, agreed. I'll post a v2 once we

[PATCH net-next 1/4] net: dsa: move up phy enabling in core

2017-09-22 Thread Vivien Didelot
bcm_sf2 is currently the only driver using the phy argument passed to .port_enable. It resets the state machine if the phy has been hard reset. This check is generic and can be moved to DSA core. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 16 +--- net/dsa/slave.c

[PATCH net-next 2/4] net: dsa: remove phy arg from port enable/disable

2017-09-22 Thread Vivien Didelot
The .port_enable and .port_disable functions are meant to deal with the switch ports only, and no driver is using the phy argument anyway. Remove it. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 6 +++--- drivers/net/dsa/b53/b53_priv.h | 4 ++-- drivers/ne

[PATCH net-next 3/4] net: dsa: make slave close symmetrical to open

2017-09-22 Thread Vivien Didelot
The DSA slave open function configures the unicast MAC addresses on the master device, enable the switch port, change its STP state, then start the PHY device. Make the close function symmetric, by first stopping the PHY device, then changing the STP state, disabling the switch port and restore th

[PATCH net-next 0/4] net: dsa: simplify port enabling

2017-09-22 Thread Vivien Didelot
This patchset removes the unnecessary PHY device argument in port enable/disable switch operations, makes slave open and close symmetrical and finally provides helpers for enabling or disabling a DSA port. Vivien Didelot (4): net: dsa: move up phy enabling in core net: dsa: remove phy arg from

[PATCH net-next 4/4] net: dsa: add port enable and disable helpers

2017-09-22 Thread Vivien Didelot
Provide dsa_port_enable and dsa_port_disable helpers to respectively enable and disable a switch port. This makes the dsa_port_set_state_now helper static. Signed-off-by: Vivien Didelot --- net/dsa/dsa_priv.h | 3 ++- net/dsa/port.c | 31 ++- net/dsa/slave.c|

[PATCH] Switch to use the new hashtable implementation. This reduces the code and need for yet another hashtable implementation.

2017-09-22 Thread Aaron Wood
Signed-off-by: Aaron Wood --- net/9p/error.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/net/9p/error.c b/net/9p/error.c index 126fd0dceea2..2e966fcc5cbb 100644 --- a/net/9p/error.c +++ b/net/9p/error.c @@ -32,6 +32,7 @@ #include #include #inclu

  1   2   >