Re: SNAT --random & fully is not actually random for ips

2016-11-28 Thread Pablo Neira Ayuso
On Mon, Nov 28, 2016 at 01:12:07PM +0200, Denys Fedoryshchenko wrote: > On 2016-11-28 13:06, Pablo Neira Ayuso wrote: > >Why does your patch reverts NF_NAT_RANGE_PROTO_RANDOM_FULLY? > > Ops, sorry i just did mistake with files, actually it is in reverse ( did > this patch, and it worked properly

Re: [PATCH] vxlan: fix a potential issue when create a new vxlan fdb entry.

2016-11-28 Thread Jiri Benc
On Mon, 28 Nov 2016 15:02:23 +0800, Haishuang Yan wrote: > vxlan_fdb_append may return error, so add the proper check, > otherwise it will cause memory leak. > > Signed-off-by: Haishuang Yan > --- > drivers/net/vxlan.c | 10 +++--- > 1 file changed, 7

[PATCH] stmmac: fix comments, make debug output consistent

2016-11-28 Thread Pavel Machek
Fix comments, add some new, and make debugfs output consistent. Signed-off-by: Pavel Machek diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index a61de04..6074d97 100644 ---

[PATCH iproute2 V2 2/2] tc/act_tunnel: Introduce ip tunnel action

2016-11-28 Thread Amir Vadai
This action could be used before redirecting packets to a shared tunnel device, or when redirecting packets arriving from a such a device. The 'unset' action is optional. It is used to explicitly unset the metadata created by the tunnel device during decap. If not used, the metadata will be

INFO

2016-11-28 Thread SAVELIEVA COSTA
Did you receive my last e-mail … You’re sincerely, Savelieva Costa

[PATCH iproute2 V2 0/2] tc/cls_flower: Support for ip tunnel metadata set/unset/classify

2016-11-28 Thread Amir Vadai
Hi, This short series adds support for matching and setting metadata for ip tunnel shared device using the TC system, introduced in kernel 4.9 [1]. Applied and tested on top of commit f3f339e9590a ("cleanup debris from revert") Example usage: $ tc filter add dev vxlan0 protocol ip parent :

[PATCH iproute2 V2 1/2] tc/cls_flower: Classify packet in ip tunnels

2016-11-28 Thread Amir Vadai
Introduce classifying by metadata extracted by the tunnel device. Outer header fields - source/dest ip and tunnel id, are extracted from the metadata when classifying. For example, the following will add a filter on the ingress Qdisc of shared vxlan device named 'vxlan0'. To forward packets with

[PATCH net-next v2] bpf: cgroup: fix documentation of __cgroup_bpf_update()

2016-11-28 Thread Daniel Mack
There's a 'not' missing in one paragraph. Add it. Signed-off-by: Daniel Mack Reported-by: Rami Rosen Fixes: 3007098494be ("cgroup: add support for eBPF programs") --- kernel/bpf/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support

2016-11-28 Thread Andrew Lunn
> I still wonder (and didn't get an answer back when I asked about this) > why a comment is preferred here. For other devices I know it's usual and > requested by the maintainers to use: > > compatible = "exact name", "earlyer device to match driver"; > > . This is more robust, documents

[PATCH ethtool 1/2] ethtool-copy.h:sync with net

2016-11-28 Thread Allan W. Nielsen
From: Raju Lakkaraju This covers kernel changes upto: commit ef05e4c22648c141298f51aab00eb22066838b47 Author: Raju Lakkaraju Date: Wed Nov 23 15:20:28 2016 +0530 ethtool: (uapi) Add ETHTOOL_PHY_LOOPBACK to PHYtunables 3

[PATCH ethtool 2/2] Ethtool: Implements PHY Loopback

2016-11-28 Thread Allan W. Nielsen
From: Raju Lakkaraju Add loopback in ethtool tunables to access PHY drivers. Ethtool Help: ethtool -h for PHY tunables ethtool --set-phy-tunable DEVNAME Set PHY tunable [ loopback off|near|far|extn ] ethtool --get-phy-tunable DEVNAME

[PATCH net-next 1/1] driver: ipvlan: Add the sanity check for ipvlan mode

2016-11-28 Thread fgao
From: Gao Feng The ipvlan mode variable "nval" is from userspace, so the ipvlan codes should check if the mode variable "nval" is valid. Signed-off-by: Gao Feng --- drivers/net/ipvlan/ipvlan_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH net-next 1/3] ethtool: (uapi) Add ETHTOOL_PHY_LOOPBACK to PHY tunables

2016-11-28 Thread Allan W. Nielsen
From: Raju Lakkaraju 3 types of PHY loopback are supported. i.e. Near-End Loopback, Far-End Loopback and External Loopback. Near-End Loopback: Transmitted data (TXD) is looped back in the PCS block onto the receive data signal (RXD). When Near-End loopback enable,

[PATCH net-next 2/3] ethtool: Core impl for ETHTOOL_PHY_LOOPBACK tunable.

2016-11-28 Thread Allan W. Nielsen
From: Raju Lakkaraju Adding validation support for the ETHTOOL_PHY_LOOPBACK. Functional implementation needs to be done in the individual PHY drivers. Signed-off-by: Raju Lakkaraju Signed-off-by: Allan W. Nielsen

[PATCH] ethernet :mellanox :mlx5: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Souptick Joarder
In alloc_cmd_box(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH net-next 1/2] sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver

2016-11-28 Thread Edward Cree
On 26/11/16 00:58, kbuild test robot wrote: > Hi Edward, > > [auto build test ERROR on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Edward-Cree/sfc-split-out-Falcon-driver/20161126-033439 > config: i386-randconfig-h1-11260702 (attached as .config) > compiler: gcc-6

Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses.

2016-11-28 Thread Pavel Machek
Hi! > >> drivers/net/ethernet/stmicro/stmmac/common.h > >> #define STMMAC_COAL_TX_TIMER4 > >> #define STMMAC_MAX_COAL_TX_TICK 10 > >> #define STMMAC_TX_MAX_FRAMES256 > >> > >> If I lower the parameters, delays are gone, but I get netdev watchdog > >> backtrace followed by broken

Re: [PATCH net-next v3 4/4] ARM64: dts: meson: odroidc2: disable advertisement EEE for GbE.

2016-11-28 Thread Andreas Färber
Am 28.11.2016 um 10:46 schrieb Jerome Brunet: > Signed-off-by: Jerome Brunet > --- > arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 16 > 1 file changed, 16 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts >

Re: stmmac ethernet in kernel 4.4: coalescing related pauses?

2016-11-28 Thread Lino Sanfilippo
Hi Pavel, On 23.11.2016 11:51, Pavel Machek wrote: I'm debugging strange delays during transmit in stmmac driver. They seem to be present in 4.4 kernel (and older kernels, too). Workload is burst of udp packets being sent, pause, burst of udp packets, ... Test code is attached, I use these

Re: [PATCH 0/4] Fix -Wunused-but-set-variable in net/mac80211/

2016-11-28 Thread Johannes Berg
On Wed, 2016-11-23 at 20:45 -0800, Kirtika Ruchandani wrote: > This patchset is part of the effort led by Arnd Bergmann to clean up > warnings in the kernel. This and following patchsets will focus on > "-Wunused-but-set-variable" as it among the noisier ones. These were > found compiling with

Re: [PATCH net-next v2] bpf: cgroup: fix documentation of __cgroup_bpf_update()

2016-11-28 Thread Daniel Borkmann
On 11/28/2016 02:11 PM, Daniel Mack wrote: There's a 'not' missing in one paragraph. Add it. Signed-off-by: Daniel Mack Reported-by: Rami Rosen Fixes: 3007098494be ("cgroup: add support for eBPF programs") Acked-by: Daniel Borkmann

net/dccp: use-after-free in dccp_invalid_packet

2016-11-28 Thread Andrey Konovalov
Hi! I've got the following error report while running the syzkaller fuzzer. On commit d8e435f3ab6fea2ea324dce72b51dd7761747523 (Nov 26). dh->dccph_doff is being accessed (line 731) right after skb was freed (line 732) in net/dccp/ipv4.c. A reproducer is attached.

[PATCH net-next 0/3] Adding PHY Loopback tunable

2016-11-28 Thread Allan W. Nielsen
Hi All, This series add support for PHY Loopback tunable, and implement it for MSCC phys. To configure loopback, the ethtool_tunable structure is used. 'id' must be set to 'ETHTOOL_PHY_LOOPBACK' and 'data' specifies the loopback type: ETHTOOL_PHY_LOOPBACK_* (DISABLE, NEAR, FAR or EXTN). Here is

[PATCH net v2 1/1] net: macb: fix the RX queue reset in macb_rx()

2016-11-28 Thread Cyrille Pitchen
On macb only (not gem), when a RX queue corruption was detected from macb_rx(), the RX queue was reset: during this process the RX ring buffer descriptor was initialized by macb_init_rx_ring() but we forgot to also set bp->rx_tail to 0. Indeed, when processing the received frames, bp->rx_tail

Re: [PATCH 1/1] net: macb: fix the RX queue reset in macb_rx()

2016-11-28 Thread Cyrille Pitchen
Hi David, Le 28/11/2016 à 02:25, David Miller a écrit : > From: Cyrille Pitchen > Date: Fri, 25 Nov 2016 09:49:32 +0100 > >> On macb only (not gem), when a RX queue corruption was detected from >> macb_rx(), the RX queue was reset: during this process the RX ring >>

[PATCH v2 1/1] net: macb: ensure ordering write to re-enable RX smoothly

2016-11-28 Thread Zumeng Chen
When a hardware issue happened as described by inline comments, the register write pattern looks like the following: + wmb(); There might be a memory barrier between these two write operations, so add wmb to ensure an flip from 0 to 1 for NCR. Signed-off-by: Zumeng Chen

Re: [PATCH v2 1/1] net: macb: ensure ordering write to re-enable RX smoothly

2016-11-28 Thread Nicolas Ferre
Le 28/11/2016 à 14:55, Zumeng Chen a écrit : > When a hardware issue happened as described by inline comments, the register > write pattern looks like the following: > > > + wmb(); > > > There might be a memory barrier between these two write operations, so add wmb > to ensure an flip from 0

Re: [PATCH] net: fec: turn on device when extracting statistics

2016-11-28 Thread David Miller
From: Nikita Yushchenko Date: Mon, 28 Nov 2016 10:06:31 +0300 > > > 28.11.2016 04:29, David Miller пишет: >> From: Nikita Yushchenko >> Date: Fri, 25 Nov 2016 13:02:00 +0300 >> >>> + int i, ret; >>> + >>> + ret =

[PATCH] bpf/samples: Fix PT_REGS_IP on s390x and use it

2016-11-28 Thread Michael Holzheu
The files "sampleip_kern.c" and "trace_event_kern.c" directly access "ctx->regs.ip" which is not available on s390x. Fix this and use the PT_REGS_IP() macro instead. Also fix the macro for s390x and use "psw.addr" from "pt_regs". Reported-by: Zvonko Kosic Signed-off-by:

Re: [PATCH] bpf: cgroup: fix documentation of __cgroup_bpf_update()

2016-11-28 Thread Daniel Borkmann
On 11/28/2016 12:04 PM, Daniel Mack wrote: There's a 'not' missing in one paragraph. Add it. Signed-off-by: Daniel Mack Reported-by: Rami Rosen Fixes: 3007098494be ("cgroup: add support for eBPF programs") Small nit in subject: s/[PATCH]/[PATCH

[PATCH] ethernet :mellanox :mlx4: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Souptick Joarder
In mlx4_alloc_cmd_mailbox(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder --- drivers/net/ethernet/mellanox/mlx4/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

RE: [PATCH net-next 5/5] udp: add recvmmsg implementation

2016-11-28 Thread David Laight
From: Hannes Frederic Sowa > Sent: 25 November 2016 17:09 ... > Currently sk_err is set so the next syscall would get an -EFAULT, which > seems very bad and can also be overwritten by incoming icmp packets, so > we never get a notification that we actually had a bad pointer somewhere > in the

Re: [PATCH net-next v3 4/4] ARM64: dts: meson: odroidc2: disable advertisement EEE for GbE.

2016-11-28 Thread Jerome Brunet
On Mon, 2016-11-28 at 13:31 +0100, Andreas Färber wrote: > Am 28.11.2016 um 10:46 schrieb Jerome Brunet: > > > > Signed-off-by: Jerome Brunet > > --- > >  arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 16 > > > >  1 file changed, 16 insertions(+) > >

Re: [PATCH 1/1] net: macb: ensure ordering write to re-enable RX smoothly

2016-11-28 Thread Zumeng Chen
On 2016年11月28日 17:22, Nicolas Ferre wrote: Le 28/11/2016 à 08:57, Zumeng Chen a écrit : When a hardware issue happened as described by inline comments, the register write pattern looks like the following: + wmb(); There might be a memory barrier between these two write operations,

[PATCH net-next] bpf: selftests: include to fix build error

2016-11-28 Thread Colin King
From: Colin Ian King Fix incomplete type build error on struct rlimit by including , fixes: test_lru_map.c:552:9: error: variable ‘r’ has initializer but incomplete type struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; ^ test_lru_map.c:552:21: error:

Re: [PATCH] stmmac ethernet: remove cut & paste code

2016-11-28 Thread Pavel Machek
On Thu 2016-11-24 14:27:13, Joe Perches wrote: > On Thu, 2016-11-24 at 22:44 +0100, Pavel Machek wrote: > > On Thu 2016-11-24 12:05:25, Joe Perches wrote: > > > On Thu, 2016-11-24 at 12:05 +0100, Pavel Machek wrote: > > > > Remove duplicate code from _tx routines. > > > > > > trivia: > > > > > >

Re: [PATCH net-next 0/5] net: add protocol level recvmmsg support

2016-11-28 Thread Jesper Dangaard Brouer
On Mon, 28 Nov 2016 11:52:38 +0100 Paolo Abeni wrote: > Hi Jesper, > > On Fri, 2016-11-25 at 18:37 +0100, Jesper Dangaard Brouer wrote: > > > The measured performance delta is as follow: > > > > > > before after > > > (Kpps) (Kpps) > > >

Re: [PATCH net-next v3 3/4] dt: bindings: add ethernet phy eee-broken-modes option documentation

2016-11-28 Thread Andreas Färber
Am 28.11.2016 um 10:46 schrieb Jerome Brunet: > Signed-off-by: Jerome Brunet > --- > Documentation/devicetree/bindings/net/phy.txt | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Andreas Färber Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr.

Re: [PATCH net-next v3 1/4] net: phy: add an option to disable EEE advertisement

2016-11-28 Thread Andreas Färber
Am 28.11.2016 um 10:46 schrieb Jerome Brunet: > This patch adds an option to disable EEE advertisement in the generic PHY > by providing a mask of prohibited modes corresponding to the value found in > the MDIO_AN_EEE_ADV register. > > On some platforms, PHY Low power idle seems to be causing

Re: [PATCH net-next v3 2/4] dt-bindings: net: add EEE capability constants

2016-11-28 Thread Andreas Färber
Am 28.11.2016 um 10:46 schrieb Jerome Brunet: > Signed-off-by: Jerome Brunet > --- > include/dt-bindings/net/mdio.h | 19 +++ > 1 file changed, 19 insertions(+) > create mode 100644 include/dt-bindings/net/mdio.h Tested-by: Andreas Färber

Re: [PATCH net-next] bpf: selftests: include to fix build error

2016-11-28 Thread Daniel Borkmann
On 11/28/2016 12:45 PM, Colin King wrote: From: Colin Ian King Fix incomplete type build error on struct rlimit by including , fixes: test_lru_map.c:552:9: error: variable ‘r’ has initializer but incomplete type struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};

Re: [PATCH] bpf: cgroup: fix documentation of __cgroup_bpf_update()

2016-11-28 Thread Daniel Mack
On 11/28/2016 02:03 PM, Daniel Borkmann wrote: > On 11/28/2016 12:04 PM, Daniel Mack wrote: >> There's a 'not' missing in one paragraph. Add it. >> >> Signed-off-by: Daniel Mack >> Reported-by: Rami Rosen >> Fixes: 3007098494be ("cgroup: add support for

Re: [PATCH net-next 0/5] net: add protocol level recvmmsg support

2016-11-28 Thread Jesper Dangaard Brouer
On Mon, 28 Nov 2016 13:21:41 +0100 Jesper Dangaard Brouer wrote: > On Mon, 28 Nov 2016 11:52:38 +0100 Paolo Abeni wrote: > > > > > > [2] like [1], but using the minimum number of flows to saturate the > > > > user space > > > > sink, that is 1 flow

Re: SNAT --random & fully is not actually random for ips

2016-11-28 Thread Denys Fedoryshchenko
On 2016-11-28 13:29, Pablo Neira Ayuso wrote: On Mon, Nov 28, 2016 at 01:12:07PM +0200, Denys Fedoryshchenko wrote: On 2016-11-28 13:06, Pablo Neira Ayuso wrote: >Why does your patch reverts NF_NAT_RANGE_PROTO_RANDOM_FULLY? Ops, sorry i just did mistake with files, actually it is in reverse (

[PATCH] stmmac: reduce code duplication getting basic descriptors

2016-11-28 Thread Pavel Machek
Remove code duplication getting basic descriptors. Signed-off-by: Pavel Machek diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f7133d0..ed20668 100644 ---

net/sctp: vmalloc allocation failure in sctp_setsockopt/xt_alloc_table_info

2016-11-28 Thread Andrey Konovalov
Hi! I've got the following error report while running the syzkaller fuzzer. On commit d8e435f3ab6fea2ea324dce72b51dd7761747523 (Nov 26). A reproducer is attached. a.out: vmalloc: allocation failure, allocated 823562240 of 1427091456 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM) oom_reaper:

[PATCH net-next 3/3] net: phy: Add Loopback support in Microsemi PHYs driver

2016-11-28 Thread Allan W. Nielsen
From: Raju Lakkaraju Implements the loopback functionality for MSCC PHYs. Signed-off-by: Raju Lakkaraju Signed-off-by: Allan W. Nielsen --- drivers/net/phy/mscc.c | 118

[PATCH ethtool 0/2] Adding PHY Loopback tunable

2016-11-28 Thread Allan W. Nielsen
Hi All, This patch implements for support for PHY Loopback using PHY-Tunables. The patch will add the following options: ethtool --set-phy-tunable DEVNAME Set PHY tunable [ loopback off|near|far|extn ] ethtool --get-phy-tunable DEVNAME Get PHY tunable

[PATCH net-next 0/3] Adding PHY Loopback tunable

2016-11-28 Thread Allan W. Nielsen
Hi All, This series add support for PHY Loopback tunable, and implement it for MSCC phys. To configure loopback, the ethtool_tunable structure is used. 'id' must be set to 'ETHTOOL_PHY_LOOPBACK' and 'data' specifies the loopback type: ETHTOOL_PHY_LOOPBACK_* (DISABLE, NEAR, FAR or EXTN). Here is

Re: [PATCH net-next v3 0/4] Fix OdroidC2 Gigabit Tx link issue

2016-11-28 Thread Neil Armstrong
On 11/28/2016 10:46 AM, Jerome Brunet wrote: > This patchset fixes an issue with the OdroidC2 board (DWMAC + RTL8211F). > The platform seems to enter LPI on the Rx path too often while performing > relatively high TX transfer. This eventually break the link (both Tx and > Rx), and require to bring

Re: [PATCH net-next 8/9] liquidio CN23XX: VF interrupt

2016-11-28 Thread kbuild test robot
Hi Raghu, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Raghu-Vatsavayi/liquidio-VF-operations/20161128-133447 config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce

[PATCH] irda: w83977af_ir: fix damaged whitespace

2016-11-28 Thread Arnd Bergmann
As David Miller pointed out for for the previous patch, the whitespace in some functions looks rather odd. This was caused by commit 6329da5f258a ("obsolete config in kernel source: USE_INTERNAL_TIMER"), which removed some conditions but did not reindent the code. This fixes the indentation in

[patch net] net: fec: cache statistics while device is down

2016-11-28 Thread Nikita Yushchenko
Execution 'ethtool -S' on fec device that is down causes OOPS on Vybrid board: Unhandled fault: external abort on non-linefetch (0x1008) at 0xe0898200 pgd = ddecc000 [e0898200] *pgd=9e406811, *pte=400d1653, *ppte=400d1453 Internal error: : 1008 [#1] SMP ARM ... Reason of OOPS is that

[patch net] sched: cls_flower: remove from hashtable only in case skip sw flag is not set

2016-11-28 Thread Jiri Pirko
From: Jiri Pirko Be symmetric to hashtable insert and remove filter from hashtable only in case skip sw flag is not set. Fixes: e69985c67c33 ("net/sched: cls_flower: Introduce support in SKIP SW flag") Signed-off-by: Jiri Pirko --- net/sched/cls_flower.c

RE: [PATCH net-next 06/10] net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap

2016-11-28 Thread David Laight
From: Tariq Toukan > Sent: 27 November 2016 15:51 > From: Eran Ben Elisha > > In order to avoid temporary large structs on the stack, > allocate them dynamically. > > Signed-off-by: Eran Ben Elisha > Signed-off-by: Tal Alon >

Re: stmmac ethernet in kernel 4.4: coalescing related pauses?

2016-11-28 Thread Lino Sanfilippo
Hi, On 28.11.2016 15:54, David Miller wrote: From: Lino Sanfilippo Date: Mon, 28 Nov 2016 14:07:51 +0100 Calling skb_orphan() in the xmit handler made this issue disappear. This is not the way to handle this problem. I agree, its not a clean solution. But if the use

[PATCH 1/1] GSO: Reload iph after pskb_may_pull

2016-11-28 Thread Arnaldo Carvalho de Melo
As it may get stale and lead to use after free. Acked-by: Eric Dumazet Cc: Alexander Duyck Cc: Andrey Konovalov Fixes: cbc53e08a793 ("GSO: Add GSO type for fixed IPv4 ID") Signed-off-by: Arnaldo Carvalho de Melo

Re: [PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-28 Thread Arnaldo Carvalho de Melo
Em Mon, Nov 28, 2016 at 07:20:58AM -0800, Eric Dumazet escreveu: > On Mon, 2016-11-28 at 12:05 -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Nov 28, 2016 at 06:47:14AM -0800, Eric Dumazet escreveu: > > > On Mon, 2016-11-28 at 11:40 -0300, Arnaldo Carvalho de Melo wrote: > > > > Em Mon, Nov

[PATCH v2] net: phy: Fix use after free in phy_detach()

2016-11-28 Thread Geert Uytterhoeven
If device_release_driver(>mdio.dev) is called, it releases all resources belonging to the PHY device. Hence the subsequent call to phy_led_triggers_unregister() will access already freed memory when unregistering the LEDs. Move the call to phy_led_triggers_unregister() before the possible call to

Re: net/sctp: vmalloc allocation failure in sctp_setsockopt/xt_alloc_table_info

2016-11-28 Thread Andrey Konovalov
On Mon, Nov 28, 2016 at 3:13 PM, Neil Horman wrote: > On Mon, Nov 28, 2016 at 02:00:19PM +0100, Andrey Konovalov wrote: >> Hi! >> >> I've got the following error report while running the syzkaller fuzzer. >> >> On commit d8e435f3ab6fea2ea324dce72b51dd7761747523 (Nov 26). >>

Re: [PATCH] stmmac ethernet: remove cut & paste code

2016-11-28 Thread Pavel Machek
On Mon 2016-11-28 06:24:28, Joe Perches wrote: > On Mon, 2016-11-28 at 12:50 +0100, Pavel Machek wrote: > > On Thu 2016-11-24 14:27:13, Joe Perches wrote: > > > On Thu, 2016-11-24 at 22:44 +0100, Pavel Machek wrote: > > > > On Thu 2016-11-24 12:05:25, Joe Perches wrote: > > > > > On Thu,

Re: stmmac ethernet in kernel 4.4: coalescing related pauses?

2016-11-28 Thread David Miller
From: Lino Sanfilippo Date: Mon, 28 Nov 2016 14:07:51 +0100 > Calling skb_orphan() in the xmit handler made this issue disappear. This is not the way to handle this problem. The solution is to free the SKBs in a timely manner after the chip has transmitted the frame.

RE: [PATCH net-next 01/10] net/mlx4_core: Make each VF manage its own mac table

2016-11-28 Thread Mintz, Yuval
> Each VF can catch up to the max number of MACs in the MAC table (128) on > the base of "first asks first gets". > The VF should know the total free number of MACs from the PF. While this might be a reasonable default policy given the alternatives [or more precisely, the lack of ability for

[PATCH net-next v2] mlxsw: switchib: add MLXSW_PCI dependency

2016-11-28 Thread Arnd Bergmann
The newly added switchib driver fails to link if MLXSW_PCI=m: drivers/net/ethernet/mellanox/mlxsw/mlxsw_switchib.o: In function^Cmlxsw_sib_module_exit': switchib.c:(.exit.text+0x8): undefined reference to `mlxsw_pci_driver_unregister' switchib.c:(.exit.text+0x10): undefined reference to

Re: net/sctp: vmalloc allocation failure in sctp_setsockopt/xt_alloc_table_info

2016-11-28 Thread Neil Horman
On Mon, Nov 28, 2016 at 03:33:40PM +0100, Andrey Konovalov wrote: > On Mon, Nov 28, 2016 at 3:13 PM, Neil Horman wrote: > > On Mon, Nov 28, 2016 at 02:00:19PM +0100, Andrey Konovalov wrote: > >> Hi! > >> > >> I've got the following error report while running the syzkaller

Re: [PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-28 Thread Arnaldo Carvalho de Melo
Em Mon, Nov 28, 2016 at 06:26:49AM -0800, Eric Dumazet escreveu: > From: Eric Dumazet > > pskb_may_pull() can reallocate skb->head, we need to reload dh pointer > in dccp_invalid_packet() or risk use after free. > > Bug found by Andrey Konovalov using syzkaller. > >

Re: net/sctp: vmalloc allocation failure in sctp_setsockopt/xt_alloc_table_info

2016-11-28 Thread Marcelo Ricardo Leitner
On Mon, Nov 28, 2016 at 09:39:31AM -0500, Neil Horman wrote: > On Mon, Nov 28, 2016 at 03:33:40PM +0100, Andrey Konovalov wrote: > > On Mon, Nov 28, 2016 at 3:13 PM, Neil Horman wrote: > > > On Mon, Nov 28, 2016 at 02:00:19PM +0100, Andrey Konovalov wrote: > > >> Hi! > > >>

Re: [PATCH] cpsw: ethtool: add support for nway reset

2016-11-28 Thread Yegor Yefremov
On Mon, Nov 28, 2016 at 10:47 AM, wrote: > From: Yegor Yefremov > > This patch adds support for ethtool's '-r' command. Restarting > N-WAY negotiation can be useful to activate newly changed EEE > settings etc. > > Signed-off-by: Yegor

Re: [PATCH] stmmac: reduce code duplication getting basic descriptors

2016-11-28 Thread kbuild test robot
Hi Pavel, [auto build test WARNING on net-next/master] [also build test WARNING on v4.9-rc7 next-20161128] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Pavel-Machek/stmmac-reduce-code

Re: [PATCH net-next 1/3] ethtool: (uapi) Add ETHTOOL_PHY_LOOPBACK to PHY tunables

2016-11-28 Thread Andrew Lunn
On Mon, Nov 28, 2016 at 02:24:30PM +0100, Allan W. Nielsen wrote: > From: Raju Lakkaraju > > 3 types of PHY loopback are supported. > i.e. Near-End Loopback, Far-End Loopback and External Loopback. Hi Allan Is this integrated with ethtool --test? You only want the

Re: net/sctp: vmalloc allocation failure in sctp_setsockopt/xt_alloc_table_info

2016-11-28 Thread Neil Horman
On Mon, Nov 28, 2016 at 02:00:19PM +0100, Andrey Konovalov wrote: > Hi! > > I've got the following error report while running the syzkaller fuzzer. > > On commit d8e435f3ab6fea2ea324dce72b51dd7761747523 (Nov 26). > > A reproducer is attached. > > a.out: vmalloc: allocation failure, allocated

[PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-28 Thread Eric Dumazet
From: Eric Dumazet pskb_may_pull() can reallocate skb->head, we need to reload dh pointer in dccp_invalid_packet() or risk use after free. Bug found by Andrey Konovalov using syzkaller. Signed-off-by: Eric Dumazet Reported-by: Andrey Konovalov

Re: [PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-28 Thread Arnaldo Carvalho de Melo
Em Mon, Nov 28, 2016 at 06:47:14AM -0800, Eric Dumazet escreveu: > On Mon, 2016-11-28 at 11:40 -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Nov 28, 2016 at 06:26:49AM -0800, Eric Dumazet escreveu: > > > From: Eric Dumazet > > > > > > pskb_may_pull() can reallocate

Re: [PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 12:05 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Nov 28, 2016 at 06:47:14AM -0800, Eric Dumazet escreveu: > > On Mon, 2016-11-28 at 11:40 -0300, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Nov 28, 2016 at 06:26:49AM -0800, Eric Dumazet escreveu: > > > > From: Eric

Re: [PATCH net-next] virtio-net: enable multiqueue by default

2016-11-28 Thread Neil Horman
On Fri, Nov 25, 2016 at 06:43:08AM +0200, Michael S. Tsirkin wrote: > On Fri, Nov 25, 2016 at 12:37:26PM +0800, Jason Wang wrote: > > We use single queue even if multiqueue is enabled and let admin to > > enable it through ethtool later. This is used to avoid possible > > regression (small packet

Re: stmmac ethernet in kernel 4.4: coalescing related pauses?

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 09:54 -0500, David Miller wrote: > From: Lino Sanfilippo > Date: Mon, 28 Nov 2016 14:07:51 +0100 > > > Calling skb_orphan() in the xmit handler made this issue disappear. > > This is not the way to handle this problem. > > The solution is to free the

Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support

2016-11-28 Thread Uwe Kleine-König
On 11/28/2016 02:17 PM, Andrew Lunn wrote: >> I still wonder (and didn't get an answer back when I asked about this) >> why a comment is preferred here. For other devices I know it's usual and >> requested by the maintainers to use: >> >> compatible = "exact name", "earlyer device to match

[PATCH net-next v3 2/3] bpf: Add new cgroup attach type to enable sock modifications

2016-11-28 Thread David Ahern
Add new cgroup based program type, BPF_PROG_TYPE_CGROUP_SOCK. Similar to BPF_PROG_TYPE_CGROUP_SKB programs can be attached to a cgroup and run any time a process in the cgroup opens an AF_INET or AF_INET6 socket. Currently only sk_bound_dev_if is exported to userspace for modification by a bpf

[PATCH net-next v3 1/3] bpf: Refactor cgroups code in prep for new type

2016-11-28 Thread David Ahern
Code move only; no functional change intended. Signed-off-by: David Ahern --- v3 - dropped the rename v2 - fix bpf_prog_run_clear_cb to bpf_prog_run_save_cb as caught by Daniel - rename BPF_PROG_TYPE_CGROUP_SKB and its cg_skb functions to BPF_PROG_TYPE_CGROUP and

[PATCH net-next v3 3/3] samples: bpf: add userspace example for modifying sk_bound_dev_if

2016-11-28 Thread David Ahern
Add a simple program to demonstrate the ability to attach a bpf program to a cgroup that sets sk_bound_dev_if for AF_INET{6} sockets when they are created. Signed-off-by: David Ahern --- v3 - revert to BPF_PROG_TYPE_CGROUP_SOCK prog type v2 - removed bpf_sock_store_u32

Re: [PATCH] stmmac ethernet: remove cut & paste code

2016-11-28 Thread Joe Perches
On Mon, 2016-11-28 at 12:50 +0100, Pavel Machek wrote: > On Thu 2016-11-24 14:27:13, Joe Perches wrote: > > On Thu, 2016-11-24 at 22:44 +0100, Pavel Machek wrote: > > > On Thu 2016-11-24 12:05:25, Joe Perches wrote: > > > > On Thu, 2016-11-24 at 12:05 +0100, Pavel Machek wrote: > > > > > Remove

Re: [PATCH net] net/dccp: fix use-after-free in dccp_invalid_packet

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 11:40 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Nov 28, 2016 at 06:26:49AM -0800, Eric Dumazet escreveu: > > From: Eric Dumazet > > > > pskb_may_pull() can reallocate skb->head, we need to reload dh pointer > > in dccp_invalid_packet() or risk

Re: [patch net] sched: cls_flower: remove from hashtable only in case skip sw flag is not set

2016-11-28 Thread Amir Vadai"
On Mon, Nov 28, 2016 at 03:40:13PM +0100, Jiri Pirko wrote: > From: Jiri Pirko > > Be symmetric to hashtable insert and remove filter from hashtable only > in case skip sw flag is not set. > > Fixes: e69985c67c33 ("net/sched: cls_flower: Introduce support in SKIP SW > flag")

Re: [PATCH net-next] virtio-net: enable multiqueue by default

2016-11-28 Thread Neil Horman
On Fri, Nov 25, 2016 at 12:37:26PM +0800, Jason Wang wrote: > We use single queue even if multiqueue is enabled and let admin to > enable it through ethtool later. This is used to avoid possible > regression (small packet TCP stream transmission). But looks like an > overkill since: > > - single

[PATCH net-next v4 4/4] ARM64: dts: meson: odroidc2: disable advertisement EEE for GbE.

2016-11-28 Thread Jerome Brunet
Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts

Re: [PATCH 2/2] net: dsa: mv88e6xxx: Add 88E6176 device tree support

2016-11-28 Thread Andrew Lunn
On Mon, Nov 28, 2016 at 04:44:47PM +0100, Uwe Kleine-König wrote: > On 11/28/2016 02:17 PM, Andrew Lunn wrote: > >> I still wonder (and didn't get an answer back when I asked about this) > >> why a comment is preferred here. For other devices I know it's usual and > >> requested by the maintainers

Re: [PATCH net-next] virtio-net: enable multiqueue by default

2016-11-28 Thread David Miller
From: "Michael S. Tsirkin" Date: Fri, 25 Nov 2016 06:43:08 +0200 > On Fri, Nov 25, 2016 at 12:37:26PM +0800, Jason Wang wrote: >> We use single queue even if multiqueue is enabled and let admin to >> enable it through ethtool later. This is used to avoid possible >> regression

Re: stmmac ethernet in kernel 4.4: coalescing related pauses?

2016-11-28 Thread David Miller
From: Lino Sanfilippo Date: Mon, 28 Nov 2016 16:57:35 +0100 > I wonder if the best fix would be indeed to deactivate irq coalescing > completely. > Does it make any sense at all to use it if a driver uses NAPI already? It absolutely does make sense, when it is implemented

[PATCH net-next v4 0/4] Fix OdroidC2 Gigabit Tx link issue

2016-11-28 Thread Jerome Brunet
This patchset fixes an issue with the OdroidC2 board (DWMAC + RTL8211F). The platform seems to enter LPI on the Rx path too often while performing relatively high TX transfer. This eventually break the link (both Tx and Rx), and require to bring the interface down and up again to get the Rx path

[PATCH net-next v4 2/4] dt-bindings: net: add EEE capability constants

2016-11-28 Thread Jerome Brunet
Signed-off-by: Jerome Brunet Tested-by: Yegor Yefremov Tested-by: Andreas Färber Tested-by: Neil Armstrong --- include/dt-bindings/net/mdio.h | 19 +++ 1 file changed, 19 insertions(+)

Re: [[PATCH net-next RFC] 4/4] net: dsa: mv88e6xxx: Refactor CPU and DSA port setup

2016-11-28 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > static const struct mv88e6xxx_ops mv88e6391_ops = { > diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h > b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h > index a0d0f79a7de8..b846a33c024c 100644 > --- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h > +++

Re: [PATCH] stmmac ethernet: remove cut & paste code

2016-11-28 Thread Joe Perches
On Mon, 2016-11-28 at 15:35 +0100, Pavel Machek wrote: > On Mon 2016-11-28 06:24:28, Joe Perches wrote: > > On Mon, 2016-11-28 at 12:50 +0100, Pavel Machek wrote: > > > On Thu 2016-11-24 14:27:13, Joe Perches wrote: > > > > On Thu, 2016-11-24 at 22:44 +0100, Pavel Machek wrote: > > > > > On Thu

Re: [RFC PATCH net-next] ipv6: implement consistent hashing for equal-cost multipath routing

2016-11-28 Thread David Miller
From: David Lebrun Date: Thu, 24 Nov 2016 20:59:16 +0100 > When multiple nexthops are available for a given route, the routing engine > chooses a nexthop by computing the flow hash through get_hash_from_flowi6 > and by taking that value modulo the number of nexthops.

Re: [PATCH] net/iucv: use explicit clean up labels in iucv_init()

2016-11-28 Thread David Miller
From: Sebastian Andrzej Siewior Date: Thu, 24 Nov 2016 17:10:13 +0100 > Ursula suggested to use explicit labels for clean up in the error path > instead of one `out_free' label which handles multiple exits. > Since the previous patch got already applied, here is a follow

Re: [PATCH] rtlwifi: Add updates for RTL8723BE and RTL8821AE

2016-11-28 Thread Kyle McMartin
On Sun, Nov 27, 2016 at 01:28:34PM -0600, Larry Finger wrote: > The new versions will only work with new versions of the drivers. For > that reason, they are given new names and the old versions are retained. > > Signed-off-by: Larry Finger > --- > WHENCE

Re: [PATCH 1/1] GSO: Reload iph after pskb_may_pull

2016-11-28 Thread Alexander Duyck
On Mon, Nov 28, 2016 at 7:36 AM, Arnaldo Carvalho de Melo wrote: > As it may get stale and lead to use after free. > > Acked-by: Eric Dumazet > Cc: Alexander Duyck > Cc: Andrey Konovalov > Fixes: cbc53e08a793

Re: [RFC PATCH 1/2] net: macb: Add MDIO driver for accessing multiple PHY devices

2016-11-28 Thread Andrew Lunn
On Mon, Nov 28, 2016 at 03:19:14PM +0530, Harini Katakam wrote: > This patch is to add support for the hardware with multiple ethernet > MAC controllers and a single MDIO bus connected to multiple PHY devices. > MDIO lines are connected to any one of the ethernet MAC controllers and > all the PHY

Re: [PATCH] net/iucv: use explicit clean up labels in iucv_init()

2016-11-28 Thread Thomas Gleixner
On Mon, 28 Nov 2016, David Miller wrote: > From: Sebastian Andrzej Siewior > Date: Thu, 24 Nov 2016 17:10:13 +0100 > > > Ursula suggested to use explicit labels for clean up in the error path > > instead of one `out_free' label which handles multiple exits. > > Since the

Re: [PATCH net-next] virtio-net: enable multiqueue by default

2016-11-28 Thread John Fastabend
On 16-11-28 08:28 AM, David Miller wrote: > From: "Michael S. Tsirkin" > Date: Fri, 25 Nov 2016 06:43:08 +0200 > >> On Fri, Nov 25, 2016 at 12:37:26PM +0800, Jason Wang wrote: >>> We use single queue even if multiqueue is enabled and let admin to >>> enable it through ethtool

Re: [PATCH net] sit: Set skb->protocol properly in ipip6_tunnel_xmit()

2016-11-28 Thread David Miller
From: Stephen Rothwell Date: Sun, 27 Nov 2016 13:04:00 +1100 > [Just for Dave's information] > > On Fri, 25 Nov 2016 13:50:17 +0800 Eli Cooper wrote: >> >> Similar to commit ae148b085876 >> ("ip6_tunnel: Update skb->protocol to ETH_P_IPV6 in

  1   2   3   4   5   >