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 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

[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

[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

[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=]

[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

[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:

[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=]

[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:

[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

[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

[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

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

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

[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

[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

[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

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

[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.

[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

[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

[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 ---

[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

[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

[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 ---

[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,

[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

[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:

[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

[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

[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

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

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

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,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

[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

[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

[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

[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

[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

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

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Colin Ian King
On 22/09/17 11:03, Joe Perches wrote: > On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: >> >> On Thu, 21 Sep 2017, Colin King wrote: >> >>> From: Colin Ian King >>> >>> Don't populate const array ac_to_fifo on the stack in an inlined >>> function, instead make it

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Kalle Valo
Stanislaw Gruszka writes: > On Thu, Sep 21, 2017 at 11:56:30PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Don't populate const array ac_to_fifo on the stack in an inlined >> function, instead make it static. Makes the object code

[PATCH 3/5] net: af_packet: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/packet/af_packet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index

Re: [PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: > This patch introduces a helper which just increase the used idx. This > will be used in pair with vhost_prefetch_desc_indices() by batching > code. > > Signed-off-by: Jason Wang > --- > drivers/vhost/vhost.c | 33

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Stanislaw Gruszka
On Thu, Sep 21, 2017 at 11:56:30PM +0100, Colin King wrote: > From: Colin Ian King > > Don't populate const array ac_to_fifo on the stack in an inlined > function, instead make it static. Makes the object code smaller > by over 800 bytes: > >text data

Re: tg3 pxe weirdness

2017-09-22 Thread Siva Reddy Kallam
On Thu, Sep 21, 2017 at 7:53 PM, Berend De Schouwer wrote: > Hi, > > I've got a machine with a Broadcom bcm5762c, using the tg3 driver, that > fails to receive network packets under some very specific conditions. > > It works perfectly using a 1Gbps switch. If,

Re: [net-next 1/2] dummy: add device MTU validation check

2017-09-22 Thread Sabrina Dubroca
2017-09-21, 08:02:18 -0700, Eric Dumazet wrote: > On Thu, 2017-09-21 at 21:32 +0800, Zhang Shengju wrote: > > Currently, any mtu value can be assigned when adding a new dummy device: > > [~]# ip link add name dummy1 mtu 10 type dummy > > [~]# ip link show dummy1 > > 15: dummy1:

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index f87ec75..8424166d 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -2437,6 +2437,61 @@ struct vhost_msg_node *vhost_dequeue_msg(struct >

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Joe Perches
On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: > > On Thu, 21 Sep 2017, Colin King wrote: > > > From: Colin Ian King > > > > Don't populate const array ac_to_fifo on the stack in an inlined > > function, instead make it static. Makes the object code smaller >

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Joe Perches
On Fri, 2017-09-22 at 12:06 +0200, Julia Lawall wrote: > > On Fri, 22 Sep 2017, Colin Ian King wrote: > > > On 22/09/17 11:03, Joe Perches wrote: > > > On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: > > > > > > > > On Thu, 21 Sep 2017, Colin King wrote: > > > > > > > > > From: Colin

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Julia Lawall
On Fri, 22 Sep 2017, Joe Perches wrote: > On Fri, 2017-09-22 at 12:06 +0200, Julia Lawall wrote: > > > > On Fri, 22 Sep 2017, Colin Ian King wrote: > > > > > On 22/09/17 11:03, Joe Perches wrote: > > > > On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: > > > > > > > > > > On Thu, 21 Sep

Re: [net-next 1/2] dummy: add device MTU validation check

2017-09-22 Thread Eric Dumazet
On Fri, 2017-09-22 at 10:56 +0200, Sabrina Dubroca wrote: > 2017-09-21, 08:02:18 -0700, Eric Dumazet wrote: > > On Thu, 2017-09-21 at 21:32 +0800, Zhang Shengju wrote: > > > Currently, any mtu value can be assigned when adding a new dummy device: > > > [~]# ip link add name dummy1 mtu 10 type

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Julia Lawall
On Fri, 22 Sep 2017, Colin Ian King wrote: > On 22/09/17 11:03, Joe Perches wrote: > > On Fri, 2017-09-22 at 09:23 +0200, Julia Lawall wrote: > >> > >> On Thu, 21 Sep 2017, Colin King wrote: > >> > >>> From: Colin Ian King > >>> > >>> Don't populate const array

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

2017-09-22 Thread Orson Zhai
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 test instead of reporting failing for old kernels. Signed-off-by:

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

2017-09-22 Thread Allen Pais
This series uses setup_timer() helper function. The series addresses the files under net/*. Allen Pais (5): net: nfc: hci: use setup_timer() helper. net: nfc: hci: llc_shdlc: use setup_timer() helper. net: af_packet: use setup_timer() helper. net: nfc: core: use setup_timer() helper.

[PATCH 5/5] net: nfc: llcp_core: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/llcp_core.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index

[PATCH 4/5] net: nfc: core: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/nfc/core.c b/net/nfc/core.c index 5cf33df..e5e23c2

[PATCH 2/5] net: nfc: hci: llc_shdlc: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/hci/llc_shdlc.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/nfc/hci/llc_shdlc.c

[PATCH 1/5] net: nfc: hci: use setup_timer() helper.

2017-09-22 Thread Allen Pais
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/hci/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index

Re: [PATCH net-next] net: mvpp2: phylink support

2017-09-22 Thread Russell King - ARM Linux
On Thu, Sep 21, 2017 at 03:45:22PM +0200, Antoine Tenart wrote: > Convert the PPv2 driver to use phylink, which models the MAC to PHY > link. The phylink support is made such a way the GoP link IRQ can still > be used: the two modes are incompatible and the GoP link IRQ will be > used if no PHY is

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

2017-09-22 Thread Matt Redfearn
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 cache line boundary and end exactly on one (to prevent two

Re: [PATCH net-next] net: mvpp2: phylink support

2017-09-22 Thread Marcin Wojtas
Hi Antoine, You can add Tested-by: Marcin Wojtas Best regards, Marcin 2017-09-21 15:45 GMT+02:00 Antoine Tenart : > Convert the PPv2 driver to use phylink, which models the MAC to PHY > link. The phylink support is made such a way the GoP

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

2017-09-22 Thread Egil Hjelmeland
Den 21. sep. 2017 16:21, skrev Andrew Lunn: Hi Egil +static void lan9303_bridge_ports(struct lan9303 *chip) +{ + /* ports bridged: remove mirroring */ + lan9303_write_switch_reg(chip, LAN9303_SWE_PORT_MIRROR, 0); +} Could you replace the 0 with something symbolic which makes this

[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()

2017-09-22 Thread Jason Wang
This patch introduces a helper which just increase the used idx. This will be used in pair with vhost_prefetch_desc_indices() by batching code. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 33 + drivers/vhost/vhost.h | 1 + 2 files

[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-22 Thread Jason Wang
This patch introduces vhost_prefetch_desc_indices() which could batch descriptor indices fetching and used ring updating. This intends to reduce the cache misses of indices fetching and updating and reduce cache line bounce when virtqueue is almost full. copy_to_user() was used in order to benefit

Re: [PATCH 2/2] ip_tunnel: add mpls over gre encapsulation

2017-09-22 Thread Amine Kherbouche
On 09/22/2017 12:35 AM, Roopa Prabhu wrote: > diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c > index 36ea2ad..060ed07 100644 > --- a/net/mpls/af_mpls.c > +++ b/net/mpls/af_mpls.c > @@ -16,6 +16,7 @@ > #include > #include > #include > +#include > #include > #if

Re: linux-next: build failure after merge of the net-next tree

2017-09-22 Thread Paolo Abeni
On Thu, 2017-09-21 at 18:37 -0700, David Miller wrote: > From: Stephen Rothwell > Date: Fri, 22 Sep 2017 11:03:55 +1000 > > > After merging the net-next tree, today's linux-next build (arm > > multi_v7_defconfig) failed like this: > > > > net/ipv4/fib_frontend.c: In

Re: [PATCH] wireless: iwlegacy: make const array static to shink object code size Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit

2017-09-22 Thread Julia Lawall
On Thu, 21 Sep 2017, Colin King wrote: > From: Colin Ian King > > Don't populate const array ac_to_fifo on the stack in an inlined > function, instead make it static. Makes the object code smaller > by over 800 bytes: > >text data bss dec hex

[PATCH net-next RFC 4/5] vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH

2017-09-22 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 58585ec..c89640e 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -87,7 +87,7 @@ struct

Re: [patch net-next 07/12] mlxsw: spectrum: Add the multicast routing offloading logic

2017-09-22 Thread Yotam Gigi
On 09/21/2017 06:26 PM, Andrew Lunn wrote: >> +static void mlxsw_sp_mr_route_stats_update(struct mlxsw_sp *mlxsw_sp, >> + struct mlxsw_sp_mr_route *mr_route) >> +{ >> +struct mlxsw_sp_mr *mr = mlxsw_sp->mr; >> +u64 packets, bytes; >> + >> +if

Re: [PATCH net 1/4] net:ethernet:aquantia: Setup max_mtu in ndev to enable jumbo frames

2017-09-22 Thread Igor Russkikh
>> self->ndev->mtu = aq_nic_cfg->mtu - ETH_HLEN; >> +self->ndev->min_mtu = ETH_MIN_MTU; > This is not required. It will default to ETH_MIN_MTU. Thanks Andrew, true. >> +self->ndev->max_mtu = self->aq_hw_caps.mtu - ETH_FCS_LEN - ETH_HLEN; >> >> return 0; >> } >> @@ -695,7

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

2017-09-22 Thread Egil Hjelmeland
Den 21. sep. 2017 16:26, skrev Vivien Didelot: Hi Egil, Egil Hjelmeland writes: When both user ports are joined to the same bridge, the normal HW MAC learning is enabled. This means that unicast traffic is forwarded in HW. If one of the user ports leave the

Re: tg3 pxe weirdness

2017-09-22 Thread Berend De Schouwer
On Fri, 2017-09-22 at 11:51 +0530, Siva Reddy Kallam wrote: > On Thu, Sep 21, 2017 at 7:53 PM, Berend De Schouwer > wrote: > > Hi, > > > > I've got a machine with a Broadcom bcm5762c, using the tg3 driver, > > that > > fails to receive network packets under some

[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing

2017-09-22 Thread Jason Wang
This patch implements basic batched processing of tx virtqueue by prefetching desc indices and updating used ring in a batch. For non-zerocopy case, vq->heads were used for storing the prefetched indices and updating used ring. It is also a requirement for doing more batching on top. For zerocopy

[PATCH net-next RFC 0/5] batched tx processing in vhost_net

2017-09-22 Thread Jason Wang
Hi: This series tries to implement basic tx batched processing. This is done by prefetching descriptor indices and update used ring in a batch. This intends to speed up used ring updating and improve the cache utilization. Test shows about ~22% improvement in tx pss. Please review. Jason Wang

[PATCH net-next RFC 1/5] vhost: split out ring head fetching logic

2017-09-22 Thread Jason Wang
This patch splits out ring head fetching logic and leave the descriptor fetching and translation logic. This makes it is possible to batch fetching the descriptor indices. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 75

Re: [PATCH net-next RFC 1/5] vhost: split out ring head fetching logic

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:02:31PM +0800, Jason Wang wrote: > +/* This looks in the virtqueue and for the first available buffer, and > converts > + * it to an iovec for convenient access. Since descriptors consist of some > + * number of output then some number of input descriptors, it's

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

[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

[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

[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

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 &&

[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

[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

[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 ++

[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 ---

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

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.

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

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] 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. >

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

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,

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

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

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

[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

  1   2   >