Re: [PATCH for-next 03/11] IB/hns: Optimize the logic of allocating memory using APIs

2016-11-16 Thread Leon Romanovsky
On Tue, Nov 15, 2016 at 03:52:46PM +, Salil Mehta wrote: > > -Original Message- > > From: Leon Romanovsky [mailto:l...@kernel.org] > > Sent: Wednesday, November 09, 2016 7:22 AM > > To: Salil Mehta > > Cc: dledf...@redhat.com; Huwei (Xavier); oulijun; > > mehta.salil@gmail.com; linu

[PATCH net] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread Nicolas Dichtel
Andrei reports the following kmemleak error: unreferenced object 0x91badb543950 (size 2096): comm "kworker/u4:0", pid 6, jiffies 4295152553 (age 28.418s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 cb 5f df ba 91 ff ff .._. 00 00 00 00 00 00 00 00 00 00 00 00

Re: [PATCH net] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread Nicolas Dichtel
Le 16/11/2016 à 09:41, Nicolas Dichtel a écrit : > Andrei reports the following kmemleak error: > unreferenced object 0x91badb543950 (size 2096): > comm "kworker/u4:0", pid 6, jiffies 4295152553 (age 28.418s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 cb 5f df ba 91 ff ff

[patch net-next] mlxsw: spectrum_router: Adjust placement of FIB abort warning

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel The recent merge commit bb598c1b8c9b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") would cause the FIB abort warning to fire whenever we flush the FIB tables - either during module removal or actual abort. Move it back to its rightful location in the FIB ab

[PATCH net-next] lwtunnel: subtract tunnel headroom from mtu on output redirect

2016-11-16 Thread David Lebrun
This patch changes the lwtunnel_headroom() function which is called in ipv4_mtu() and ip6_mtu(), to also return the correct headroom value when the lwtunnel state is OUTPUT_REDIRECT. This patch enables e.g. SR-IPv6 encapsulations to work without manually setting the route mtu. Acked-by: Roopa Pra

[PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Greentime Hu
To support device tree usage for ftmac100. Signed-off-by: Greentime Hu --- drivers/net/ethernet/faraday/ftmac100.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c index dce5f7b..81dd9e1 100644 --- a/

Re: [PATCH net] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread kbuild test robot
Hi Nicolas, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/net-nsid-cannot-be-allocated-for-a-dead-netns/20161116-164739 config: i386-randconfig-x006-201646 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce

Re: [PATCH net] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread Nicolas Dichtel
Le 16/11/2016 à 10:10, kbuild test robot a écrit : > Hi Nicolas, > > [auto build test ERROR on net/master] And I finally send the wrong version of the patch :(

[PATCH net v2] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread Nicolas Dichtel
Andrei reports the following kmemleak error: unreferenced object 0x91badb543950 (size 2096): comm "kworker/u4:0", pid 6, jiffies 4295152553 (age 28.418s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 cb 5f df ba 91 ff ff .._. 00 00 00 00 00 00 00 00 00 00 00 00

Re: [PATCH net-next 2/2] net: marvell: Allow drivers to be built with COMPILE_TEST

2016-11-16 Thread kbuild test robot
Hi Florian, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-ethernet-Allow-Marvell-Freescale-to-COMPILE_TEST/20161116-024633 config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-16 Thread Jerome Brunet
On Tue, 2016-11-15 at 09:03 -0800, Florian Fainelli wrote: > On 11/15/2016 08:30 AM, Andrew Lunn wrote: > > > > On Tue, Nov 15, 2016 at 03:29:12PM +0100, Jerome Brunet wrote: > > > > > > On some platforms, energy efficient ethernet with rtl8211 devices > > > is > > > causing issue, like throughpu

[PATCH net-next v6] cadence: Add LSO support.

2016-11-16 Thread Rafal Ozieblo
New Cadence GEM hardware support Large Segment Offload (LSO): TCP segmentation offload (TSO) as well as UDP fragmentation offload (UFO). Support for those features was added to the driver. --- Changed in v2: macb_lso_check_compatibility() changed to macb_features_check() (with little modifications)

Re: [PATCH net] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread kbuild test robot
Hi Nicolas, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/net-nsid-cannot-be-allocated-for-a-dead-netns/20161116-164739 config: sparc-defconfig (attached as .config) compiler: sparc-linux-gcc (GCC) 6.2.0 reproduce: wget https

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-16 Thread Kai-Heng Feng
On Mon, Nov 14, 2016 at 3:34 PM, Kai-Heng Feng wrote: > On Fri, Nov 11, 2016 at 10:44 PM, Mathias Nyman > wrote: >> On 10.11.2016 13:22, Oliver Neukum wrote: >>> >>> On Thu, 2016-11-10 at 12:09 +0100, Bjørn Mork wrote: Kai-Heng Feng writes: > > On Wed, Nov 9, 2016 at 8:32 PM, B

[PATCH v2] net/phy/vitesse: Configure RGMII skew on VSC8601, if needed

2016-11-16 Thread Alexandru Gagniuc
With RGMII, we need a 1.5 to 2ns skew between clock and data lines. The VSC8601 can handle this internally. While the VSC8601 can set more fine-grained delays, the standard skew settings work out of the box. The same heuristic is used to determine when this skew should be enabled as in vsc824x_conf

[PATCH 1/2] net: netcp: replace IS_ERR_OR_NULL by IS_ERR

2016-11-16 Thread Julia Lawall
knav_queue_open always returns an ERR_PTR value, never NULL. This can be confirmed by unfolding the function calls and conforms to the function's documentation. Thus, replace IS_ERR_OR_NULL by IS_ERR in error checks. The change is made using the following semantic patch: (http://coccinelle.lip6.

[PATCH 0/2] replace IS_ERR_OR_NULL by IS_ERR

2016-11-16 Thread Julia Lawall
Replace IS_ERR_OR_NULL by IS_ERR on knav_queue_open calls. --- drivers/net/ethernet/ti/netcp_core.c |6 +++--- drivers/soc/ti/knav_qmss_queue.c |2 +- 2 files changed, 4 insertions(+), 4 deletions(-)

Re: Debugging Ethernet issues

2016-11-16 Thread Sebastian Frias
Hi Florian, On 11/14/2016 10:00 PM, Florian Fainelli wrote: > On 11/14/2016 12:27 PM, Mason wrote: >> On 14/11/2016 19:20, Florian Fainelli wrote: >> >>> On 11/14/2016 09:59 AM, Sebastian Frias wrote: >>> Could you confirm that Mason's patch is correct and/or that it does not has negativ

Re: [PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Jiri Pirko
Wed, Nov 16, 2016 at 09:43:15AM CET, green...@gmail.com wrote: >To support device tree usage for ftmac100. > >Signed-off-by: Greentime Hu >--- > drivers/net/ethernet/faraday/ftmac100.c |7 +++ > 1 file changed, 7 insertions(+) > >diff --git a/drivers/net/ethernet/faraday/ftmac100.c >b/driv

Re: [PATCH net] net: nsid cannot be allocated for a dead netns

2016-11-16 Thread Sergei Shtylyov
Hello. On 11/16/2016 11:41 AM, Nicolas Dichtel wrote: Andrei reports the following kmemleak error: unreferenced object 0x91badb543950 (size 2096): comm "kworker/u4:0", pid 6, jiffies 4295152553 (age 28.418s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 cb 5f df ba 91 ff ff

Re: [PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Greentime Hu
You are right. I didn't notice that. I should use ftmac100. On Wed, Nov 16, 2016 at 7:53 PM, Jiri Pirko wrote: > Wed, Nov 16, 2016 at 09:43:15AM CET, green...@gmail.com wrote: >>To support device tree usage for ftmac100. >> >>Signed-off-by: Greentime Hu >>--- >> drivers/net/ethernet/faraday/ftma

Netperf UDP issue with connected sockets

2016-11-16 Thread Jesper Dangaard Brouer
While optimizing the kernel RX path, I've run into an issue where I cannot use netperf UDP_STREAM for testing, because the sender is slower than receiver. Thus, it cannot show my receiver improvements (as receiver have idle cycles). Eric Dumazet previously told me[1] this was related to netperf

Re: [PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Jiri Pirko
Wed, Nov 16, 2016 at 01:08:57PM CET, green...@gmail.com wrote: >You are right. I didn't notice that. I should use ftmac100. Don't top-post please. > >On Wed, Nov 16, 2016 at 7:53 PM, Jiri Pirko wrote: >> Wed, Nov 16, 2016 at 09:43:15AM CET, green...@gmail.com wrote: >>>To support device tree us

Re: [PATCH net-next v2 2/4] bpf, mlx5: fix various refcount issues in mlx5e_xdp_set

2016-11-16 Thread Saeed Mahameed
On Wed, Nov 16, 2016 at 2:04 AM, Daniel Borkmann wrote: > There are multiple issues in mlx5e_xdp_set(): > > 1) The batched bpf_prog_add() is currently not checked for errors! When >doing so, it should be done at an earlier point in time to makes sure >that we cannot fail anymore at the tim

[PATCH v2] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Greentime Hu
Signed-off-by: Greentime Hu --- drivers/net/ethernet/faraday/ftmac100.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c index dce5f7b..5d70ee9 100644 --- a/drivers/net/ethernet/faraday/ftmac100.c +++

Re: [PATCH net-next v2 3/4] bpf, mlx5: drop priv->xdp_prog reference on netdev cleanup

2016-11-16 Thread Saeed Mahameed
On Wed, Nov 16, 2016 at 2:04 AM, Daniel Borkmann wrote: > mlx5e_xdp_set() is currently the only place where we drop reference on the > prog sitting in priv->xdp_prog when it's exchanged by a new one. We also > need to make sure that we eventually release that reference, for example, > in case the

[PATCH 1/1] ixgbe: write flush vfta registers

2016-11-16 Thread zyjzyj2000
From: Zhu Yanjun Sometimes vfta registers can not be written successfully in dcb mode. This is very occassional. When the ixgbe nic runs for a very long time, sometimes this bug occurs. But after IXGBE_WRITE_FLUSH is executed, this bug never occurs. Signed-off-by: Zhu Yanjun --- drivers/net/et

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-16 Thread Andrew Lunn
> There two kind of PHYs supporting eee, the one advertising eee by > default (like realtek) and the one not advertising it (like micrel). I don't know too much about EEE. So maybe a dumb question. Does the MAC need to be involved? Or is it just the PHY? If the MAC needs to be involved, the PHY s

Re: [PATCH 1/2] can: holt_hi311x: document device tree bindings

2016-11-16 Thread Rob Herring
On Mon, Nov 14, 2016 at 12:55:43PM -0500, Akshay Bhat wrote: > Document the HOLT HI-311x CAN device tree bindings. > > Signed-off-by: Akshay Bhat > --- > .../devicetree/bindings/net/can/holt_hi311x.txt| 24 > ++ > 1 file changed, 24 insertions(+) > create mode 100644 Do

Re: [PATCH net] sctp: use new rhlist interface on sctp transport rhashtable

2016-11-16 Thread Xin Long
On Wed, Nov 16, 2016 at 2:04 AM, Neil Horman wrote: > On Tue, Nov 15, 2016 at 11:23:11PM +0800, Xin Long wrote: >> Now sctp transport rhashtable uses hash(lport, dport, daddr) as the key >> to hash a node to one chain. If in one host thousands of assocs connect >> to one server with the same lport

Re: [PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Andrew Lunn
On Wed, Nov 16, 2016 at 04:43:15PM +0800, Greentime Hu wrote: > To support device tree usage for ftmac100. > > Signed-off-by: Greentime Hu > --- > drivers/net/ethernet/faraday/ftmac100.c |7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/ethernet/faraday/ftmac100.c

[PATCH net-next] net/mlx4_en: remove napi_hash_del() call

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet There is no need calling napi_hash_del()+synchronize_rcu() before calling netif_napi_del() netif_napi_del() does this already. Using napi_hash_del() in a driver is useful only when dealing with a batch of NAPI structures, so that a single synchronize_rcu() can be used. mlx4_e

Re: [PATCH net] ipv6 addrconf: Implemented enhanced DAD (RFC7527)

2016-11-16 Thread Hannes Frederic Sowa
Hello, On 16.11.2016 01:44, Erik Nordmark wrote: > On 11/16/16 1:00 AM, Hannes Frederic Sowa wrote: >> On 15.11.2016 08:57, Erik Nordmark wrote: >>> Implemented RFC7527 Enhanced DAD. >>> IPv6 duplicate address detection can fail if there is some temporary >>> loopback of Ethernet frames. RFC7527 s

Re: [PATCH v2] net/phy/vitesse: Configure RGMII skew on VSC8601, if needed

2016-11-16 Thread Andrew Lunn
On Wed, Nov 16, 2016 at 01:02:33AM -0800, Alexandru Gagniuc wrote: > With RGMII, we need a 1.5 to 2ns skew between clock and data lines. The > VSC8601 can handle this internally. While the VSC8601 can set more > fine-grained delays, the standard skew settings work out of the box. > The same heurist

Re: [PATCH v2] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Andrew Lunn
On Wed, Nov 16, 2016 at 08:03:46PM +0800, Greentime Hu wrote: > Signed-off-by: Greentime Hu > --- > drivers/net/ethernet/faraday/ftmac100.c |7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/ethernet/faraday/ftmac100.c > b/drivers/net/ethernet/faraday/ftmac100.c > in

Re: [PATCH net-next v2 2/4] bpf, mlx5: fix various refcount issues in mlx5e_xdp_set

2016-11-16 Thread Daniel Borkmann
On 11/16/2016 01:25 PM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 2:04 AM, Daniel Borkmann wrote: There are multiple issues in mlx5e_xdp_set(): 1) The batched bpf_prog_add() is currently not checked for errors! When doing so, it should be done at an earlier point in time to makes sure

[PATCH net-next] net/mlx5e: remove napi_hash_del() calls

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() after netif_napi_del() is pointless. Signed-off-by: Eric Dumazet Cc: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c |4 1 file changed, 4 deletions(-)

Re: [PATCH net] virtio-net: add a missing synchronize_net()

2016-11-16 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 10:24:12PM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > It seems many drivers do not respect napi_hash_del() contract. > > When napi_hash_del() is used before netif_napi_del(), an RCU grace > period is needed before freeing NAPI object. > > Fixes: 91815639d880 ("v

[PATCH net-next] sfc: remove napi_hash_del() call

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() after netif_napi_del() is pointless. Signed-off-by: Eric Dumazet Cc: Edward Cree Cc: Bert Kenward --- drivers/net/ethernet/sfc/efx.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers

Re: [PATCH 1/2] ethernet: stmmac: make DWMAC_STM32 depend on it's associated SoC

2016-11-16 Thread Peter Robinson
On Mon, Nov 7, 2016 at 2:41 AM, David Miller wrote: > From: Peter Robinson > Date: Sun, 6 Nov 2016 20:04:37 + > >> There's not much point, except compile test, enabling the stmmac >> platform drivers unless the STM32 SoC is enabled. It's not >> useful without it. >> >> Signed-off-by: Peter R

Aw: [PATCH 1/1] ixgbe: write flush vfta registers

2016-11-16 Thread Lino Sanfilippo
Hi, > > Sometimes vfta registers can not be written successfully in dcb mode. > This is very occassional. When the ixgbe nic runs for a very long time, > sometimes this bug occurs. But after IXGBE_WRITE_FLUSH is executed, > this bug never occurs. > > Signed-off-by: Zhu Yanjun > --- > drivers

[patch net-next 2/8] mlxsw: spectrum_router: Implement FIB offload in delayed work

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel FIB offload is currently done in process context with RTNL held, but we're about to dump the FIB tables in RCU critical section, so we can no longer sleep. Instead, defer the operation to process context using delayed work. Make sure fib info isn't freed while the work is queu

[patch net-next 1/8] ipv4: fib: Export free_fib_info()

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel The FIB notification chain is going to be converted to an atomic chain, which means switchdev drivers will have to offload FIB entries in delayed work, as hardware operations entail sleeping. However, while the work is queued fib info might be freed, so a reference must be tak

[patch net-next 7/8] mlxsw: spectrum_router: Request a dump of FIB tables during init

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel Make sure the device has a complete view of the FIB tables by invoking their dump during module init. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/

[patch net-next 3/8] rocker: Implement FIB offload in delayed work

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel Convert rocker to offload FIBs in delayed work in a similar fashion to mlxsw, which was converted in the previous patch. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/rocker/rocker_main.c | 58 +- drivers/net/eth

[patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel Commit b90eb7549499 ("fib: introduce FIB notification infrastructure") introduced a new notification chain to notify listeners (f.e., switchdev drivers) about addition and deletion of routes. However, upon registration to the chain the FIB tables can already be populated, whic

[patch net-next 0/8] ipv4: fib: Allow modules to dump FIB tables

2016-11-16 Thread Jiri Pirko
From: Jiri Pirko Ido says: In kernel 4.9 the switchdev-specific FIB offload mechanism was replaced by a new FIB notification chain to which modules could register in order to be notified about the addition and deletion of FIB entries. The motivation for this change was that switchdev drivers nee

[patch net-next 8/8] rocker: Request a dump of FIB tables during init

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel Make sure the device has a complete view of the FIB tables by invoking their dump during module init. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/rocker/rocker_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet

[patch net-next 5/8] net: ipv4: Send notifications only after removing FIB alias

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel When removing a FIB alias we should send a notification (both to user space and in kernel) only after the fact, or otherwise we could end up in problematic situations. For example, assume we have two tasks: a) Task A - Removing a FIB alias (fa1) following RTM_DELROUTE b) Task

[patch net-next 4/8] ipv4: fib: Convert FIB notification chain to be atomic

2016-11-16 Thread Jiri Pirko
From: Ido Schimmel In order not to hold RTNL for long periods of time we're going to dump the FIB tables using RCU. Convert the FIB notification chain to be atomic, as we can't block in RCU critical sections. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- net/ipv4/fib_trie.c | 8 +

[PATCH] netronome: don't access real_num_rx_queues directly

2016-11-16 Thread Arnd Bergmann
The netdev->real_num_rx_queues setting is only available if CONFIG_SYSFS is enabled, so we now get a build failure when that is turned off: netronome/nfp/nfp_net_common.c: In function 'nfp_net_ring_swap_enable': netronome/nfp/nfp_net_common.c:2489:18: error: 'struct net_device' has no member name

[PATCH net] be2net: do not call napi_hash_del()

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() before netif_napi_del() is dangerous if a synchronize_rcu() is not enforced before NAPI struct freeing. Lets leave this detail to core networking stack and feel more comfortable. Signed-off-by: Eric Dumazet Cc: Sathya Perla Cc: Ajit Khaparde Cc: Sri

Re: [PATCH net-next] net/mlx5e: remove napi_hash_del() calls

2016-11-16 Thread Eric Dumazet
On Wed, 2016-11-16 at 05:55 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > Calling napi_hash_del() after netif_napi_del() is pointless. > > Signed-off-by: Eric Dumazet > Cc: Saeed Mahameed > --- > drivers/net/ethernet/mellanox/mlx5/core/en_main.c |4 > 1 file changed, 4 deletion

[patch net-next 0/4] mlxsw: Introduce support for I2C bus

2016-11-16 Thread Jiri Pirko
From: Jiri Pirko Vadim says: This patchset adds I2C access support for SwitchX, SwitchX2, SwitchIB, SwitchIB2 and Spectrum silicones. It contains: - Small changes in mlxsw core code, needed for I2C bus support; - I2C driver, which obtains I2C input/output mailboxes setting and provides com

[patch net-next 2/4] mlxsw: Introduce support for I2C bus

2016-11-16 Thread Jiri Pirko
From: Vadim Pasternak Add I2C bus implementation for Mellanox Technologies Switch ASICs. This includes command interface implementation using input / out mailboxes, whose location is retrieved from the firmware during probe time. Signed-off-by: Vadim Pasternak Reviewed-by: Ido Schimmel Signed-

[patch net-next 1/4] mlxsw: Add bus capability flag

2016-11-16 Thread Jiri Pirko
From: Vadim Pasternak The mlxsw core infrastructure currently assumes that communication with the ASIC is always possible using Ethernet management datagrams (EMADs), but this is only possible when the PCI bus is used. The bus capability flag is added to indicate EMAD support and make core initi

[PATCH v2 net-next] net/mlx5e: remove napi_hash_del() calls

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() after netif_napi_del() is pointless. Signed-off-by: Eric Dumazet Cc: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/d

[patch net-next 3/4] mlxsw: Invoke driver's init/fini methods only if defined

2016-11-16 Thread Jiri Pirko
From: Vadim Pasternak We are going to add a minimal driver on top of the mlxsw core infrastructure, which will be mainly used for hardware monitoring in Baseboard management controller (BMC) installations. Unlike the switch drivers (e.g., spectrum, switchx2), this driver does not initialize the

[patch net-next 4/4] mlxsw: minimal: Add I2C support for Mellanox ASICs

2016-11-16 Thread Jiri Pirko
From: Vadim Pasternak Add I2C access support for Mellanox ASICs: - Virtual Protocol Interconnect switches SwitchX, SwitchX2, providing InfiniBand, Ethernet and Fibre Channel connectivity; - Infiniband switches SwitchIB, SwitchIB2: - Ethernet switch Spectrum. Example of probing activation: echo

[PATCH net 1/3] of_mdio: fix node leak in of_phy_register_fixed_link error path

2016-11-16 Thread Johan Hovold
Make sure to drop the of_node reference also on failure to parse the speed property in of_phy_register_fixed_link(). Fixes: 3be2a49e5c08 ("of: provide a binding for fixed link PHYs") Signed-off-by: Johan Hovold --- drivers/of/of_mdio.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) d

[PATCH net 0/3] net: phy: fix of_node and device leaks

2016-11-16 Thread Johan Hovold
These patches fix a couple of of_node leaks in the fixed-link code and a device reference leak in a phy helper. Johan Johan Hovold (3): of_mdio: fix node leak in of_phy_register_fixed_link error path of_mdio: fix device reference leak in of_phy_find_device net: phy: fixed_phy: fix of_node

[PATCH net 3/3] net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister

2016-11-16 Thread Johan Hovold
Make sure to drop the of_node reference taken in fixed_phy_register() when deregistering a PHY. Fixes: a75951217472 ("net: phy: extend fixed driver with fixed_phy_register()") Signed-off-by: Johan Hovold --- drivers/net/phy/fixed_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [patch net-next 0/4] mlxsw: Introduce support for I2C bus

2016-11-16 Thread Jiri Pirko
Dave, I made sure that the patchsets in flight which touch mlxsw code do not depend on each other and could be applied in any order you please. Thanks.

[PATCH net 2/3] of_mdio: fix device reference leak in of_phy_find_device

2016-11-16 Thread Johan Hovold
Make sure to drop the reference taken by bus_find_device() before returning NULL from of_phy_find_device() when the found device is not a PHY. Fixes: 6ed742363b9c ("of: of_mdio: Ensure mdio device is a PHY") Signed-off-by: Johan Hovold --- drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(

[PATCH net] cxgb4: do not call napi_hash_del()

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() before netif_napi_del() is dangerous if a synchronize_rcu() is not enforced before NAPI struct freeing. Lets leave this detail to core networking stack and feel more comfortable. Signed-off-by: Eric Dumazet Cc: Hariprasad S --- drivers/net/ethernet/

Re: [PATCH net-next] sfc: remove napi_hash_del() call

2016-11-16 Thread Bert Kenward
On 16/11/16 14:01, Eric Dumazet wrote: > From: Eric Dumazet > > Calling napi_hash_del() after netif_napi_del() is pointless. > > Signed-off-by: Eric Dumazet > Cc: Edward Cree > Cc: Bert Kenward > --- > drivers/net/ethernet/sfc/efx.c |5 ++--- > 1 file changed, 2 insertions(+), 3 deletion

Re: [PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Greentime Hu
On Wed, Nov 16, 2016 at 9:47 PM, Andrew Lunn wrote: > On Wed, Nov 16, 2016 at 04:43:15PM +0800, Greentime Hu wrote: >> To support device tree usage for ftmac100. >> >> Signed-off-by: Greentime Hu >> --- >> drivers/net/ethernet/faraday/ftmac100.c |7 +++ >> 1 file changed, 7 insertions(+)

Re: [PATCH v2 net-next] net/mlx5e: remove napi_hash_del() calls

2016-11-16 Thread Saeed Mahameed
On Wed, Nov 16, 2016 at 4:21 PM, Eric Dumazet wrote: > From: Eric Dumazet > > Calling napi_hash_del() after netif_napi_del() is pointless. > > Signed-off-by: Eric Dumazet > Cc: Saeed Mahameed Acked-by: Saeed Mahameed

[PATCH net 7/7] net: ethernet: ti: cpsw: fix fixed-link phy probe deferral

2016-11-16 Thread Johan Hovold
Make sure to propagate errors from of_phy_register_fixed_link() which can fail with -EPROBE_DEFER. Fixes: 1f71e8c96fc6 ("drivers: net: cpsw: Add support for fixed-link PHY") Signed-off-by: Johan Hovold --- drivers/net/ethernet/ti/cpsw.c | 12 +++- 1 file changed, 7 insertions(+), 5 delet

[PATCH net 1/7] net: ethernet: ti: cpsw: fix bad register access in probe error path

2016-11-16 Thread Johan Hovold
Make sure to resume the platform device to enable clocks before accessing the CPSW registers in the probe error path (e.g. for deferred probe). Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0872d08 ... [] (cpsw_ale_control_set) from [] (cpsw_ale_destroy+0x2c/0x44) [] (cpsw_ale_d

[PATCH net] : add a missing rcu synchronization

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Add a missing synchronize_net() call to avoid potential use after free, since we explicitly call napi_hash_del() to factorize the RCU grace period. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Eric Dumazet Cc: Michael Chan --- drivers/net/et

[PATCH net 4/7] net: ethernet: ti: cpsw: fix of_node and phydev leaks

2016-11-16 Thread Johan Hovold
Make sure to drop references taken and deregister devices registered during probe on probe errors (including deferred probe) and driver unbind. Specifically, PHY of-node references were never released and fixed-link PHY devices were never deregistered. Fixes: 9e42f715264f ("drivers: net: cpsw: ad

[PATCH net 6/7] net: ethernet: ti: cpsw: add missing sanity check

2016-11-16 Thread Johan Hovold
Make sure to check for allocation failures before dereferencing a NULL-pointer during probe. Fixes: 649a1688c960 ("net: ethernet: ti: cpsw: create common struct to hold shared driver data") Signed-off-by: Johan Hovold --- drivers/net/ethernet/ti/cpsw.c | 3 +++ 1 file changed, 3 insertions(+) d

[PATCH net 0/7] net: cpsw: fix leaks and probe deferral

2016-11-16 Thread Johan Hovold
This series fixes as number of leaks and issues in the cpsw probe-error and driver-unbind paths, some which specifically prevented deferred probing. Johan Johan Hovold (7): net: ethernet: ti: cpsw: fix bad register access in probe error path net: ethernet: ti: cpsw: fix mdio device reference

[PATCH net 5/7] net: ethernet: ti: cpsw: fix secondary-emac probe error path

2016-11-16 Thread Johan Hovold
Make sure to deregister the primary device in case the secondary emac fails to probe. kernel BUG at /home/johan/work/omicron/src/linux/net/core/dev.c:7743! ... [] (free_netdev) from [] (cpsw_probe+0x9cc/0xe50) [] (cpsw_probe) from [] (platform_drv_probe+0x5c/0xc0) Fixes: d9ba8f9e6298 ("driver: ne

[PATCH net 2/7] net: ethernet: ti: cpsw: fix mdio device reference leak

2016-11-16 Thread Johan Hovold
Make sure to drop the reference taken by of_find_device_by_node() when looking up an mdio device from a phy_id property during probe. Fixes: 549985ee9c72 ("cpsw: simplify the setup of the register pointers") Signed-off-by: Johan Hovold --- drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1

[PATCH net 3/7] net: ethernet: ti: cpsw: fix deferred probe

2016-11-16 Thread Johan Hovold
Make sure to deregister all child devices also on probe errors to avoid leaks and to fix probe deferral. cpsw 4a10.ethernet: omap_device: omap_device_enable() called from invalid state 1 cpsw 4a10.ethernet: use pm_runtime_put_sync_suspend() in driver? cpsw: probe of 4a10.ethernet fail

[PATCH] bpf: fix possible uninitialized access in inactive rotation

2016-11-16 Thread Arnd Bergmann
This newly added code causes a build warning: kernel/bpf/bpf_lru_list.c: In function '__bpf_lru_list_rotate_inactive': kernel/bpf/bpf_lru_list.c:201:28: error: 'next' may be used uninitialized in this function [-Werror=maybe-uninitialized] The warning is plausible from looking at the code, thoug

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-16 Thread Jerome Brunet
On Wed, 2016-11-16 at 14:23 +0100, Andrew Lunn wrote: > > > > There two kind of PHYs supporting eee, the one advertising eee by > > default (like realtek) and the one not advertising it (like > > micrel). This is just the default register value. > > I don't know too much about EEE. So maybe a d

Re: [PATCH] net: ethernet: faraday: To support device tree usage.

2016-11-16 Thread Andrew Lunn
On Wed, Nov 16, 2016 at 10:26:52PM +0800, Greentime Hu wrote: > On Wed, Nov 16, 2016 at 9:47 PM, Andrew Lunn wrote: > > On Wed, Nov 16, 2016 at 04:43:15PM +0800, Greentime Hu wrote: > >> To support device tree usage for ftmac100. > >> > >> Signed-off-by: Greentime Hu > >> --- > >> drivers/net/et

[PATCH] net: dsa: fix fixed-link-phy device leaks

2016-11-16 Thread Johan Hovold
Make sure to drop the reference taken by of_phy_find_device() when registering and deregistering the fixed-link PHY-device. Note that we need to put both references held at deregistration. Fixes: 39b0c705195e ("net: dsa: Allow configuration of CPU & DSA port speeds/duplex") Signed-off-by: Johan H

Re: [PATCH net-next v2 2/4] bpf, mlx5: fix various refcount issues in mlx5e_xdp_set

2016-11-16 Thread Saeed Mahameed
On Wed, Nov 16, 2016 at 3:54 PM, Daniel Borkmann wrote: > On 11/16/2016 01:25 PM, Saeed Mahameed wrote: >> >> On Wed, Nov 16, 2016 at 2:04 AM, Daniel Borkmann >> wrote: >>> >>> There are multiple issues in mlx5e_xdp_set(): >>> >>> 1) The batched bpf_prog_add() is currently not checked for errors!

Re: [patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-16 Thread Hannes Frederic Sowa
On 16.11.2016 15:09, Jiri Pirko wrote: > From: Ido Schimmel > > Commit b90eb7549499 ("fib: introduce FIB notification infrastructure") > introduced a new notification chain to notify listeners (f.e., switchdev > drivers) about addition and deletion of routes. > > However, upon registration to th

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-16 Thread Andrew Lunn
On Wed, Nov 16, 2016 at 03:51:30PM +0100, Jerome Brunet wrote: > On Wed, 2016-11-16 at 14:23 +0100, Andrew Lunn wrote: > > > > > > There two kind of PHYs supporting eee, the one advertising eee by > > > default (like realtek) and the one not advertising it (like > > > micrel). > > This is just th

Re: [PATCH net 2/3] dt-bindings: net: add DT bindings for realtek phys

2016-11-16 Thread Rob Herring
On Tue, Nov 15, 2016 at 03:29:13PM +0100, Jerome Brunet wrote: > Signed-off-by: Jerome Brunet > Signed-off-by: Neil Armstrong > --- > .../devicetree/bindings/net/realtek-phy.txt | 20 > > 1 file changed, 20 insertions(+) > create mode 100644 Documentation/devicetr

Re: linux kernel 4.6 and 4.7 from backports have bug in congestion module refcount

2016-11-16 Thread Ben Hutchings
[Moving to netdev and debian-kernel lists] On Wed, 2016-11-16 at 16:12 +0200, Panagiotis Malakoudis wrote: > I am using Debian Jessie with backports and with the last kernels, > 4.6.0-0.bpo.1 and 4.7.0-bpo.1 I experience the following WARNING after a > few hours of heavy load tcp traffic. > > Nov

[PATCH net] ixgbevf: fix invalid use of napi_hash_del()

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() before netif_napi_del() is dangerous if a synchronize_rcu() is not enforced before NAPI struct freeing. Lets leave this detail to core networking stack to get it right. Signed-off-by: Eric Dumazet Cc: Jeff Kirsher --- drivers/net/ethernet/intel/ixgb

Re: [patch net-next 6/8] ipv4: fib: Add an API to request a FIB dump

2016-11-16 Thread Ido Schimmel
Hi Hannes, On Wed, Nov 16, 2016 at 03:51:01PM +0100, Hannes Frederic Sowa wrote: > On 16.11.2016 15:09, Jiri Pirko wrote: > > From: Ido Schimmel > > > > Commit b90eb7549499 ("fib: introduce FIB notification infrastructure") > > introduced a new notification chain to notify listeners (f.e., switc

Re: [PATCH net 2/3] dt-bindings: net: add DT bindings for realtek phys

2016-11-16 Thread Jerome Brunet
On Wed, 2016-11-16 at 09:11 -0600, Rob Herring wrote: > On Tue, Nov 15, 2016 at 03:29:13PM +0100, Jerome Brunet wrote: > > > > Signed-off-by: Jerome Brunet > > Signed-off-by: Neil Armstrong > > --- > >  .../devicetree/bindings/net/realtek-phy.txt  | 20 > > > >  1 fil

Cannot set IPv6 address

2016-11-16 Thread Saeed Mahameed
Hi David, The following commit introduced a new issue when setting IPv6 address via the following command: /sbin/ip -6 addr add 2001:0db8:0:f112::1/64 dev enp2s2 RTNETLINK answers: Operation not supported Offending commit: commit 6c8702c60b88651072460f3f4026c7dfe2521d12 Author: David Lebrun Da

Re: [PATCH net] ixgbevf: fix invalid use of napi_hash_del()

2016-11-16 Thread Eric Dumazet
On Wed, 2016-11-16 at 07:15 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > Calling napi_hash_del() before netif_napi_del() is dangerous > if a synchronize_rcu() is not enforced before NAPI struct freeing. > > Lets leave this detail to core networking stack to get it right. > > Signed-off-b

Re: [PATCH net-next v2 2/4] bpf, mlx5: fix various refcount issues in mlx5e_xdp_set

2016-11-16 Thread Daniel Borkmann
On 11/16/2016 03:30 PM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 3:54 PM, Daniel Borkmann wrote: On 11/16/2016 01:25 PM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 2:04 AM, Daniel Borkmann wrote: There are multiple issues in mlx5e_xdp_set(): 1) The batched bpf_prog_add() is current

[PATCH v2 net] ixgbevf: fix invalid uses of napi_hash_del()

2016-11-16 Thread Eric Dumazet
From: Eric Dumazet Calling napi_hash_del() before netif_napi_del() is dangerous if a synchronize_rcu() is not enforced before NAPI struct freeing. Lets leave this detail to core networking stack to get it right. Signed-off-by: Eric Dumazet Cc: Jeff Kirsher --- drivers/net/ethernet/intel/ixgb

[PATCH net] ip6_tunnel: disable caching when the traffic class is inherited

2016-11-16 Thread Paolo Abeni
If an ip6 tunnel is configured to inherit the traffic class from the inner header, the dst_cache must be disabled or it will foul the policy routing. The issue is apprently there since at leat Linux-2.6.12-rc2. Reported-by: Liam McBirnie Cc: Liam McBirnie Acked-by: Hannes Frederic Sowa Signed-

Re: Cannot set IPv6 address

2016-11-16 Thread Eric Dumazet
On Wed, 2016-11-16 at 17:22 +0200, Saeed Mahameed wrote: > Hi David, > > The following commit introduced a new issue when setting IPv6 address > via the following command: > > /sbin/ip -6 addr add 2001:0db8:0:f112::1/64 dev enp2s2 > RTNETLINK answers: Operation not supported > > Offending commit

RE: [PATCH] lan78xx: relocate mdix setting to phy driver

2016-11-16 Thread Woojung.Huh
> static void lan88xx_set_mdix(struct phy_device *phydev) > { > int buf; > int mask_val; > > switch (phydev->mdix) { > case ETH_TP_MDI: > mask_val = LAN88XX_EXT_MODE_CTRL_MDI_; > break; > case ETH_TP_MDI_X: > mask_val = LAN88X

Re: Cannot set IPv6 address

2016-11-16 Thread David Lebrun
On 11/16/2016 04:22 PM, Saeed Mahameed wrote: > Hi David, > > The following commit introduced a new issue when setting IPv6 address > via the following command: > > /sbin/ip -6 addr add 2001:0db8:0:f112::1/64 dev enp2s2 > RTNETLINK answers: Operation not supported > > Offending commit: > > comm

Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options

2016-11-16 Thread Jerome Brunet
On Wed, 2016-11-16 at 16:06 +0100, Andrew Lunn wrote: > On Wed, Nov 16, 2016 at 03:51:30PM +0100, Jerome Brunet wrote: > > > > On Wed, 2016-11-16 at 14:23 +0100, Andrew Lunn wrote: > > > > > > > > > > > > > > > There two kind of PHYs supporting eee, the one advertising eee > > > > by > > > > de

Re: [PATCH net-next v2] ipv6: sr: fix IPv6 initialization failure without lwtunnels

2016-11-16 Thread Roopa Prabhu
On 11/15/16, 7:18 AM, David Miller wrote: > From: David Lebrun > Date: Tue, 15 Nov 2016 11:17:20 +0100 > >> On 11/14/2016 03:22 PM, Roopa Prabhu wrote: >>> I prefer option b). most LWTUNNEL encaps are done this way. >>> >>> seg6 and seg6_iptunnel is new segment routing code and can be under >>> CO

Re: [PATCH net-next v2 3/4] bpf, mlx5: drop priv->xdp_prog reference on netdev cleanup

2016-11-16 Thread Daniel Borkmann
On 11/16/2016 01:51 PM, Saeed Mahameed wrote: On Wed, Nov 16, 2016 at 2:04 AM, Daniel Borkmann wrote: mlx5e_xdp_set() is currently the only place where we drop reference on the prog sitting in priv->xdp_prog when it's exchanged by a new one. We also need to make sure that we eventually release

  1   2   3   >