[PATCH net-next 8/8] net: ena: bug fix in lost tx packets detection mechanism

2017-06-08 Thread netanel
From: Netanel Belgazal check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation where the driver reset the

[PATCH net-next 6/8] net: ena: fix theoretical Rx stuck on low memory systems

2017-06-08 Thread netanel
From: Netanel Belgazal For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers to post incoming packet, lead

[PATCH net-next 7/8] net: ena: disable admin msix while working in polling mode

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c index ea60b9e..f5b237e 100644 --- a/drivers/net

[PATCH net-next 5/8] net: ena: add missing unmap bars on device removal

2017-06-08 Thread netanel
From: Netanel Belgazal This patch also change the mapping functions to devm_ functions Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netde

[PATCH net-next 3/8] net: ena: add missing return when ena_com_get_io_handlers() fails

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 0e3c60c7..1e71e89 100644 --- a/drivers

[PATCH net-next 6/8] net: ena: fix theoretical Rx hang on low memory systems

2017-06-08 Thread netanel
From: Netanel Belgazal For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers to post incoming packet, lead

[PATCH net-next 2/8] net: ena: fix bug that might cause hang after consecutive open/close interface.

2017-06-08 Thread netanel
From: Netanel Belgazal Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still masked so no interrupt will

[PATCH net-next 1/8] net: ena: fix rare uncompleted admin command false alarm

2017-06-08 Thread netanel
From: Netanel Belgazal The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the thread/workqueue was not sche

[PATCH net-next 0/8] Bug fixes in ena ethernet driver

2017-06-08 Thread netanel
From: Netanel Belgazal This patchset contains fixes for the bugs that were discovered so far. Netanel Belgazal (8): net: ena: fix rare uncompleted admin command false alarm net: ena: fix bug that might cause hang after consecutive open/close interface. net: ena: add missing return when

[PATCH net-next 4/8] net: ena: fix race condition between submit and completion admin command

2017-06-08 Thread netanel
From: Netanel Belgazal Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command failed). Root cause: __ena_com_submit_admin_cmd() i

Re: [PATCH v2 7/8] net: mvmdio: add xmdio support

2017-06-08 Thread Antoine Tenart
Hi Andrew, On Thu, Jun 08, 2017 at 06:03:31PM +0200, Andrew Lunn wrote: > On Thu, Jun 08, 2017 at 11:26:52AM +0200, Antoine Tenart wrote: > > +#define MVMDIO_XSMI_MGNT_REG 0x0 > > +#define MVMDIO_XSMI_READ_VALIDBIT(29) > > +#define MVMDIO_XSMI_BUSY BIT(30) > >

Re: [PATCH v2 7/8] net: mvmdio: add xmdio support

2017-06-08 Thread Antoine Tenart
Hello Florian, Andrew, On Thu, Jun 08, 2017 at 06:55:46PM +0200, Andrew Lunn wrote: > On Thu, Jun 08, 2017 at 09:42:21AM -0700, Florian Fainelli wrote: > > On 06/08/2017 02:26 AM, Antoine Tenart wrote: > > > This patch adds the xMDIO interface support in the mvmdio driver. This > > > interface is

Re: [PATCH net] ipv4: igmp: fix a use after free

2017-06-08 Thread Xin Long
On Fri, Jun 9, 2017 at 2:05 PM, Cong Wang wrote: > On Thu, Jun 8, 2017 at 6:37 PM, Eric Dumazet wrote: >> On Thu, 2017-06-08 at 17:59 -0700, Cong Wang wrote: >>> On Thu, Jun 8, 2017 at 1:33 PM, Eric Dumazet wrote: >>> > I mentioned (in https://lkml.org/lkml/2017/5/31/619 ) that we might need >>>

Re: [PATCH net] ipv4: igmp: fix a use after free

2017-06-08 Thread Xin Long
On Fri, Jun 9, 2017 at 8:59 AM, Cong Wang wrote: > On Thu, Jun 8, 2017 at 1:33 PM, Eric Dumazet wrote: >> I mentioned (in https://lkml.org/lkml/2017/5/31/619 ) that we might need >> to defer freeing after rcu grace period but for some reason decided it >> was not needed. Yes, this one could fix

ixgbe tx hang with XDP_TX beyond queue limit

2017-06-08 Thread Brenden Blanco
Hi, I am doing some XDP testing on a dual socket, combined 40 core machine with ixgbe. I have found that with the default settings, depending on which core a packet is received on, the xdp tx queue will hang with: ixgbe :01:00.0 eno1: Detected Tx Unit Hang (XDP) Tx Queue <38

Re: [PATCH net] ipv4: igmp: fix a use after free

2017-06-08 Thread Cong Wang
On Thu, Jun 8, 2017 at 6:37 PM, Eric Dumazet wrote: > On Thu, 2017-06-08 at 17:59 -0700, Cong Wang wrote: >> On Thu, Jun 8, 2017 at 1:33 PM, Eric Dumazet wrote: >> > I mentioned (in https://lkml.org/lkml/2017/5/31/619 ) that we might need >> > to defer freeing after rcu grace period but for some

Re: Repeatable inet6_dump_fib crash in stock 4.12.0-rc4+

2017-06-08 Thread Cong Wang
On Thu, Jun 8, 2017 at 2:27 PM, Ben Greear wrote: > > As far as I can tell, the patch did not help, or at least we still reproduce > the > crash easily. netlink dump is serialized by nlk->cb_mutex so I don't think that patch makes any sense w.r.t race condition. > (gdb) l *(fib6_walk_continue+0

[PATCH net-next v2] cxgb4: handle interrupt raised when FW crashes

2017-06-08 Thread Ganesh Goudar
From: Rahul Lakkireddy Handle TIMER0INT when FW crashes. Check for PCIE_FW[FW_EVAL] and if it says "Device FW Crashed", then treat it as fatal. Else, non-fatal. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- v2: Following the reverse chirstmas tree variable ordering --- dri

[PATCH net-next 1/2] bpf: Fix test_bpf_obj_id() when the bpf_jit_enable sysctl is diabled

2017-06-08 Thread Martin KaFai Lau
test_bpf_obj_id() should not expect a non zero jited_prog_len to be returned by bpf_obj_get_info_by_fd() when net.core.bpf_jit_enable is 0. The patch checks for net.core.bpf_jit_enable and has different expectation on jited_prog_len. This patch also removes the pwd.h header which I forgot to remo

[PATCH net-next 2/2] bpf: Fix test_obj_id.c for llvm 5.0

2017-06-08 Thread Martin KaFai Lau
llvm 5.0 does not like the section name and the function name to be the same: clang -I. -I./include/uapi -I../../../include/uapi \ -I../../../../samples/bpf/ \ -Wno-compare-distinct-pointer-types \ -O2 -target bpf -c \ linux/tools/testing/selftests/bpf/test_obj_id.c

[PATCH] netfilter: ctnetlink: move CTA_TIMEOUT case to outside

2017-06-08 Thread Haishuang Yan
When cda[CTA_TIMEOUT] is zero, ctnetlink_new_conntrack will free allocated ct and return, so move it to outside to optimize this situation. Signed-off-by: Haishuang Yan --- net/netfilter/nf_conntrack_netlink.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/netfilter/

[PATCH net-next 2/5] nfp: remove automatic caching of RTsym table

2017-06-08 Thread Jakub Kicinski
The fact that RTsym table is cached inside nfp_cpp handle is a relic of old times when nfpcore was a library module. All the nfp_cpp "caches" are awkward to deal with because of concurrency and prone to keeping stale information. Make the run time symbol table be an object read out from the devic

[PATCH net-next 1/5] nfp: make sure to cancel port refresh on the error path

2017-06-08 Thread Jakub Kicinski
If very last stages of netdev registering and init fail some other netdevs and devlink ports may have been visible to user space before we torn them back down. In this case there is a slight chance user may have triggered port refresh. We need to make sure the async work is cancelled. We have to

[PATCH net-next 4/5] nfp: keep MIP object around

2017-06-08 Thread Jakub Kicinski
Microcode Information Page contains some useful information, like application firmware build name. Keep it around, similar to RTSym and HWInfo. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_main.c | 5 - drivers/net/ethernet/netronome/nfp/nfp_main.h

[PATCH net-next 0/5] nfp: FW app build name reporting

2017-06-08 Thread Jakub Kicinski
Hi! This series adds reporting FW build name in ethtool -i. Most of the patches are restructuring where information caching is done. There is also a minor error path fix. These are last few patches finishing the basic nfp_app support. Jakub Kicinski (5): nfp: make sure to cancel port refres

[PATCH net-next 5/5] nfp: report application FW build name in ethtool -i

2017-06-08 Thread Jakub Kicinski
Make sure application FW build name is NULL-terminated and print it as a part of ethtool's firmware version string. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_app.c | 8 drivers/net/ethernet/netronome/nfp/nfp_app.h | 1 + drivers/net/ether

[PATCH net-next 3/5] nfp: remove automatic caching of HWInfo

2017-06-08 Thread Jakub Kicinski
Make callers take care of managing life time of HWInfo. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_app_nic.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_main.c | 20 --- drivers/net/ethernet/netronome/nfp/nfp_main.h | 5 +- drivers/net/ethernet/

[PATCH] wireless: wlcore: spi: remove unnecessary variable

2017-06-08 Thread Gustavo A. R. Silva
Remove unnecessary variable and refactor the code. Addresses-Coverity-ID: 1365000 Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/ti/wlcore/spi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti

[PATCH net-next] liquidio: disallow enabling firmware debug from a VF

2017-06-08 Thread Felix Manlunas
From: Derek Chickles Disallow enabling firmware debug from a VF. Only PF is allowed to do that. Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 9 - drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 4 2 fil

Re: [PATCH net] ipv4: igmp: fix a use after free

2017-06-08 Thread Eric Dumazet
On Thu, 2017-06-08 at 17:59 -0700, Cong Wang wrote: > On Thu, Jun 8, 2017 at 1:33 PM, Eric Dumazet wrote: > > I mentioned (in https://lkml.org/lkml/2017/5/31/619 ) that we might need > > to defer freeing after rcu grace period but for some reason decided it > > was not needed. > > This one makes

Re: [PATCH net] ipv4: igmp: fix a use after free

2017-06-08 Thread Cong Wang
On Thu, Jun 8, 2017 at 1:33 PM, Eric Dumazet wrote: > I mentioned (in https://lkml.org/lkml/2017/5/31/619 ) that we might need > to defer freeing after rcu grace period but for some reason decided it > was not needed. This one makes sense, it is the second time I saw the use-after-free in igmp co

Re: [PATCH v3 2/2] ip6_tunnel: fix potential issue in __ip6_tnl_rcv

2017-06-08 Thread 严海双
> On 8 Jun 2017, at 9:59 PM, David Miller wrote: > > From: 严海双 > Date: Thu, 8 Jun 2017 15:33:58 +0800 > >>> On 8 Jun 2017, at 1:00 PM, Alexei Starovoitov >>> wrote: >>> >>> On Thu, Jun 08, 2017 at 12:56:58PM +0800, 严海双 wrote: > On 8 Jun 2017, at 12:38 PM, Alexei Starovoitov

[PATCH net-next v2] geneve: add missing rx stats accounting

2017-06-08 Thread Girish Moodalbail
There are few places on the receive path where packet drops and packet errors were not accounted for. This patch fixes that issue. Signed-off-by: Girish Moodalbail --- v0 -> v1: -modified to use canonical post-increment "x++" --- drivers/net/geneve.c | 36

Re: [PATCH net 2/3] bonding: fix 802.3ad support for 14G speed

2017-06-08 Thread Joe Perches
On Thu, 2017-06-08 at 11:18 +0200, Nicolas Dichtel wrote: > This patch adds 14 Gbps enum definition, and fixes > aggregated bandwidth calculation based on above slave links. Doesn't 14G need to be added to phy.c? --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index a4238cb56731..d1

Re: [PATCH net-next 1/5] net: dsa: Remove master_netdev and use dst->cpu_dp->netdev

2017-06-08 Thread kbuild test robot
Hi Florian, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/net-dsa-Multi-CPU-ground-work/20170607-164203 config: x86_64-randconfig-s0-06090601 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save

Re: [PATCH net-next] net: ethernet: ti: cpdma: do not enable host error misc irq

2017-06-08 Thread David Miller
From: Grygorii Strashko Date: Thu, 8 Jun 2017 13:51:52 -0500 > CPSW driver does not handle this interrupt, so there are no reasons to enable > it in hardware. > > Signed-off-by: Grygorii Strashko Applied.

Re: [PATCH net-next] net: ethernet: ti: cpsw: enable HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter

2017-06-08 Thread David Miller
From: Grygorii Strashko Date: Thu, 8 Jun 2017 13:51:31 -0500 > CPSW driver supports PTP v1 messages, but for unknown reasons this filter > is not advertised. As result, > ./tools/testing/selftests/networking/timestamping/timestamping utility > can't be used for testing of CPSW RX timestamping wit

Re: [PATCH 1/2 net-next] net: stmmac: fix RX routing function name

2017-06-08 Thread David Miller
A patch series should always have a proper "[PATCH 0/N] ..." header posting explaining what the patch series is doing at a high level, how it is doing it, and why it is doing it that way. Thank you.

Re: [PATCH] geneve: add missing rx stats accounting

2017-06-08 Thread David Miller
From: Girish Moodalbail Date: Thu, 8 Jun 2017 11:39:49 -0700 > + ++geneve->dev->stats.rx_dropped; Please use the more canonical post-increment "x++" Please do this in your entire patch. Thanks.

Re: [PATCH] net: vrf: Make add_fib_rules per network namespace flag

2017-06-08 Thread David Miller
From: David Ahern Date: Thu, 8 Jun 2017 11:31:11 -0600 > Commit 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create") > adds the l3mdev FIB rule the first time a VRF device is created. However, > it only creates the rule once and only in the namespace the first device > is created

Re: [PATCH net-next 2/8] qed: Revise ll2 Rx completion

2017-06-08 Thread David Miller
From: Yuval Mintz Date: Thu, 8 Jun 2017 19:13:17 +0300 > +struct qed_ll2_comp_rx_data { > + u8 connection_handle; > + void *cookie; > + dma_addr_t rx_buf_addr; > + u16 parse_flags; > + u16 vlan; > + bool b_last_packet; > + > + union { > + u8 placement_offse

Re: [PATCH net-next 1/8] qed: LL2 to use packed information for tx

2017-06-08 Thread David Miller
From: Yuval Mintz Date: Thu, 8 Jun 2017 19:13:16 +0300 > @@ -67,6 +79,21 @@ struct qed_ll2_stats { > u64 sent_bcast_pkts; > }; > > +struct qed_ll2_tx_pkt_info { > + u8 num_of_bds; > + u16 vlan; > + u8 bd_flags; > + u16 l4_hdr_offset_w;/* from start of packet */ > +

[PATCH net-next 0/6] netvsc: small cleanups

2017-06-08 Thread Stephen Hemminger
These are all small optimizations found during development of later features. Stephen Hemminger (6): netvsc: optimize calculation of number of slots netvsc: use hv_get_bytes_to_read netvsc: use typed pointer for internal state netvsc: mark error cases as unlikely netvsc: pass net_device

[PATCH net-next 2/6] netvsc: use hv_get_bytes_to_read

2017-06-08 Thread Stephen Hemminger
Don't need need to look at write space in netvsc_close. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index df6d8e28949e..436a3a

[PATCH net-next 5/6] netvsc: pass net_device to netvsc_init_buf and netvsc_connect_vsp

2017-06-08 Thread Stephen Hemminger
Don't need to find netvsc_device structure, caller already had it. Also rearrange declarations. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/dri

[PATCH net-next 1/6] netvsc: optimize calculation of number of slots

2017-06-08 Thread Stephen Hemminger
Speed up transmit check for fragmented packets by using existing macros to compute number of pages, and eliminate loop since skb fragments each take a page. Number of slots is also unsigned. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 43 ++-

[PATCH net-next 6/6] netvsc: fold in get_outbound_net_device

2017-06-08 Thread Stephen Hemminger
No longer need common code to find get_outbound_net_device. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 4d4fde0c7974..7c5ed8f

[PATCH net-next 4/6] netvsc: mark error cases as unlikely

2017-06-08 Thread Stephen Hemminger
Mark if() statements used for error handling only as unlikely() Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 652453d9fb08..caf89a245ba6 1006

[PATCH net-next 3/6] netvsc: use typed pointer for internal state

2017-06-08 Thread Stephen Hemminger
The element netvsc_device:extension is always a point to RNDIS information. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 262b2ea57

Re: [PATCH net-next 0/8] Bug fixes in ena ethernet driver

2017-06-08 Thread David Miller
Two parallel patch series to the same driver and targetting the same GIT tree is extremely undesirable, please don't do this. Submit one series, and once applied submit the second series. I'm deleting all of your patches from my queue, please resubmit things properly. Thank you.

[PATCH net-next v2 2/7] net: dsa: mv88e6xxx: add egress mode enumeration

2017-06-08 Thread Vivien Didelot
As for the frame mode, add a mv88e6xxx_egress_mode enumeration instead of a 16-bit register mask. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 11 ++- drivers/net/dsa/mv88e6xxx/chip.h | 7 +++ drivers/net/dsa/mv88e6xxx/port.c | 20 ++

[PATCH net-next v2 4/7] net: dsa: mv88e6xxx: do not prefix ops with g1

2017-06-08 Thread Vivien Didelot
The mv88e6xxx_ops describe functionalities, regardless their locations (which can be Global1, Global2, or whatever register set.) Rename the g1_set_cpu_port and g1_set_egress_port ops to set_cpu_port and set_egress_port. No functional changes. Signed-off-by: Vivien Didelot --- drivers/net/dsa/m

[PATCH net-next v2 5/7] net: dsa: mv88e6xxx: rework pause limit operation

2017-06-08 Thread Vivien Didelot
All Marvell chips supporting Pause frames limiting use 1-byte value for input and output. Old chips have both bytes adjacent in a 16-bit register. New ones have an indirect table using 8-bit data. The mv88e6xxx library functions (such as in port.c) must not contain driver logic, but only generic

[PATCH net-next v2 0/7] net: dsa: mv88e6xxx: ops cosmetics

2017-06-08 Thread Vivien Didelot
This patchset brings no functional changes. It is a first step in a bigger cosmetics change to the driver. It simplifies print messages and polishes data types and chip operations. The next patchs will only prefix and document the port registers macros. Changes in v2: - KISS and simply use dev_

[PATCH net-next v2 6/7] net: dsa: mv88e6xxx: rework jumbo size operation

2017-06-08 Thread Vivien Didelot
Marvell chips have a Jumbo Mode to set the maximum frame size (MTU). The mv88e6xxx_ops structure is meant to contain generic functionalities, no driver logic. Change port_jumbo_config to port_set_jumbo_size setting the mode from a given maximum size value. There is no functional changes since we

[PATCH net-next v2 7/7] net: dsa: mv88e6xxx: prefix PHY macros

2017-06-08 Thread Vivien Didelot
Prefix the PHY_* macros with a Marvell specific MV88E6XXX_ prefix. There is no functional changes. Reviewed-by: Andrew Lunn Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/phy.c | 11 ++- drivers/net/dsa/mv88e6xxx/phy.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletion

[PATCH net-next v2 3/7] net: dsa: mv88e6xxx: use bridge state values

2017-06-08 Thread Vivien Didelot
Reuse the BR_STATE_* values to abstract a port STP state value. This provides shorter names and better control over the DSA switch operation call. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 23 ++- drivers/net/dsa/mv88e6xxx/port.c | 20 +

[PATCH net-next v2 1/7] net: dsa: mv888e6xxx: do not use netdev printing

2017-06-08 Thread Vivien Didelot
The mv888e6xxx driver accesses a port's netdev mostly for printing. This is bad for 2 reasons: DSA and CPU ports do not have a netdev pointer; it doesn't give us a correct picture of why a DSA driver might need to access a port's netdev. Instead simply use dev_* printing functions with chip->dev

[PATCH net-next 10/13] net: ena: add mtu limitation in ena_change_mtu()

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 7dee448..7f31f4

[PATCH net-next 12/13] net: ena: change validate_tx_req_id() to be inline function

2017-06-08 Thread netanel
From: Netanel Belgazal for optimization purpose, change validate_tx_req_id() to be inline function. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c

[PATCH net-next 13/13] net: ena: update ena driver to version 1.2.0

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h index 4518a9d..f309a58

[PATCH net-next 07/13] net: ena: use napi_schedule_irqoff when possible

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 04aade8..424b4d7 100644

[PATCH net-next 11/13] net: ena: update driver's rx drop statistics

2017-06-08 Thread netanel
From: Netanel Belgazal rx drop counter is reported by the device in the keep-alive event. update the driver's counter with the device counter. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/n

[PATCH net-next 08/13] net: ena: separate skb allocation to dedicated function

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 +--- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c

[PATCH net-next 09/13] net: ena: adding missing cast in ena_com_mem_addr_set()

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c index f6e1d30..8efb85e 100644 --- a/dri

[PATCH net-next 07/13] net: ena: use napi_schedule_irqoff when possible

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 04aade8..424b4d7 100644

[PATCH net-next 04/13] net: ena: add reset reason for each device FLR

2017-06-08 Thread netanel
From: Netanel Belgazal For each device reset, log to the device what is the cause the reset occur. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++- drivers/net/ethernet/amazon/ena/ena_com.h | 4 +++- drivers/net/ethernet/amazon/ena/ena_netde

[PATCH net-next 6/8] net: ena: fix theoretical Rx hang on low memory systems

2017-06-08 Thread netanel
From: Netanel Belgazal For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers to post incoming packet, lead

[PATCH net-next 05/13] net: ena: add support for out of order rx buffers refill

2017-06-08 Thread netanel
From: Netanel Belgazal ENA driver post Rx buffers through the Rx submission queue for the ENA device to fill them with receive packets. Each Rx buffer is marked with req_id in the Rx descriptor. Newer ENA devices could consume the posted Rx buffer in out of order, and as result the corresponding

[PATCH net-next 02/13] net: ena: add hardware hints capability to the driver

2017-06-08 Thread netanel
From: Netanel Belgazal With this patch, ENA device can update the ena driver about the desired timeout values: These values are part of the "hardware hints" which are transmitted to the driver as Asynchronous event through ENA async event notification queue. In case the ENA device does not suppo

[PATCH net-next 01/13] net: ena: change return value for unsupported features unsupported return value

2017-06-08 Thread netanel
From: Netanel Belgazal return -EOPNOTSUPP instead of -EPERM. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 22 +++--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 +++--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 20

[PATCH net-next 00/13] update ena ethernet driver to version 1.2.0

2017-06-08 Thread netanel
From: Netanel Belgazal This patchset contains some new features/improvements that were added to the ENA driver to increase its robustness and are based on experience of wide ENA deployment. Depends on: [PATCH net-next 0/8] Bug fixes in ena ethernet driver Netanel Belgazal (13): net: ena: chan

[PATCH net-next 06/13] net: ena: allow the driver to work with small number of msix vectors

2017-06-08 Thread netanel
From: Netanel Belgazal Current driver tries to allocate msix vectors as the number of the negotiated io queues. (with another msix vector for management). If pci_alloc_irq_vectors() fails, the driver aborts the probe and the ENA network device is never brought up. With this patch, the driver's l

[PATCH net-next 7/8] net: ena: disable admin msix while working in polling mode

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c index ea60b9e..f5b237e 100644 --- a/drivers/net

[PATCH net-next 03/13] net: ena: change sizeof() argument to be the type pointer

2017-06-08 Thread netanel
From: Netanel Belgazal Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ether

[PATCH net-next 8/8] net: ena: bug fix in lost tx packets detection mechanism

2017-06-08 Thread netanel
From: Netanel Belgazal check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation where the driver reset the

Re: [PATCH v3 1/2] ip_tunnel: fix potential issue in ip_tunnel_rcv

2017-06-08 Thread Pravin Shelar
On Wed, Jun 7, 2017 at 9:32 PM, Haishuang Yan wrote: > When ip_tunnel_rcv fails, the tun_dst won't be freed, so call > dst_release to free it in error code path. > > CC: Pravin B Shelar > Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") > Signed-off-by: Haishuang Yan > > -

[PATCH net-next 2/8] net: ena: fix bug that might cause hang after consecutive open/close interface.

2017-06-08 Thread netanel
From: Netanel Belgazal Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still masked so no interrupt will

[PATCH net-next 3/8] net: ena: add missing return when ena_com_get_io_handlers() fails

2017-06-08 Thread netanel
From: Netanel Belgazal Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 0e3c60c7..1e71e89 100644 --- a/drivers

[PATCH net-next 6/8] net: ena: fix theoretical Rx stuck on low memory systems

2017-06-08 Thread netanel
From: Netanel Belgazal For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers to post incoming packet, lead

[PATCH net-next 4/8] net: ena: fix race condition between submit and completion admin command

2017-06-08 Thread netanel
From: Netanel Belgazal Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command failed). Root cause: __ena_com_submit_admin_cmd() i

[PATCH net-next 5/8] net: ena: add missing unmap bars on device removal

2017-06-08 Thread netanel
From: Netanel Belgazal This patch also change the mapping functions to devm_ functions Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netde

[PATCH net-next 0/8] Bug fixes in ena ethernet driver

2017-06-08 Thread netanel
From: Netanel Belgazal This patchset contains fixes for the bugs that were discovered so far. Netanel Belgazal (8): net: ena: fix rare uncompleted admin command false alarm net: ena: fix bug that might cause hang after consecutive open/close interface. net: ena: add missing return when

[PATCH net-next 1/8] net: ena: fix rare uncompleted admin command false alarm

2017-06-08 Thread netanel
From: Netanel Belgazal The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the thread/workqueue was not sche

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-08 Thread Wei Wang
> Wei Wan is actually working on a patch series removing all this > dst_garbage list stuff. Yes. I am working on removing the dst garbage collector completely. dst_dev_event() will be removed from the list of callbacks that the netdevice notifiers invoke in my patch series. On Thu, Jun 8, 2017 at

[PATCH 2/2(net.git)] stmmac: fix for hw timestamp of GMAC3 unit

2017-06-08 Thread Mario Molitor
>From d5c520880a5f6b470cb150b9aae67341089b9395 Mon Sep 17 00:00:00 2001 From: Mario Molitor Date: Thu, 8 Jun 2017 23:03:09 +0200 Subject: [PATCH 2/2] stmmac: fix for hw timestamp of GMAC3 unit 1.) Bugfix of function stmmac_get_tx_hwtstamp. Corrected the tx timestamp available check (same as 4

[PATCH 1/2(net.git)] stmmac: fix ptp header for GMAC3 hw timestamp

2017-06-08 Thread Mario Molitor
>From ce9c334037fce37ccd715124cda57d1fd6d8cfe8 Mon Sep 17 00:00:00 2001 From: Mario Molitor Date: Thu, 8 Jun 2017 22:41:02 +0200 Subject: [PATCH 1/2] stmmac: fix ptp header for GMAC3 hw timestamp According the CYCLON V documention only the bit 16 of snaptypesel should set. (more information see T

Re: Repeatable inet6_dump_fib crash in stock 4.12.0-rc4+

2017-06-08 Thread Ben Greear
On 06/06/2017 09:19 PM, Eric Dumazet wrote: On Tue, 2017-06-06 at 18:34 -0600, David Ahern wrote: On 6/6/17 6:27 PM, Eric Dumazet wrote: Good catch, but it looks like similar fix is needed a few lines before. diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index deea901746c8570c5e801e405

Aw: Re: [PATCH 2/2(net.git)] stmmac: fix for hw timestamp of GMAC3 unit

2017-06-08 Thread Mario Molitor
Hello David and Andy, thanks for review response. I will fix the patches with your responses. Thanks, Mario

Re: [RFC PATCH net-next 2/5] bpf/verifier: rework value tracking

2017-06-08 Thread Alexei Starovoitov
On Thu, Jun 08, 2017 at 08:38:29PM +0100, Edward Cree wrote: > On 08/06/17 17:45, Alexei Starovoitov wrote: > > On Thu, Jun 08, 2017 at 03:53:36PM +0100, Edward Cree wrote: > > -} else if (reg->type == FRAME_PTR || reg->type == PTR_TO_STACK) > { > +} else if (

Re: [RFC PATCH net-next 3/5] bpf/verifier: feed pointer-to-unknown-scalar casts into scalar ALU path

2017-06-08 Thread Alexei Starovoitov
On Thu, Jun 08, 2017 at 08:07:53PM +0100, Edward Cree wrote: > On 08/06/17 19:41, Alexei Starovoitov wrote: > > On Thu, Jun 08, 2017 at 06:12:39PM +0100, Edward Cree wrote: > >> On 08/06/17 17:50, Alexei Starovoitov wrote: > >>> On Thu, Jun 08, 2017 at 04:25:39PM +0100, Edward Cree wrote: > On

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-08 Thread Eric Dumazet
On Thu, 2017-06-08 at 13:12 -0700, Krister Johansen wrote: ... > Looking at the gc_task intervals, they started at 663ms when we invoked > __dst_free(). After that, they increased to 1663, 3136, 5567, 8191, > 10751, and 14848. The release that set the refcnt to 0 on our dst entry > occurred aft

[PATCHv5] wlcore: add wl1285 compatible

2017-06-08 Thread Sebastian Reichel
Motorola Droid 4 uses a WL 1285C. With differences between chips not being public let's add explicit binding for wl1285 instead of relying on wl1283 being very similar. Reviewed-by: Rob Herring Acked-by: Kalle Valo Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel --- Changes since PATC

Re: [PATCH net] ipv4: igmp: fix a use after free

2017-06-08 Thread Eric Dumazet
On Fri, 2017-06-09 at 02:22 +0800, Xin Long wrote: > On Thu, Jun 8, 2017 at 9:43 PM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > Andrey reported a use-after-free in add_grec(), courtesy of syzkaller. > > > > Problem here is that igmp_stop_timer() uses a del_timer(), so we can not > > guara

Re: [RFC PATCH net-next 0/5] bpf: rewrite value tracking in verifier

2017-06-08 Thread David Miller
From: Edward Cree Date: Wed, 7 Jun 2017 15:55:57 +0100 > This series simplifies alignment tracking, generalises bounds tracking and > fixes some bounds-tracking bugs in the BPF verifier. Pointer arithmetic on > packet pointers, stack pointers, map value pointers and context pointers has > bee

Re: [PATCH net] bpf, tests: fix endianness selection

2017-06-08 Thread David Miller
From: Daniel Borkmann Date: Thu, 8 Jun 2017 19:06:25 +0200 > I noticed that test_l4lb was failing in selftests: ... > Tracking down the issue actually revealed that endianness selection > in bpf_endian.h is broken when compiled with clang with bpf target. > test_pkt_access.c, test_l4lb.c is com

Re: [PATCH] ila_xlat: add missing hash secret initialization

2017-06-08 Thread Tom Herbert
On Thu, Jun 8, 2017 at 12:54 AM, Arnd Bergmann wrote: > While discussing the possible merits of clang warning about unused initialized > functions, I found one function that was clearly meant to be called but > never actually is. > > __ila_hash_secret_init() initializes the hash value for the ila

[PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-08 Thread Krister Johansen
It looks like this: Message from syslogd@flamingo at Apr 26 00:45:00 ... kernel:unregister_netdevice: waiting for lo to become free. Usage count = 4 They seem to coincide with net namespace teardown. The message is emitted by netdev_wait_allrefs(). Forced a kdump in netdev_run_todo, but found

[PATCH v2 net-next] Ipvlan should return an error when an address is already in use.

2017-06-08 Thread Krister Johansen
The ipvlan code already knows how to detect when a duplicate address is about to be assigned to an ipvlan device. However, that failure is not propogated outward and leads to a silent failure. Introduce a validation step at ip address creation time and allow device drivers to register to validate

Re: [PATCH 0/5] net: mvpp2: fixes and cleanups

2017-06-08 Thread David Miller
From: Thomas Petazzoni Date: Thu, 8 Jun 2017 17:27:22 +0200 > Here is a small set of fixes/improvements for the mvpp2 driver. > > The first two patches are fixes: they fix bogus usage of > smp_processor_id() in a migration-enabled context. Indeed currently > the driver outputs some fat warnings

  1   2   3   4   >