Re: net: hang in unregister_netdevice: waiting for lo to become free

2018-04-16 Thread Dmitry Vyukov
On Fri, Apr 13, 2018 at 5:54 PM, Dmitry Vyukov wrote: > On Fri, Apr 13, 2018 at 2:43 PM, Dan Streetman wrote: >> On Thu, Apr 12, 2018 at 8:15 AM, Dmitry Vyukov wrote: >>> On Wed, Feb 21, 2018 at 3:53 PM, Tommi Rantala >>> wrote: On 20.02.2018 18:26, Neil Horman wrote: > > On Tue, F

[PATCH 1/2] net: netsec: enable tx-irq during open callback

2018-04-16 Thread jassisinghbrar
From: Jassi Brar Enable TX-irq as well during ndo_open() as we can not count upon RX to arrive early enough to trigger the napi. This patch is critical for installation over network. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Jassi Brar --- drivers/net/e

[PATCH 2/2] net: socionext: reset hardware in ndo_stop

2018-04-16 Thread jassisinghbrar
From: Masahisa KOJIMA When the interface is down, head/tail of the descriptor ring address is set to 0 in netsec_netdev_stop(). But netsec hardware still keeps the previous descriptor ring address, so there is inconsistency between driver and hardware after interface is up at a later time. To add

[PATCH net] net: mvpp2: Fix TCAM filter reserved range

2018-04-16 Thread Maxime Chevallier
Marvell's PPv2 controller has a Packet Header parser, which uses a fixed-size TCAM array of filter entries. The mvpp2 driver reserves some ranges among the 256 TCAM entries to perform MAC and VID filtering. The rest of the TCAM ids are freely usable for other features, such as IPv4 proto matching.

KASAN: use-after-free Read in llc_conn_ac_send_sabme_cmd_p_set_x

2018-04-16 Thread syzbot
Hello, syzbot hit the following crash on upstream commit 18b7fd1c93e5204355ddbf2608a097d64df81b88 (Sat Apr 14 15:50:50 2018 +) Merge branch 'akpm' (patches from Andrew) syzbot dashboard link: https://syzkaller.appspot.com/bug?extid=6e181fc95081c2cf9051 Unfortunately, I don't have any repr

remove PCI_DMA_BUS_IS_PHYS

2018-04-16 Thread Christoph Hellwig
Hi all, this series tries to get rid of the global and PCI_DMA_BUS_IS_PHYS flag, which causes the block layer and networking code to bounce buffer memory above the dma mask in some cases. It is a leftover from i386 + highmem days and is obsolete now that we have swiotlb or iommus so that the dma

[PATCH 01/12] iscsi_tcp: don't set a bounce limit

2018-04-16 Thread Christoph Hellwig
The default already is to never bounce, so the call is a no-op. Signed-off-by: Christoph Hellwig --- drivers/scsi/iscsi_tcp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 2ba4b68fdb73..b025a0b74341 100644 --- a/drivers/scsi/iscsi_tc

[PATCH 03/12] mtip32xx: don't use block layer bounce buffers

2018-04-16 Thread Christoph Hellwig
mtip32xx just sets the block bounce limit to the dma mask, which means that the iommu or swiotlb already take care of the bounce buffering, and the block bouncing can be removed. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 1 - 1 file changed, 1 deletion(-) diff --g

[PATCH 05/12] sata_nv: don't use block layer bounce buffers

2018-04-16 Thread Christoph Hellwig
sata_nv sets the block bounce limit to the reduce dma mask for ATAPI devices, which means that the iommu or swiotlb already take care of the bounce buffering, and the block bouncing can be removed. Signed-off-by: Christoph Hellwig --- drivers/ata/sata_nv.c | 62 +-

[PATCH 11/12] net: remove the PCI_DMA_BUS_IS_PHYS check in illegal_highdma

2018-04-16 Thread Christoph Hellwig
These days the dma mapping routines must be able to handle any address supported by the device, be that using an iommu, or swiotlb if none is supported. With that the PCI_DMA_BUS_IS_PHYS check in illegal_highdma is not needed and can be removed. Signed-off-by: Christoph Hellwig --- net/core/dev

[PATCH 12/12] PCI: remove PCI_DMA_BUS_IS_PHYS

2018-04-16 Thread Christoph Hellwig
This was used by the ide, scsi and networking code in the past to determine if they should bounce payloads. Now that the dma mapping always have to support dma to all physical memory (thanks to swiotlb for non-iommu systems) there is no need to this crude hack any more. Signed-off-by: Christoph H

[PATCH 10/12] ide: remove the PCI_DMA_BUS_IS_PHYS check

2018-04-16 Thread Christoph Hellwig
We now have ways to deal with drainage in the block layer, and libata has been using it for ages. We also want to get rid of PCI_DMA_BUS_IS_PHYS now, so just reduce the PCI transfer size for ide - anyone who cares for performance on PCI controllers should have switched to libata long ago. Signed-

[PATCH 09/12] ide: kill ide_toggle_bounce

2018-04-16 Thread Christoph Hellwig
ide_toggle_bounce did select various strange block bounce limits, including not bouncing at all as soon as an iommu is present in the system. Given that the dma_map routines now handle any required bounce buffering except for ISA DMA, and the ide code already must handle either ISA DMA or highmem

[PATCH 07/12] scsi: reduce use of block bounce buffers

2018-04-16 Thread Christoph Hellwig
We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but the unchecked_isa_dma case, or the bouncing for highmem pages. Signed-off-by: Christoph Hellw

[PATCH 06/12] memstick: don't call blk_queue_bounce_limit

2018-04-16 Thread Christoph Hellwig
All in-tree host drivers set up a proper dma mask and use the dma-mapping helpers. This means they will be able to deal with any address that we are throwing at them. Signed-off-by: Christoph Hellwig --- drivers/memstick/core/ms_block.c| 5 - drivers/memstick/core/mspro_block.c | 5

[PATCH 08/12] mmc: reduce use of block bounce buffers

2018-04-16 Thread Christoph Hellwig
We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but bouncing for highmem pages. Signed-off-by: Christoph Hellwig --- drivers/mmc/core/queue.c |

[PATCH 04/12] DAC960: don't use block layer bounce buffers

2018-04-16 Thread Christoph Hellwig
DAC960 just sets the block bounce limit to the dma mask, which means that the iommu or swiotlb already take care of the bounce buffering, and the block bouncing can be removed. Signed-off-by: Christoph Hellwig --- drivers/block/DAC960.c | 9 ++--- drivers/block/DAC960.h | 1 - 2 files change

[PATCH 02/12] storsvc: don't set a bounce limit

2018-04-16 Thread Christoph Hellwig
The default already is to never bounce, so the call is a no-op. Signed-off-by: Christoph Hellwig --- drivers/scsi/storvsc_drv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8c51d628b52e..5f2d177c3bd9 100644 --- a/drivers/scsi

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

2018-04-16 Thread Daniel Borkmann
Hi Stephen, hi John, On 04/16/2018 04:30 AM, Stephen Rothwell wrote: > Hi all, > > After merging the bpf tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > kernel/bpf/core.o: In function `sock_map_release': > core.c:(.text+0xd04): multiple definition of `sock_map_rel

[PATCH net] Revert "macsec: missing dev_put() on error in macsec_newlink()"

2018-04-16 Thread Dan Carpenter
This patch is just wrong, sorry. I was trying to fix a static checker warning and misread the code. The reference taken in macsec_newlink() is released in macsec_free_netdev() when the netdevice is destroyed. This reverts commit 5dcd8400884cc4a043a6d4617e042489e5d566a9. Reported-by: Laura Abbot

Re: [PATCH 08/12] mmc: reduce use of block bounce buffers

2018-04-16 Thread Robin Murphy
On 16/04/18 09:50, Christoph Hellwig wrote: We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but bouncing for highmem pages. Signed-off-by: Chri

Re: tcp hang when socket fills up ?

2018-04-16 Thread Florian Westphal
Dominique Martinet wrote: > Eric Dumazet wrote on Sun, Apr 15, 2018: > > Are you sure you do not have some iptables/netfilter stuff ? > > I have a basic firewall setup with default rules e.g. starts with > -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT > in the INPUT chain... > That said, I

Re: XDP performance regression due to CONFIG_RETPOLINE Spectre V2

2018-04-16 Thread Christoph Hellwig
Can you try the following hack which avoids indirect calls entirely for the fast path direct mapping case? --- >From b256a008c1b305e6a1c2afe7c004c54ad2e96d4b Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 16 Apr 2018 14:18:14 +0200 Subject: dma-mapping: bypass dma_ops for direct mapp

Re: SRIOV switchdev mode BoF minutes

2018-04-16 Thread Andy Gospodarek
On Sun, Apr 15, 2018 at 09:01:16AM +0300, Or Gerlitz wrote: > On Sat, Apr 14, 2018 at 2:03 AM, Samudrala, Sridhar > wrote: > > > I meant between PFs on 2 compute nodes. > > If the PF serves as uplink rep, it functions as a switch port -- applications > don't run on switch ports. One way to get

Re: [PATCH v4 net-next 08/19] inet: frags: use rhashtables for reassembly units

2018-04-16 Thread Stefan Schmidt
Hello Eric. On 03/31/2018 09:58 PM, Eric Dumazet wrote: > Some applications still rely on IP fragmentation, and to be fair linux > reassembly unit is not working under any serious load. [...] > --- > Documentation/networking/ip-sysctl.txt | 7 +- > include/net/inet_frag.h |

Re: [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading

2018-04-16 Thread Vlad Yasevich
On 04/11/2018 06:49 PM, Michael S. Tsirkin wrote: > On Mon, Apr 02, 2018 at 09:40:02AM -0400, Vladislav Yasevich wrote: >> To support SCTP checksum offloading, we need to add a new feature >> to virtio_net, so we can negotiate support between the hypervisor >> and the guest. >> >> The signalling to

[PATCH] dt-bindings: net: ravb: Add support for r8a77965 SoC

2018-04-16 Thread Jacopo Mondi
Add documentation for r8a77965 compatible string to renesas ravb device tree bindings documentation. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Sergei Shtylyov --- Renesas R-Car M3-N support has been merged for v4.17. Document the missing d

Re: [PATCH net] Revert "macsec: missing dev_put() on error in macsec_newlink()"

2018-04-16 Thread David Miller
From: Dan Carpenter Date: Mon, 16 Apr 2018 13:17:50 +0300 > This patch is just wrong, sorry. I was trying to fix a static checker > warning and misread the code. The reference taken in macsec_newlink() > is released in macsec_free_netdev() when the netdevice is destroyed. > > This reverts comm

Re: [PATCH net] net: mvpp2: Fix TCAM filter reserved range

2018-04-16 Thread David Miller
From: Maxime Chevallier Date: Mon, 16 Apr 2018 10:07:23 +0200 > Marvell's PPv2 controller has a Packet Header parser, which uses a > fixed-size TCAM array of filter entries. > > The mvpp2 driver reserves some ranges among the 256 TCAM entries to > perform MAC and VID filtering. The rest of the T

Re: [PATCH] dt-bindings: net: ravb: Add support for r8a77965 SoC

2018-04-16 Thread David Miller
From: Jacopo Mondi Date: Mon, 16 Apr 2018 15:55:17 +0200 > Add documentation for r8a77965 compatible string to renesas ravb device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > Reviewed-by: Simon Horman > Acked-by: Sergei Shtylyov > --- >

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-16 Thread Maxime Ripard
On Thu, Apr 12, 2018 at 11:23:30PM +0800, Chen-Yu Tsai wrote: > On Thu, Apr 12, 2018 at 11:11 PM, Icenowy Zheng wrote: > > 于 2018年4月12日 GMT+08:00 下午10:56:28, Maxime Ripard > > 写到: > >>On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy Zheng wrote: > >>> From: Chen-Yu Tsai > >>> > >>> On the Allw

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-16 Thread Icenowy Zheng
于 2018年4月16日 GMT+08:00 下午10:31:30, Maxime Ripard 写到: >On Thu, Apr 12, 2018 at 11:23:30PM +0800, Chen-Yu Tsai wrote: >> On Thu, Apr 12, 2018 at 11:11 PM, Icenowy Zheng >wrote: >> > 于 2018年4月12日 GMT+08:00 下午10:56:28, Maxime Ripard > 写到: >> >>On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy Zheng

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-16 Thread Chen-Yu Tsai
On Mon, Apr 16, 2018 at 10:31 PM, Maxime Ripard wrote: > On Thu, Apr 12, 2018 at 11:23:30PM +0800, Chen-Yu Tsai wrote: >> On Thu, Apr 12, 2018 at 11:11 PM, Icenowy Zheng wrote: >> > 于 2018年4月12日 GMT+08:00 下午10:56:28, Maxime Ripard >> > 写到: >> >>On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy

net-next is OPEN...

2018-04-16 Thread David Miller
You all know the drill: http://vger.kernel.org/~davem/net-next.html Now, let's see if you guys can avoid drowning me all at once this time :-)

Re: [PATCH net] team: avoid adding twice the same option to the event list

2018-04-16 Thread David Miller
From: Paolo Abeni Date: Fri, 13 Apr 2018 13:59:25 +0200 > When parsing the options provided by the user space, > team_nl_cmd_options_set() insert them in a temporary list to send > multiple events with a single message. > While each option's attribute is correctly validated, the code does > not c

Re: [PATCH v3] net: davicom: dm9000: Avoid spinlock recursion during dm9000_timeout routine

2018-04-16 Thread David Miller
From: Liu Xiang Date: Sat, 14 Apr 2018 16:50:34 +0800 > +static bool dm9000_current_in_timeout(struct board_info *db) > +{ > + bool ret = false; > + > + preempt_disable(); > + ret = (db->timeout_cpu == smp_processor_id()); > + preempt_enable(); This doesn't work. As soon as you

Re: [PATCH 0/3] Receive Side Coalescing for macb driver

2018-04-16 Thread David Miller
From: Rafal Ozieblo Date: Sat, 14 Apr 2018 21:53:07 +0100 > This patch series adds support for receive side coalescing > for Cadence GEM driver. Receive segmentation coalescing > is a mechanism to reduce CPU overhead. This is done by > coalescing received TCP message segments together into > a si

bpf-next is OPEN

2018-04-16 Thread Daniel Borkmann
Merge window is over so new bpf-next development round begins.

Re: [PATCH] dt-bindings: net: ravb: Add support for r8a77965 SoC

2018-04-16 Thread Rob Herring
On Mon, Apr 16, 2018 at 03:55:17PM +0200, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to renesas ravb device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > Reviewed-by: Simon Horman > Acked-by: Sergei Shtylyov > ---

[PATCH net-next 01/21] net: Move fib_convert_metrics to metrics file

2018-04-16 Thread David Ahern
Move logic of fib_convert_metrics into ip_metrics_convert. This allows the code that converts netlink attributes into metrics struct to be re-used in a later patch by IPv6. This is mostly a code move with the following changes to variable names: - fi->fib_net becomes net - fc_mx and fc_mx_len

[PATCH net-next 07/21] net/ipv6: Save route type in rt6_info

2018-04-16 Thread David Ahern
The RTN_ type for IPv6 FIB entries is currently embedded in rt6i_flags and dst.error. Since dst is going to be removed, it can no longer be relied on for FIB dumps so save the route type as fib6_type. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 1 + net/ipv6/addrconf.c | 2 ++ net

[PATCH net-next 08/21] net/ipv6: Move nexthop data to fib6_nh

2018-04-16 Thread David Ahern
Introduce fib6_nh structure and move nexthop related data from rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or lwtstate from a FIB lookup perspective are converted to use fib6_nh; datapath references to dst version are left as is. Signed-off-by: David Ahern --- .../net/ethern

[PATCH net-next 10/21] net/ipv6: move metrics from dst to rt6_info

2018-04-16 Thread David Ahern
Similar to IPv4, add fib metrics to the fib struct, which at the moment is rt6_info. Will be moved to fib6_info in a later patch. Copy metrics into dst by reference using refcount. To make the transition: - add dst_metrics to rt6_info. Default to dst_default_metrics if no metrics are passed duri

[PATCH net-next 12/21] net/ipv6: Add fib6_null_entry

2018-04-16 Thread David Ahern
ip6_null_entry will stay a dst based return for lookups that fail to match an entry. Add a new fib6_null_entry which constitutes the root node and leafs for fibs. Replace existing references to ip6_null_entry with the new fib6_null_entry when dealing with FIBs. Signed-off-by: David Ahern --- in

[PATCH net-next 18/21] net/ipv6: introduce fib6_info struct and helpers

2018-04-16 Thread David Ahern
Add fib6_info struct and alloc, destroy, hold and release helpers. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 55 ++ net/ipv6/ip6_fib.c| 60 +++ 2 files changed, 115 insertions(+) diff --

[PATCH net-next 16/21] net/ipv6: Add gfp_flags to route add functions

2018-04-16 Thread David Ahern
Most FIB entries can be added using memory allocated with GFP_KERNEL. Add gfp_flags to ip6_route_add and addrconf_dst_alloc. Code paths that can be reached from the packet path (e.g., ndisc and autoconfig) or atomic notifiers use GFP_ATOMIC; paths from user context (adding addresses and routes) use

[PATCH net-next 05/21] net/ipv6: Pass net namespace to route functions

2018-04-16 Thread David Ahern
Pass network namespace reference into route add, delete and get functions. Signed-off-by: David Ahern --- include/net/ip6_route.h | 12 ++- net/ipv6/addrconf.c | 33 -- net/ipv6/anycast.c | 10 + net/ipv6/ndisc.c| 12 ++- net/i

[PATCH net-next 00/21] net/ipv6: Separate data structures for FIB and data path

2018-04-16 Thread David Ahern
IPv6 uses the same data struct for both control plane (FIB entries) and data path (dst entries). This struct has elements needed for both paths adding memory overhead and complexity (taking a dst hold in most places but an additional reference on rt6i_ref in a few). Furthermore, because of the dst_

[PATCH net-next 03/21] vrf: Move fib6_table into net_vrf

2018-04-16 Thread David Ahern
A later patch removes rt6i_table from rt6_info. Save the ipv6 table for a VRF in net_vrf. fib tables can not be deleted so no reference counting or locking is required. Signed-off-by: David Ahern --- drivers/net/vrf.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(

[PATCH net-next 20/21] net/ipv6: Flip FIB entries to fib6_info

2018-04-16 Thread David Ahern
Convert all code paths referencing a FIB entry from rt6_info to fib6_info. Signed-off-by: David Ahern --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 64 ++--- include/net/if_inet6.h | 4 +- include/net/ip6_fib.h | 42 ++-- in

[PATCH net-next 21/21] net/ipv6: Remove unused code and variables for rt6_info

2018-04-16 Thread David Ahern
Drop unneeded elements from rt6_info struct and rearrange layout to something more relevant for the data path. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 60 +++-- net/ipv6/ip6_fib.c | 22 -- net/ipv6/route.c|

[PATCH net-next 19/21] net/ipv6: separate handling of FIB entries from dst based routes

2018-04-16 Thread David Ahern
Last step before flipping the data type for FIB entries: - use fib6_info_alloc to create FIB entries in ip6_route_info_create and addrconf_dst_alloc - use fib6_info_release in place of dst_release, ip6_rt_put and rt6_release - remove the dst_hold before calling __ip6_ins_rt or ip6_del_rt - when

[PATCH net-next 06/21] net/ipv6: Move support functions up in route.c

2018-04-16 Thread David Ahern
Code move only. Signed-off-by: David Ahern --- net/ipv6/route.c | 119 +++ 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 5a49b37f6995..1d2b6b1c5dae 100644 --- a/net/ipv6/route.c +++ b/

Re: [PATCH net] tcp: clear tp->packets_out when purging write queue

2018-04-16 Thread David Miller
From: Soheil Hassas Yeganeh Date: Sat, 14 Apr 2018 20:44:46 -0400 > From: Soheil Hassas Yeganeh > > Clear tp->packets_out when purging the write queue, otherwise > tcp_rearm_rto() mistakenly assumes TCP write queue is not empty. > This results in NULL pointer dereference. > > Also, remove the

[PATCH net-next 14/21] net/ipv6: Move dst flags to booleans in fib entries

2018-04-16 Thread David Ahern
Continuing to wean FIB paths off of dst_entry, use a bool to hold requests for certain dst settings. Add a helper to convert the flags to DST flags when a FIB entry is converted to a dst_entry. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 5 - net/ipv6/addrconf.c | 4 ++-- net/

[PATCH net-next 13/21] net/ipv6: Add rt6_info create function for ip6_pol_route_lookup

2018-04-16 Thread David Ahern
ip6_pol_route_lookup is the lookup function for ip6_route_lookup and rt6_lookup. At the moment it returns either a reference to a FIB entry or a cached exception. To move FIB entries to a separate struct, this lookup function needs to convert FIB entries to an rt6_info that is returned to the calle

[PATCH net-next 17/21] net/ipv6: Cleanup exception and cache route handling

2018-04-16 Thread David Ahern
IPv6 FIB will only contain FIB entries with exception routes added to the FIB entry. Once this transformation is complete, FIB lookups will return a fib6_info with the lookup functions still returning a dst based rt6_info. The current code uses rt6_info for both paths and overloads the rt6_info var

[PATCH net-next 15/21] net/ipv6: Create a neigh_lookup for FIB entries

2018-04-16 Thread David Ahern
The router discovery code has a FIB entry and wants to validate the gateway has a neighbor entry. Refactor the existing dst_neigh_lookup for IPv6 and create a new function that takes the gateway and device and returns a neighbor entry. Use the new function in ndisc_router_discovery to validate the

[PATCH net-next 09/21] net/ipv6: Defer initialization of dst to data path

2018-04-16 Thread David Ahern
Defer setting dst input, output and error until fib entry is copied. The reject path from ip6_route_info_create is moved to a new function ip6_rt_init_dst_reject with a helper doing the conversion from fib6_type to dst error. The remainder of the new ip6_rt_init_dst is an amalgamtion of dst code

[PATCH net-next 11/21] net/ipv6: move expires into rt6_info

2018-04-16 Thread David Ahern
Add expires to rt6_info for FIB entries, and add fib6 helpers to manage it. Data path use of dst.expires remains. The transition is fairly straightforward: when working with fib entries, rt->dst.expires is just rt->expires, rt6_clean_expires is replaced with fib6_clean_expires, rt6_set_expires bec

[PATCH net-next 04/21] net/ipv6: Pass net to fib6_update_sernum

2018-04-16 Thread David Ahern
Pass net namespace to fib6_update_sernum. It can not be marked const as fib6_new_sernum will change ipv6.fib6_sernum. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 2 +- net/ipv6/ip6_fib.c| 3 +-- net/ipv6/route.c | 10 +- 3 files changed, 7 insertions(+), 8 deletions

[PATCH net-next 02/21] net: Handle null dst in rtnl_put_cacheinfo

2018-04-16 Thread David Ahern
Need to keep expires time for IPv6 routes in a dump of FIB entries. Update rtnl_put_cacheinfo to allow dst to be NULL in which case rta_cacheinfo will only contain non-dst data. Signed-off-by: David Ahern --- net/core/rtnetlink.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) dif

Re: [PATCH] ibmvnic: Clear pending interrupt after device reset

2018-04-16 Thread David Miller
From: Thomas Falcon Date: Sun, 15 Apr 2018 18:53:36 -0500 > Due to a firmware bug, the hypervisor can send an interrupt to a > transmit or receive queue just prior to a partition migration, not > allowing the device enough time to handle it and send an EOI. When > the partition migrates, the inte

Re: Cavium Octeon III network driver.

2018-04-16 Thread Steven J. Hill
On 04/14/2018 07:08 PM, Florian Fainelli wrote: > > net-next tree is currently closed, but once it opens back up, you would > likely want to resubmit those patches. Last I remember they were ready > to go. > The announcement appears on this list for when it is open, correct?

[PATCH net 0/2] tipc: Better check user provided attributes

2018-04-16 Thread Eric Dumazet
syzbot reported a crash in __tipc_nl_net_set() While fixing it, I also had to fix an old bug involving TIPC_NLA_NET_ADDR Eric Dumazet (2): tipc: add policy for TIPC_NLA_NET_ADDR tipc: fix possible crash in __tipc_nl_net_set() net/tipc/net.c | 2 ++ net/tipc/netlink.c | 5 - 2 files

[PATCH net 2/2] tipc: fix possible crash in __tipc_nl_net_set()

2018-04-16 Thread Eric Dumazet
syzbot reported a crash in __tipc_nl_net_set() caused by NULL dereference. We need to check that both TIPC_NLA_NET_NODEID and TIPC_NLA_NET_NODEID_W1 are present. We also need to make sure userland provided u64 attributes. Fixes: d50ccc2d3909 ("tipc: add 128-bit node identifier") Signed-off-by: E

[PATCH net 1/2] tipc: add policy for TIPC_NLA_NET_ADDR

2018-04-16 Thread Eric Dumazet
Before syzbot/KMSAN bites, add the missing policy for TIPC_NLA_NET_ADDR Fixes: 27c21416727a ("tipc: add net set to new netlink api") Signed-off-by: Eric Dumazet Cc: Jon Maloy Cc: Ying Xue --- net/tipc/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tipc/netl

[PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust

2018-04-16 Thread Yafang Shao
tcp_rcv_space_adjust is called every time data is copied to user space, introducing a tcp tracepoint for which could show us when the packet is copied to user. This could help us figure out whether there's latency in user process. When a tcp packet arrives, tcp_rcv_established() will be called and

Re: [PATCH net] net: af_packet: fix race in PACKET_{R|T}X_RING

2018-04-16 Thread David Miller
From: Eric Dumazet Date: Sun, 15 Apr 2018 17:52:04 -0700 > In order to remove the race caught by syzbot [1], we need > to lock the socket before using po->tp_version as this could > change under us otherwise. > > This means lock_sock() and release_sock() must be done by > packet_set_ring() calle

Re: [PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust

2018-04-16 Thread Eric Dumazet
On 04/16/2018 08:33 AM, Yafang Shao wrote: > tcp_rcv_space_adjust is called every time data is copied to user space, > introducing a tcp tracepoint for which could show us when the packet is > copied to user. > This could help us figure out whether there's latency in user process. > > When a tcp

Re: [Patch nf] nf_conntrack_extend: silent a memory leak warning

2018-04-16 Thread Pablo Neira Ayuso
On Fri, Mar 30, 2018 at 01:22:06PM -0700, Cong Wang wrote: > The following memory leak is false postive: > > unreferenced object 0x8f37f156fb38 (size 128): > comm "softirq", pid 0, jiffies 4294899665 (age 11.292s) > hex dump (first 32 bytes): > 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b

Re: [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading

2018-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2018 at 09:45:48AM -0400, Vlad Yasevich wrote: > On 04/11/2018 06:49 PM, Michael S. Tsirkin wrote: > > On Mon, Apr 02, 2018 at 09:40:02AM -0400, Vladislav Yasevich wrote: > >> To support SCTP checksum offloading, we need to add a new feature > >> to virtio_net, so we can negotiate s

[PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr()

2018-04-16 Thread Lorenzo Bianconi
Remove unnecessary check on update_lft variable in addrconf_prefix_rcv_add_addr routine since it is always set to 0. Moreover remove update_lft re-initialization to 0 Signed-off-by: Lorenzo Bianconi --- net/ipv6/addrconf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net

Re: Cavium Octeon III network driver.

2018-04-16 Thread Florian Fainelli
On 04/16/2018 08:29 AM, Steven J. Hill wrote: > On 04/14/2018 07:08 PM, Florian Fainelli wrote: >> >> net-next tree is currently closed, but once it opens back up, you would >> likely want to resubmit those patches. Last I remember they were ready >> to go. >> > The announcement appears on this lis

Re: [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr()

2018-04-16 Thread Lorenzo Bianconi
> Remove unnecessary check on update_lft variable in > addrconf_prefix_rcv_add_addr routine since it is always set to 0. > Moreover remove update_lft re-initialization to 0 > > Signed-off-by: Lorenzo Bianconi > --- > net/ipv6/addrconf.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >

BUG: DSA blocks (some?) multicast traffic

2018-04-16 Thread Russell King - ARM Linux
Hi, Yesterday, I noticed that one of my platforms had become unreachable over IPv6. This platform is connected to a Clearfog, which uses the Marvell 88e6176 switch. The setup is: (rest of network) | | | | | | | Source Netgear switch Clearfog switch

Re: [PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust

2018-04-16 Thread Yafang Shao
On Mon, Apr 16, 2018 at 11:43 PM, Eric Dumazet wrote: > > > On 04/16/2018 08:33 AM, Yafang Shao wrote: >> tcp_rcv_space_adjust is called every time data is copied to user space, >> introducing a tcp tracepoint for which could show us when the packet is >> copied to user. >> This could help us figu

Re: XDP performance regression due to CONFIG_RETPOLINE Spectre V2

2018-04-16 Thread Alexander Duyck
On Mon, Apr 16, 2018 at 5:27 AM, Christoph Hellwig wrote: > Can you try the following hack which avoids indirect calls entirely > for the fast path direct mapping case? > > --- > From b256a008c1b305e6a1c2afe7c004c54ad2e96d4b Mon Sep 17 00:00:00 2001 > From: Christoph Hellwig > Date: Mon, 16 Apr 2

[PATCH net-next 1/1] tc-testing: add sample action tests

2018-04-16 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/sample.json| 588 + 1 file changed, 588 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/sample.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/

Re: [PATCH 1/1] net/mlx4_core: avoid resetting HCA when accessing an offline device

2018-04-16 Thread David Miller
From: Zhu Yanjun Date: Sun, 15 Apr 2018 21:02:07 -0400 > While a faulty cable is used or HCA firmware error, HCA device will > be offline. When the driver is accessing this offline device, the > following call trace will pop out. ... > In the above call trace, the function mlx4_cmd_poll calls th

Re: [PATCH net] net: Fix one possible memleak in ip_setup_cork

2018-04-16 Thread David Miller
From: gfree.w...@vip.163.com Date: Mon, 16 Apr 2018 10:16:45 +0800 > From: Gao Feng > > It would allocate memory in this function when the cork->opt is NULL. But > the memory isn't freed if failed in the latter rt check, and return error > directly. It causes the memleak if its caller is ip_make

Re: [PATCH] ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr()

2018-04-16 Thread David Miller
From: Lorenzo Bianconi Date: Mon, 16 Apr 2018 17:56:33 +0200 > I forgot 'net-next' tag in the subject. Dave should I send a v2? Not necessary.

Re: Stack smash error in latest version of iproute2's 'ip'

2018-04-16 Thread Stephen Hemminger
On Mon, 16 Apr 2018 12:58:00 -0400 (EDT) Paul Claessen wrote: > Greetings, > > I'm getting a "*** stack smashing detected ***: ip terminated" error when > using 'ip macsec show'. > > This happens on Ubuntu 16.04.4 (Xemian) on an AMD64 PC. > ip version is 180402 > > Screen output: > > paul@pa

Re: [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading

2018-04-16 Thread Michael S. Tsirkin
On Mon, Apr 02, 2018 at 09:40:02AM -0400, Vladislav Yasevich wrote: > To support SCTP checksum offloading, we need to add a new feature > to virtio_net, so we can negotiate support between the hypervisor > and the guest. > > The signalling to the guest that an alternate checksum needs to > be used

Re: [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading

2018-04-16 Thread Michael S. Tsirkin
On Mon, Apr 16, 2018 at 09:45:48AM -0400, Vlad Yasevich wrote: > On 04/11/2018 06:49 PM, Michael S. Tsirkin wrote: > > On Mon, Apr 02, 2018 at 09:40:02AM -0400, Vladislav Yasevich wrote: > >> To support SCTP checksum offloading, we need to add a new feature > >> to virtio_net, so we can negotiate s

Re: [PATCH net-next 4/5] tun: Add support for SCTP checksum offload

2018-04-16 Thread Michael S. Tsirkin
On Mon, Apr 02, 2018 at 09:40:05AM -0400, Vladislav Yasevich wrote: > Adds a new tun offload flag to allow for SCTP checksum offload. > The flag has to be set by the user and defaults to "no offload". > > Signed-off-by: Vladislav Yasevich When would user set this flag? Wouldn't that be when user

Re: [PATCH net-next 5/5] macvlan/macvtap: Add support for SCTP checksum offload.

2018-04-16 Thread Michael S. Tsirkin
On Mon, Apr 02, 2018 at 09:40:06AM -0400, Vladislav Yasevich wrote: > Since we now have support for software CRC32c offload, turn it on > for macvlan and macvtap devices so that guests can take advantage > of offload SCTP checksums to the host or host hardware. > > Signed-off-by: Vladislav Yasevic

[PATCH net-next 3/5] tcp: avoid extra wakeups for SO_RCVLOWAT users

2018-04-16 Thread Eric Dumazet
SO_RCVLOWAT is properly handled in tcp_poll(), so that POLLIN is only generated when enough bytes are available in receive queue, after David change (commit c7004482e8dc "tcp: Respect SO_RCVLOWAT in tcp_poll().") But TCP still calls sk->sk_data_ready() for each chunk added in receive queue, meanin

[PATCH net-next 0/5] tcp: add zero copy receive

2018-04-16 Thread Eric Dumazet
This patch series add mmap() support to TCP sockets for RX zero copy. While tcp_mmap() patch itself is quite small (~100 LOC), optimal support for asynchronous mmap() required better SO_RCVLOWAT behavior, and a test program to demonstrate how mmap() on TCP sockets can be used. Note that mmap() (a

[PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-16 Thread Eric Dumazet
Some networks can make sure TCP payload can exactly fit 4KB pages, with well chosen MSS/MTU and architectures. Implement mmap() system call so that applications can avoid copying data without complex splice() games. Note that a successful mmap( X bytes) on TCP socket is consuming bytes, as if rec

[PATCH net-next 1/5] tcp: fix SO_RCVLOWAT and RCVBUF autotuning

2018-04-16 Thread Eric Dumazet
Applications might use SO_RCVLOWAT on TCP socket hoping to receive one [E]POLLIN event only when a given amount of bytes are ready in socket receive queue. Problem is that receive autotuning is not aware of this constraint, meaning sk_rcvbuf might be too small to allow all bytes to be stored. Add

[PATCH net-next 5/5] selftests: net: add tcp_mmap program

2018-04-16 Thread Eric Dumazet
This is a reference program showing how mmap() can be used on TCP flows to implement receive zero copy. Signed-off-by: Eric Dumazet --- tools/testing/selftests/net/Makefile | 2 + tools/testing/selftests/net/tcp_mmap.c | 437 + 2 files changed, 439 insertions(+) crea

[PATCH net-next 2/5] tcp: fix delayed acks behavior for SO_RCVLOWAT

2018-04-16 Thread Eric Dumazet
We should not delay acks if there are not enough bytes in receive queue to satisfy SO_RCVLOWAT. Since [E]POLLIN event is not going to be generated, there is little hope for a delayed ack to be useful. In fact, delaying ACK prevents sender from completing the transfer. Signed-off-by: Eric Dumazet

[PATCH net] Count IPv6 interface receive statistics on the ingress netdev

2018-04-16 Thread Stephen Suryaputra
The statistics such as InHdrErrors should be counted on the ingress netdev rather than on the dev from the dst, which is the egress. Signed-off-by: Stephen Suryaputra --- include/net/addrconf.h | 14 +++ net/ipv6/exthdrs.c | 55 --

Re: [PATCH] net: mediatek: use of_device_get_match_data()

2018-04-16 Thread David Miller
From: Ryder Lee Date: Mon, 16 Apr 2018 10:33:41 +0800 > The usage of of_device_get_match_data() reduce the code size a bit. > > Also, the only way to call mtk_probe() is to match an entry in > of_mtk_match[], so match cannot be NULL. > > Signed-off-by: Ryder Lee Applied to net-next.

Re: [PATCH 1/2] net: netsec: enable tx-irq during open callback

2018-04-16 Thread David Miller
From: jassisinghb...@gmail.com Date: Mon, 16 Apr 2018 12:52:16 +0530 > From: Jassi Brar > > Enable TX-irq as well during ndo_open() as we can not count upon > RX to arrive early enough to trigger the napi. This patch is critical > for installation over network. > > Fixes: 533dd11a12f6 ("net: so

Re: [PATCH 2/2] net: socionext: reset hardware in ndo_stop

2018-04-16 Thread David Miller
From: jassisinghb...@gmail.com Date: Mon, 16 Apr 2018 13:09:59 +0530 > From: Masahisa KOJIMA > > When the interface is down, head/tail of the descriptor > ring address is set to 0 in netsec_netdev_stop(). > But netsec hardware still keeps the previous descriptor > ring address, so there is incon

Re: [ethtool] ethtool: Add register dump support for MICROCHIP LAN78xx

2018-04-16 Thread John W. Linville
On Thu, Apr 05, 2018 at 11:41:28AM +0530, Raghuram Chary J wrote: > This patch adds support for Microchip's lan78xx families > of USB Ethernet controllers to ethtool's dump registers > command. > > This patch is for use with the lan78xx driver. > > Signed-off-by: Raghuram Chary J LGTM -- queued

Re: dma-mapping: bypass dma_ops for direct mappings

2018-04-16 Thread kbuild test robot
Hi Christoph, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc1 next-20180416] [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

[PATCH net-next 0/2] openvswitch: Support conntrack zone limit

2018-04-16 Thread Yi-Hung Wei
Currently, nf_conntrack_max is used to limit the maximum number of conntrack entries in the conntrack table for every network namespace. For the VMs and containers that reside in the same namespace, they share the same conntrack table, and the total # of conntrack entries for all the VMs and contai

  1   2   3   >