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

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 function 'fib_validate_source

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

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 bridge, the ports goes back to the

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

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 very specific > > conditions. > >

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 link IRQ can still > be used: the two modes are incompat

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

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

[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 +-- drivers/vhost/

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

[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 changed, 34 insertions

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

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

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 IS_ENABLED(CONFIG_

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: mtu 10 qdis

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

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 bss dec hex filena

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 > > by over 800 bytes: > >

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 static. Makes the object c

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 ac_to_fifo on the stack in an inl

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

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 smaller >> by over 800 bytes: >> >>text

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 Ian

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 20

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

[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 b740fef..a8a6e78 100644 --- a/ne

[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 b/net/nfc/hci/llc_shdlc.c index 17e59a

[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 02eef5c..7988185 100644

[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 100644 --- a/net/nfc/core.c

[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 c261729..1d3e3ce 10064

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 d

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 separatel

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

2017-09-22 Thread Thomas Haller
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 index 803de3b9..705ceb20 100644 --- a/man/man8/ip-route.8.in +++ b/man/man8/

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

2017-09-22 Thread Dan Carpenter
On Thu, Sep 21, 2017 at 11:01:58PM +0100, Colin King wrote: > @@ -1837,12 +1838,13 @@ static void e1000_get_ethtool_stats(struct net_device > *netdev, > p = (char *)adapter + stat->stat_offset; > break; > default: > + p

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

2017-09-22 Thread Colin Ian King
On 22/09/17 12:50, Dan Carpenter wrote: > On Thu, Sep 21, 2017 at 11:01:58PM +0100, Colin King wrote: >> @@ -1837,12 +1838,13 @@ static void e1000_get_ethtool_stats(struct >> net_device *netdev, >> p = (char *)adapter + stat->stat_offset; >> break; >>

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

2017-09-22 Thread Sabrina Dubroca
2017-09-22, 04:05:09 -0700, Eric Dumazet wrote: > 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 devi

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

2017-09-22 Thread Stefan Schmidt
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 Schmidt --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 d

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

2017-09-22 Thread Jiri Pirko
Thu, Sep 21, 2017 at 01:21:53PM CEST, linyunsh...@huawei.com wrote: >When using tc qdisc to configure DCB parameter, dcb_ops->setup_tc >is used to tell hclge_dcb module to do the setup. >When using lldptool to configure DCB parameter, hclge_dcb module >call the client_ops->setup_tc to tell network

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 very specific > > conditions. > >

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

2017-09-22 Thread 张胜举
> -Original Message- > From: Sabrina Dubroca [mailto:s...@queasysnail.net] > Sent: 2017年9月22日 20:23 > To: Eric Dumazet > Cc: Jarod Wilson ; Zhang Shengju > ; da...@davemloft.net; > will...@google.com; step...@networkplumber.org; > netdev@vger.kernel.org > Subject: Re: [net-next 1/2] dummy:

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 very specific > > conditions. > >

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

2017-09-22 Thread Andrew Lunn
On Fri, Sep 22, 2017 at 11:36:59AM +0300, Yotam Gigi wrote: > 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

[PATCH net 1/2] l2tp: ensure sessions are freed after their PPPOL2TP socket

2017-09-22 Thread Guillaume Nault
If l2tp_tunnel_delete() or l2tp_tunnel_closeall() deletes a session right after pppol2tp_release() orphaned its socket, then the 'sock' variable of the pppol2tp_session_close() callback is NULL. Yet the session is still used by pppol2tp_release(). Therefore we need to take an extra reference in an

[PATCH net 2/2] l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall()

2017-09-22 Thread Guillaume Nault
There are several ways to remove L2TP sessions: * deleting a session explicitly using the netlink interface (with L2TP_CMD_SESSION_DELETE), * deleting the session's parent tunnel (either by closing the tunnel's file descriptor or using the netlink interface), * closing the PPPOL2TP f

[PATCH net 0/2] l2tp: fix some races in session deletion

2017-09-22 Thread Guillaume Nault
L2TP provides several interfaces for deleting sessions. Using two of them concurrently can lead to use-after-free bugs. Patch #2 uses a flag to prevent double removal of L2TP sessions. Patch #1 fixes a bug found in the way. Fixing this bug is also necessary for patch #2 to handle all cases. This

[PATCH][V2] 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 nullify pointer p if a stat type is invalid and only setting dat

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

2017-09-22 Thread Edward Cree
On 22/09/17 00:11, Y Song wrote: > On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree wrote: >> On 21/09/17 20:44, Alexei Starovoitov wrote: >>> On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: More intuitive, but agree on the from_be/le. Maybe we should just drop the "to_" pr

[PATCH v4 2/3] ipv4: Namespaceify tcp_fastopen_key knob

2017-09-22 Thread Haishuang Yan
Different namespace application might require different tcp_fastopen_key independently of the host. David Miller pointed out there is a leak without releasing the context of tcp_fastopen_key during netns teardown. So add the release action in exit_batch path. Tested: 1. Container namespace: # cat

[PATCH v4 3/3] ipv4: Namespaceify tcp_fastopen_blackhole_timeout knob

2017-09-22 Thread Haishuang Yan
Different namespace application might require different time period in second to disable Fastopen on active TCP sockets. Tested: Simulate following similar situation that the server's data gets dropped after 3WHS. C syn-data ---> S C <--- syn/ack - S C ack > S S (accept & wri

[PATCH v4 1/3] ipv4: Namespaceify tcp_fastopen knob

2017-09-22 Thread Haishuang Yan
Different namespace application might require enable TCP Fast Open feature independently of the host. This patch series continues making more of the TCP Fast Open related sysctl knobs be per net-namespace. Reported-by: Luca BRUNO Signed-off-by: Haishuang Yan --- Change since v4: * Fix potent

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

2017-09-22 Thread Colin King
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: textdata bss dec hex filename 39482 564 0 400469c6e phy_cmn.o After textdata bss dec

Re: [pktgen script v2 0/2] Add a pktgen sample script of NUMA awareness

2017-09-22 Thread Jesper Dangaard Brouer
On Mon, 18 Sep 2017 11:06:21 +0200 Jesper Dangaard Brouer wrote: > On Sun, 17 Sep 2017 20:36:36 +0800 Robert Hoo > wrote: > > > Change log > > v2: > > Rebased to > > https://github.com/netoptimizer/network-testing/tree/master/pktgen > > Hi Robert, > > Thank you for submitting this agains

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

2017-09-22 Thread Willem de Bruijn
> @@ -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_NET_ADMIN)) > + return -EPERM; > + This should p

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

2017-09-22 Thread Willem de Bruijn
On Thu, Sep 21, 2017 at 10:17 PM, Petar Penkov wrote: > 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 arriva

[PATCH] i40e: make const array patterns static, reduces object code size

2017-09-22 Thread Colin King
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: textdata bss dec hex filename 1953 496 02449 991 i40e_diag.o After: textdata bss dec

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

2017-09-22 Thread Y Song
On Fri, Sep 22, 2017 at 6:46 AM, Edward Cree wrote: > On 22/09/17 00:11, Y Song wrote: >> On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree wrote: >>> On 21/09/17 20:44, Alexei Starovoitov wrote: On Thu, Sep 21, 2017 at 09:29:33PM +0200, Daniel Borkmann wrote: > More intuitive, but agree on

[PATCH 1/1] forcedeth: optimize the xmit/rx with unlikely

2017-09-22 Thread Zhu Yanjun
In the xmit/rx fastpath, the function dma_map_single rarely fails. Therefore, add an unlikely() optimization to this error check conditional. Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-)

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

2017-09-22 Thread Y Song
On Fri, Sep 22, 2017 at 7:11 AM, Y Song wrote: > On Fri, Sep 22, 2017 at 6:46 AM, Edward Cree wrote: >> On 22/09/17 00:11, Y Song wrote: >>> On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree wrote: On 21/09/17 20:44, Alexei Starovoitov wrote: > On Thu, Sep 21, 2017 at 09:29:33PM +0200, Dani

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

2017-09-22 Thread Alexander Duyck
On Fri, Sep 22, 2017 at 6:41 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 n

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

2017-09-22 Thread Alexei Starovoitov
On Fri, Sep 22, 2017 at 07:27:29AM -0700, Y Song wrote: > On Fri, Sep 22, 2017 at 7:11 AM, Y Song wrote: > > On Fri, Sep 22, 2017 at 6:46 AM, Edward Cree wrote: > >> On 22/09/17 00:11, Y Song wrote: > >>> On Thu, Sep 21, 2017 at 12:58 PM, Edward Cree > >>> wrote: > On 21/09/17 20:44, Alexe

Re: tg3 pxe weirdness

2017-09-22 Thread Berend De Schouwer
On Fri, 2017-09-22 at 11:51 +0530, Siva Reddy Kallam wrote: > > > Can you please share below details? > 1) Model and Manufacturer of the system > 2) Linux distro/kernel used? 4.13.3 gets a little further, but after some more data is transferred the tg3 driver still crashes. This is unfortunatel

[PATCH] b43: make const arrays static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 60 bytes: Before: textdata bss dec hex filename 148161296 0 161123ef0 b43/phy_ht.o After: textdata bss dec hex f

[PATCH] hv_netvsc: make const array ver_list static, reduces object code size

2017-09-22 Thread Colin King
From: Colin Ian King Don't populate const array ver_list on the stack, instead make it static. Makes the object code smaller by over 400 bytes: Before: textdata bss dec hex filename 184443168 320 2193255ac drivers/net/hyperv/netvsc.o After: textdata

[net-next] net: remove MTU limits for dummy and ifb device

2017-09-22 Thread Zhang Shengju
These two drivers (dummy and ifb) call ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. These two devices should not have limits on MTU. This patch set their min_mtu/max_mtu to 0. S

RE: [PATCH] hv_netvsc: make const array ver_list static, reduces object code size

2017-09-22 Thread Haiyang Zhang
> -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Friday, September 22, 2017 8:50 AM > To: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > de...@linuxdriverproject.org; netdev@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.

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

2017-09-22 Thread Jiri Pirko
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->>setup_tc) ? >>>+ kinfo->dcb_ops->setup_tc(h, tc, prio_tc) : ->EOP

URGENT RESPOND NEEDED FROM YOU BY DANIEL MMINELE THE DEPUTY GOVERNOR OF SOUTH AFRICAN RESERVE BANK

2017-09-22 Thread Mrs, Suran Yoda
Hello Dear, My Name is Dr. Daniel Mminele the deputy governor of south African reserve bank, you can also check on our Bank website here for your assurance , http://www.whoswhosa.co.za/south-african-reserve-bank-20991 I am a citizen of South African. I am a computer analyst long time working wi

Re: [PATCH net v2] l2tp: fix race condition in l2tp_tunnel_delete

2017-09-22 Thread Sabrina Dubroca
2017-09-19, 18:43:37 +0200, Guillaume Nault wrote: > On Tue, Sep 19, 2017 at 03:40:40PM +0200, Sabrina Dubroca wrote: > > If we try to delete the same tunnel twice, the first delete operation > > does a lookup (l2tp_tunnel_get), finds the tunnel, calls > > l2tp_tunnel_delete, which queues it for de

[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

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

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

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

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

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

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) { > +

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

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

  1   2   >