Re: [Xen-devel] xen-netfront crash when detaching network while some network activity

2015-11-17 Thread David Vrabel
On 21/10/15 19:57, Marek Marczykowski-Górecki wrote: > > Any ideas? No, sorry. Netfront looks correct to me. We take an additional ref for the ref released by gnttab_release_grant_reference(). The get_page() here is safe since we haven't freed the page yet (this is done in the subsequent call

[PATCH net] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-17 Thread Hannes Frederic Sowa
Fix the following warning: CC net/core/rtnetlink.o net/core/rtnetlink.c: In function ‘rtnl_fill_ifinfo’: net/core/rtnetlink.c:1308:1: warning: the frame size of 2864 bytes is larger than 2048 bytes [-Wframe-larger-than=] } ^ by splitting up the huge rtnl_fill_ifinfo into some smaller

Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 20:49 +0800, martinbj2...@gmail.com wrote: > From: Martin Zhang > > 1. new skb only need dst and ip address(v4 or v6). > 2. skb_copy may need high order pages, which is very rare on long running > server. > > Signed-off-by: Junwei Zhang

[PATCH net v2] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-17 Thread Hannes Frederic Sowa
Fix the following warning: CC net/core/rtnetlink.o net/core/rtnetlink.c: In function ‘rtnl_fill_ifinfo’: net/core/rtnetlink.c:1308:1: warning: the frame size of 2864 bytes is larger than 2048 bytes [-Wframe-larger-than=] } ^ by splitting up the huge rtnl_fill_ifinfo into some smaller

Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 05:07 -0800, Eric Dumazet wrote: > On Tue, 2015-11-17 at 20:49 +0800, martinbj2...@gmail.com wrote: > > From: Martin Zhang > > > > 1. new skb only need dst and ip address(v4 or v6). > > 2. skb_copy may need high order pages, which is very rare on

Re: [PATCH net v2] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 14:16 +0100, Hannes Frederic Sowa wrote: > Fix the following warning: > > CC net/core/rtnetlink.o > net/core/rtnetlink.c: In function ‘rtnl_fill_ifinfo’: > net/core/rtnetlink.c:1308:1: warning: the frame size of 2864 bytes is larger > than 2048 bytes

RE: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-17 Thread David Laight
From: David Miller > Sent: 16 November 2015 20:32 > From: "Jason A. Donenfeld" > Date: Mon, 16 Nov 2015 20:52:28 +0100 > > > This works fine with, say, iperf3 in TCP mode. The AVX performance > > is great. However, when using iperf3 in UDP mode, irq_fpu_usable() > > is mostly

[PATCH] Doc: networking: 6lowpan: Fix typo in 6lowpan.txt

2015-11-17 Thread Masanari Iida
This patch fix spelling typos in 6lowpan.txt Signed-off-by: Masanari Iida --- Documentation/networking/6lowpan.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/6lowpan.txt b/Documentation/networking/6lowpan.txt index

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread Jason Baron
On 11/16/2015 05:28 PM, Rainer Weikusat wrote: > An AF_UNIX datagram socket being the client in an n:1 association with > some server socket is only allowed to send messages to the server if the > receive queue of this socket contains at most sk_max_ack_backlog > datagrams. This implies that

[PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-11-17 Thread Stefan Schmidt
From: Markus Elfring Date: Mon, 16 Nov 2015 13:50:23 +0100 The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-11-17 Thread Stefan Schmidt
Hello. On 17/11/15 17:17, Stefan Schmidt wrote: From: Markus Elfring Date: Mon, 16 Nov 2015 13:50:23 +0100 The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was

Re: [PATCH net-next 5/9] net: network drivers no longer need to implement ndo_busy_poll()

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 07:33 -0800, Eric Dumazet wrote: > This is exactly what I suggested in the changelog ;) In v2 I am adding a patch to move skb_mark_napi_id() out of drivers into net core stack (napi_gro_receive() & napi_gro_frags()) But adding the rcu stuff in napi_napi_del() wont be a

[PATCH net] MAINTAINERS: Update Mellanox's Eth NIC driver entries

2015-11-17 Thread Or Gerlitz
Eugenia (Jenny) Emantayev is replacing Amir Vadai as the mlx4 Ethernet driver maintainer. Saeed Mahameed is assigned to maintain mlx5 Eth functionality. Signed-off-by: Or Gerlitz --- Thanks you so much Amir for the endless time you invested in the driver, it has been a

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue

2015-11-17 Thread Jason Baron
On 11/15/2015 01:32 PM, Rainer Weikusat wrote: > > That was my original idea. The problem with this is that the code > starting after the _lock and running until the main code path unlock has > to be executed in one go with the other lock held as the results of the > tests above this one may

Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-11-17 Thread Stefan Schmidt
Hello. On 17/11/15 15:01, Marcel Holtmann wrote: Hi Stefan, The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: [PATCH 2/3] libceph: use list_next_entry instead of list_entry_next

2015-11-17 Thread Ilya Dryomov
On Mon, Nov 16, 2015 at 2:46 PM, Geliang Tang wrote: > list_next_entry has been defined in list.h, so I replace list_entry_next > with it. > > Signed-off-by: Geliang Tang > --- > net/ceph/messenger.c | 7 ++- > 1 file changed, 2 insertions(+), 5

Re: [PATCH net] af_unix: take receive queue lock while appending new skb

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 15:55 +0100, Hannes Frederic Sowa wrote: > I want to move to unix_state_lock and completely drop sk_buff_head.lock > in af_unix, as such I would prefer to keep it this way as in some other > places in af_unix.c (e.g. unix_stream_connect). > > Or do you have a strong opinion

Re: Hit regression with TCP_TW REUSE/RECYCLE

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 14:35 +0800, Ethan Zhao wrote: > Tested the same case with 4.4-RC1, it was fixed in 4.4-RC1. > But don't know which commit fixed it. > > # echo 1024 65535 > /proc/sys/net/ipv4/ip_local_port_range > # cat /proc/sys/net/ipv4/ip_local_port_range > 102465535 > # echo 1 >

[PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.

2015-11-17 Thread martinbj2008
From: Martin Zhang 1. new skb only need dst and ip address(v4 or v6). 2. skb_copy may need high order pages, which is very rare on long running server. Signed-off-by: Junwei Zhang Signed-off-by: Martin Zhang ---

Re: [PATCH net] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 13:48 +0100, Hannes Frederic Sowa wrote: > Fix the following warning: > > CC net/core/rtnetlink.o > net/core/rtnetlink.c: In function ‘rtnl_fill_ifinfo’: > net/core/rtnetlink.c:1308:1: warning: the frame size of 2864 bytes is larger > than 2048 bytes

Re: [PATCH net-next 5/9] net: network drivers no longer need to implement ndo_busy_poll()

2015-11-17 Thread Eliezer Tamir
On 17/11/2015 15:57, Eric Dumazet wrote: > Instead of having to implement complex ndo_busy_poll() method, > drivers can simply rely on NAPI poll logic. I really like where you are going with this series. ... > We could go one step further, and make busy polling > available for all NAPI drivers,

Re: [PATCH net] af_unix: take receive queue lock while appending new skb

2015-11-17 Thread Hannes Frederic Sowa
Hi Eric, On Tue, Nov 17, 2015, at 15:42, Eric Dumazet wrote: > On Tue, 2015-11-17 at 15:10 +0100, Hannes Frederic Sowa wrote: > > While possibly in future we don't necessarily need to use > > sk_buff_head.lock this is a rather larger change, as it affects the > > af_unix fd garbage collector,

Re: [PATCH net-next 5/9] net: network drivers no longer need to implement ndo_busy_poll()

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 17:14 +0200, Eliezer Tamir wrote: > On 17/11/2015 15:57, Eric Dumazet wrote: > > Instead of having to implement complex ndo_busy_poll() method, > > drivers can simply rely on NAPI poll logic. > > I really like where you are going with this series. > > ... > > > We could go

[PATCH net-next 9/9] mlx4: remove mlx4_en_low_latency_recv()

2015-11-17 Thread Eric Dumazet
Busy polling can now be handled in generic NAPI poll infrastructure. This removes complexity and fast path overhead : mlx4 used two spin_lock()/spin_unlock() pair per napi->poll() call in mlx4_en_cq_lock_napi()/mlx4_en_cq_unlock_napi() Tested: Without busy polling : lpaa23:~# echo 0

[PATCH net-next 5/9] net: network drivers no longer need to implement ndo_busy_poll()

2015-11-17 Thread Eric Dumazet
Instead of having to implement complex ndo_busy_poll() method, drivers can simply rely on NAPI poll logic. Busy polling gains are mainly coming from polling itself, not on exact details on how we poll the device. ndo_busy_poll() if implemented can avoid touching napi state, but it adds extra

[PATCH net-next 7/9] mlx5: support napi_complete_done()

2015-11-17 Thread Eric Dumazet
A NAPI poll handler should return number of RX packets processed, instead of 0 / budget. This allows proper busy poll accounting through LINUX_MIB_BUSYPOLLRXPACKETS SNMP counter. napi_complete_done() allows /sys/class/net/ethX/gro_flush_timeout to be used for finer GRO aggregation control.

[PATCH net-next 2/9] mlx4: mlx4_en_low_latency_recv() called with BH disabled

2015-11-17 Thread Eric Dumazet
mlx4_en_low_latency_recv() is called with BH disabled, as other ndo_busy_poll() methods. No need for spin_lock_bh()/spin_unlock_bh() Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 12 +++- 1 file changed, 7 insertions(+), 5

[PATCH net-next 8/9] bnx2x: remove bnx2x_low_latency_recv() support

2015-11-17 Thread Eric Dumazet
Switch to native NAPI polling, as this reduces overhead and complexity. Normal path is faster, since one cmpxchg() is not anymore requested, and busy polling with the NAPI polling has same performance. Tested: lpk50:~# cat /proc/sys/net/core/busy_read 70 lpk50:~# nstat >/dev/null;./netperf -H

[PATCH net-next 4/9] net: allow BH servicing in sk_busy_loop()

2015-11-17 Thread Eric Dumazet
Instead of blocking BH in whole sk_busy_loop(), block them only around ->ndo_busy_poll() calls. This has many benefits. 1) allow tunneled traffic to use busy poll as well as native traffic. Tunnels handlers usually call netif_rx() and depend on net_rx_action() being run (from sofirq

[PATCH net-next 3/9] net: un-inline sk_busy_loop()

2015-11-17 Thread Eric Dumazet
There is really little gain from inlining this big function. We'll soon make it even bigger in following patches. This means we no longer need to export napi_by_id() Signed-off-by: Eric Dumazet --- include/linux/netdevice.h | 9 - include/net/busy_poll.h | 45

[PATCH net-next 6/9] mlx5: add busy polling support

2015-11-17 Thread Eric Dumazet
It is now easy to add busy polling support to a NAPI driver, with very little impact on normal input path. This patch serves as a reference implementation. Note: A followup patch will add proper napi_complete_done() in mlx5, so that LINUX_MIB_BUSYPOLLRXPACKETS snmp counter is properly handled.

Re: [PATCH net-next 3/9] net: un-inline sk_busy_loop()

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 05:56 -0800, Eric Dumazet wrote: > There is really little gain from inlining this big function. > We'll soon make it even bigger in following patches. I forgot to guard sk_busy_poll() with appropriate #ifdef : This will be added in v2 diff --git a/net/core/dev.c

[PATCH net] net/core: revert "net: fix __netdev_update_features return.." and add comment

2015-11-17 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov This reverts commit 00ee59271777 ("net: fix __netdev_update_features return on ndo_set_features failure") and adds a comment explaining why it's okay to return a value other than 0 upon error. Some drivers might actually change flags and

[PATCH net-next 1/9] net: better skb->sender_cpu and skb->napi_id cohabitation

2015-11-17 Thread Eric Dumazet
skb->sender_cpu and skb->napi_id share a common storage, and we had various bugs about this. We had to call skb_sender_cpu_clear() in some places to not leave a prior skb->napi_id and fool netdev_pick_tx() As suggested by Alexei, we could split the space so that these errors can not happen. 0

[PATCH net-next 0/9] net: extend busy polling support

2015-11-17 Thread Eric Dumazet
This patch series extends busy polling range to tunnels devices, and allows NAPI drivers to support busy polling with trivial changes. No need to provide ndo_busy_poll() method and extra synchronization between ndo_busy_poll() and normal napi->poll() method. This was proven very difficult and bug

Re: [PATCH net] net: fix __netdev_update_features return on ndo_set_features failure

2015-11-17 Thread Michał Mirosław
On Fri, Nov 13, 2015 at 03:20:24PM +0100, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov > > If ndo_set_features fails __netdev_update_features() will return -1 but > this is wrong because it is expected to return 0 if no features were > changed (see

[iproute PATCH] misc/Makefile: use PKG_CONFIG

2015-11-17 Thread Aaro Koskinen
Use PKG_CONFIG from Config - it works better when cross-compiling. Signed-off-by: Aaro Koskinen --- misc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/Makefile b/misc/Makefile index 389c1b0..f50e740 100644 --- a/misc/Makefile +++

Re: [PATCH net] af_unix: take receive queue lock while appending new skb

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 15:10 +0100, Hannes Frederic Sowa wrote: > While possibly in future we don't necessarily need to use > sk_buff_head.lock this is a rather larger change, as it affects the > af_unix fd garbage collector, diag and socket cleanups. This is too much > for a stable patch. > > For

Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-11-17 Thread Marcel Holtmann
Hi Stefan, >> The kfree_skb() function tests whether its argument is NULL and then >> returns immediately. Thus the test around the call is not needed. >> >> This issue was detected by using the Coccinelle software. >> >> Signed-off-by: Markus Elfring >> --- >>

[PATCH net] af_unix: take receive queue lock while appending new skb

2015-11-17 Thread Hannes Frederic Sowa
While possibly in future we don't necessarily need to use sk_buff_head.lock this is a rather larger change, as it affects the af_unix fd garbage collector, diag and socket cleanups. This is too much for a stable patch. For the time being grab sk_buff_head.lock without disabling bh and irqs, so

Re: [PATCH net] net: fix __netdev_update_features return on ndo_set_features failure

2015-11-17 Thread Nikolay Aleksandrov
On 11/17/2015 02:54 PM, Michał Mirosław wrote: > On Fri, Nov 13, 2015 at 03:20:24PM +0100, Nikolay Aleksandrov wrote: >> From: Nikolay Aleksandrov >> >> If ndo_set_features fails __netdev_update_features() will return -1 but >> this is wrong because it is expected to

Asterisk deadlocks since Kernel 4.1

2015-11-17 Thread Stefan Priebe - Profihost AG
Hello, since Upgrading our Asterisk System from Kernel 3.18.17 to 4.1.13 it deadlocks every few hours (kill -9 is the only thing working). Booting with 3.18 again let it run smooth again. An strace shows asterisk is looping like this: [pid 6068] timerfd_gettime(8, , {it_interval={0, 2000},

Re: next build: 235 warnings 3 failures (next/next-20151117)

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 16:44 +, Will Deacon wrote: > Do you know the usage in the kernel causing this warning? /** * sk_state_load - read sk->sk_state for lockless contexts * @sk: socket pointer * * Paired with sk_state_store(). Used in places we do not hold socket lock : *

Re: next build: 235 warnings 3 failures (next/next-20151117)

2015-11-17 Thread Will Deacon
On Tue, Nov 17, 2015 at 06:03:40PM +0100, Arnd Bergmann wrote: > On Tuesday 17 November 2015 16:44:53 Will Deacon wrote: > > > 8< > > > Subject: ARM64: make smp_load_acquire() work with const arguments > > > > > > smp_load_acquire() uses typeof() to declare a local variable for > > >

[PATCH 3/3] dl2k: Implement suspend

2015-11-17 Thread Ondrej Zary
Add suspend/resume support to dl2k driver. Tested on Asus NX1101 (IP1000A) and D-Link DGE-550T (DL-2000). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c | 46 + 1 file changed, 46 insertions(+) diff --git

[PATCH 2/3] dl2k: Reorder and cleanup initialization

2015-11-17 Thread Ondrej Zary
Move HW init and stop into separate functions. Request IRQ only after the HW has been reset (so interrupts are disabled and no stale interrupts are pending). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c | 95 ++---

[PATCH] net-scm: Delete an unnecessary check before the function call "kfree"

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 17:37:22 +0100 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by:

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-17 Thread David Miller
From: Alexei Starovoitov Date: Mon, 16 Nov 2015 20:41:46 -0800 > On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: >> On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi wrote: >> > Save and restore FP/LR in BPF prog prologue and epilogue, save SP

Re: [PATCH] net-scm: Delete an unnecessary check before the function call "kfree"

2015-11-17 Thread David Miller
From: SF Markus Elfring Date: Tue, 17 Nov 2015 17:43:35 +0100 > From: Markus Elfring > Date: Tue, 17 Nov 2015 17:37:22 +0100 > > The kfree() function tests whether its argument is NULL and then > returns immediately. Thus the test

Re: next build: 235 warnings 3 failures (next/next-20151117)

2015-11-17 Thread Arnd Bergmann
On Tuesday 17 November 2015 16:44:53 Will Deacon wrote: > > 8< > > Subject: ARM64: make smp_load_acquire() work with const arguments > > > > smp_load_acquire() uses typeof() to declare a local variable for temporarily > > storing the output of the memory access. This fails when the argument

Re: [PATCH] net-scm: Delete an unnecessary check before the function call "kfree"

2015-11-17 Thread Daniel Borkmann
On 11/17/2015 05:43 PM, SF Markus Elfring wrote: From: Markus Elfring Date: Tue, 17 Nov 2015 17:37:22 +0100 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected

Re: How to do TCP tx checksums

2015-11-17 Thread Ben Greear
On 11/16/2015 09:02 PM, Tom Herbert wrote: On Mon, Nov 16, 2015 at 4:20 PM, Ben Greear wrote: Hello! I'm hacking on (my already hacked) pktgen, trying to get it to send TCP frames. And, having issues getting checksums to work properly. I'm trying this:

[PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list

2015-11-17 Thread Ondrej Zary
If memory allocation fails in alloc_list(), free the already allocated memory and return -ENODEV. In rio_open(), call alloc_list() first and abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list(). Signed-off-by: Ondrej Zary ---

Re: next build: 235 warnings 3 failures (next/next-20151117)

2015-11-17 Thread Will Deacon
Hi Arnd, On Tue, Nov 17, 2015 at 09:57:30AM +0100, Arnd Bergmann wrote: > On Monday 16 November 2015 19:05:05 Olof's autobuilder wrote: > > > > Errors: > > > > arm64.allmodconfig: > > arch/arm64/include/asm/barrier.h:71:3: error: read-only variable '___p1' > > used as 'asm' output > >

Re: How to do TCP tx checksums

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 09:44 -0800, Ben Greear wrote: > And in case it helps, here is the output from dmesg. > > This is an Ethernet frame, and in this case csum-start is the > index of the first byte of the TCP header as far as I can tell. > > [64967.194251] check: 0xf51b csum-start: 34

Re: How to do TCP tx checksums

2015-11-17 Thread Ben Greear
On 11/17/2015 10:26 AM, Eric Dumazet wrote: On Tue, 2015-11-17 at 09:44 -0800, Ben Greear wrote: And in case it helps, here is the output from dmesg. This is an Ethernet frame, and in this case csum-start is the index of the first byte of the TCP header as far as I can tell. [64967.194251]

Re: [PATCH] Doc: networking: 6lowpan: Fix typo in 6lowpan.txt

2015-11-17 Thread Albino B Neto
2015-11-17 14:12 GMT-02:00 Masanari Iida : > This patch fix spelling typos in 6lowpan.txt Sorry, I not saw change. Albino -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: How to do TCP tx checksums

2015-11-17 Thread Ben Greear
On 11/16/2015 09:02 PM, Tom Herbert wrote: On Mon, Nov 16, 2015 at 4:20 PM, Ben Greear wrote: Hello! I'm hacking on (my already hacked) pktgen, trying to get it to send TCP frames. And, having issues getting checksums to work properly. I'm trying this:

Re: net-scm: Delete an unnecessary check before the function call "kfree"

2015-11-17 Thread SF Markus Elfring
> Eric already mentioned that in some situations where it's critical, > it actually slows down the code, i.e. you'll have an extra > function call to get there and inside kfree() / kfree_skb() / etc, > the test is actually marked as unlikely(). How do you think about to add similar annotations to

Re: [PATCH net-next 1/9] net: better skb->sender_cpu and skb->napi_id cohabitation

2015-11-17 Thread Alexei Starovoitov
On Tue, Nov 17, 2015 at 05:56:56AM -0800, Eric Dumazet wrote: > skb->sender_cpu and skb->napi_id share a common storage, > and we had various bugs about this. > > We had to call skb_sender_cpu_clear() in some places to > not leave a prior skb->napi_id and fool netdev_pick_tx() > > As suggested

[PATCH V2 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS

2015-11-17 Thread Salil
This patch adds the support of ethtool TSO option to V1 patch, meant to add support of Hip06 SoC to HNS Signed-off-by: Salil Mehta Signed-off-by: lisheng --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 47 + 1 file

[PATCH V2 net-next 3/5] net:hns: Add Hip06 "TSO(TCP Segment Offload)" support HNS Driver

2015-11-17 Thread Salil
From: Salil Mehta This patch adds the support of "TSO (TCP Segment Offload)" feature provided by the Hip06 ethernet hardware to the HNS ethernet driver. Enabling this feature would help offload the TCP Segmentation process to the Hip06 ethernet hardware. This eventually

[PATCH V2 net-next 0/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem

2015-11-17 Thread Salil
From: Salil Mehta This is PATCH V2 created over previously sent PATCH V1 to add the support of Hip06 SoC to the HNS driver. In general, PATCH V2 adds below over the PATCH V1 sent earlier: 1) Bug Fixes and Clean-up: Internally identified 2) Addresses internal review

[PATCH V2 net-next 2/5] net:hns: Add Hip06 "RSS(Receive Side Scaling)" support to HNS Driver

2015-11-17 Thread Salil
From: Salil Mehta This patch adds the support of "RSS (Receive Side Scaling)" feature provided by the Hip06 ethernet hardware to the HNS ethernet driver. This feature helps in distributing the different flows (mapped as hash by hardware using Toeplitz Hash) to different

[PATCH V2 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem

2015-11-17 Thread Salil
From: Salil Mehta This patchset adds support of Hisilicon Hip06 SoC to the existing HNS ethernet driver. The changes in the driver are mainly due to changes in the DMA descriptor provided by the Hip06 ethernet hardware. These changes need to co-exist with already present

Re: net-scm: Delete an unnecessary check before the function call "kfree"

2015-11-17 Thread Daniel Borkmann
On 11/17/2015 07:05 PM, SF Markus Elfring wrote: Eric already mentioned that in some situations where it's critical, it actually slows down the code, i.e. you'll have an extra function call to get there and inside kfree() / kfree_skb() / etc, the test is actually marked as unlikely(). How do

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue

2015-11-17 Thread Rainer Weikusat
Jason Baron writes: > On 11/15/2015 01:32 PM, Rainer Weikusat wrote: > >> >> That was my original idea. The problem with this is that the code >> starting after the _lock and running until the main code path unlock has >> to be executed in one go with the other lock held as

[PATCH V2 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist"

2015-11-17 Thread Salil
From: Salil Mehta This patch adds the initializzation code to disable the hardware vlan support for VLAN Tag stripping by default for now. Proper support of "hardware VLAN assitance" feature would soon come in the next coming patches. Signed-off-by: Salil Mehta

Re: [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list

2015-11-17 Thread Francois Romieu
Ondrej Zary : > If memory allocation fails in alloc_list(), free the already allocated > memory and return -ENODEV. In rio_open(), call alloc_list() first and > abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list(). > > Signed-off-by: Ondrej Zary

Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 20:40, Tejun Heo wrote: >+static inline bool cgroup_is_descendant(struct cgroup *cgrp, >+ struct cgroup *ancestor) (const struct group *cgrp, const struct group *ancestor) >+{ >+ if (cgrp->root != ancestor->root || cgrp->level <

RFC: right userspace interface for providing 6lowpan contexts

2015-11-17 Thread Alexander Aring
Hi, I recently sent some 6lowpan stateful compression patches to netdev. It provides to setup 6lowpan contexts entries (ipv6 prefixes and prefix-length by id) via debugfs manually at the moment. This means, it works when all other "network nodes" also sets the same ID's inside the table

Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-17 Thread Tejun Heo
On Tue, Nov 17, 2015 at 11:54:54PM +0100, Jan Engelhardt wrote: > > On Tuesday 2015-11-17 20:40, Tejun Heo wrote: > >+static inline bool cgroup_is_descendant(struct cgroup *cgrp, > >+struct cgroup *ancestor) > > (const struct group *cgrp, const struct group

Re: [PATCH iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-17 Thread Tejun Heo
Hello, On Wed, Nov 18, 2015 at 12:02:01AM +0100, Jan Engelhardt wrote: > On Tuesday 2015-11-17 20:42, Tejun Heo wrote: > >+static void cgroup2_save(const void *ip, const struct xt_entry_match *match) > >+{ > >+const struct xt_cgroup2_info *info = (void *)match->data; > >+ > >+printf("%s

Re: [PATCH net] net: fix feature changes on devices without ndo_set_features

2015-11-17 Thread Nikolay Aleksandrov
On 11/18/2015 12:03 AM, Sergei Shtylyov wrote: > Hello. > > On 11/13/2015 04:54 PM, Nikolay Aleksandrov wrote: > >> From: Nikolay Aleksandrov >> >> When __netdev_update_features() was updated to ensure some features are >> disabled on new lower devices, an error was

Re: [PATCH iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 20:42, Tejun Heo wrote: >+static void cgroup2_save(const void *ip, const struct xt_entry_match *match) >+{ >+ const struct xt_cgroup2_info *info = (void *)match->data; >+ >+ printf("%s --path %s", info->invert ? " !" : "", info->path); >+} Can cgroup path names

Re: r8169 regression: UDP packets dropped intermittantly

2015-11-17 Thread Francois Romieu
Jonathan Woithe : [...] > It would be advantageous if we could upgrade this Linux system to a kernel > more recent than 2.6.35.11, but that will require a resolution to this > problem. Since 2.6.35.11 works while current kernels do not, the only other > option is to stick

Re: [PATCH 2/5] kernfs: implement kernfs_walk_and_get()

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 22:20, David Miller wrote: >> +static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */ >> +int len = strlen(path); > ... >> +if (len >= PATH_MAX) >> +return NULL; >> + >> +memcpy(path_buf, path, len + 1); > > static char

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > This leaves only the option of a somewhat incorrect solution and what is > or isn't acceptable in this respect is somewhat difficult to decide. The > basic options would be [...] > - retry sending a limited number of

Re: [PATCH 3/3] dl2k: Implement suspend

2015-11-17 Thread Francois Romieu
Ondrej Zary : [...] > diff --git a/drivers/net/ethernet/dlink/dl2k.c > b/drivers/net/ethernet/dlink/dl2k.c > index 9e9baa0..b53dfa7 100644 > --- a/drivers/net/ethernet/dlink/dl2k.c > +++ b/drivers/net/ethernet/dlink/dl2k.c > @@ -1824,11 +1824,57 @@ rio_remove1 (struct

Re: [PATCH 5/5] netfilter: implement xt_cgroup2 match

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 20:40, Tejun Heo wrote: >@@ -0,0 +1,14 @@ >+#ifndef _XT_CGROUP2_H >+#define _XT_CGROUP2_H >+ >+#include >+ >+struct xt_cgroup2_info { >+ charpath[PATH_MAX]; >+ __u8invert; Should be included? (For PATH_MAX)

Re: [PATCH net] net: fix feature changes on devices without ndo_set_features

2015-11-17 Thread Sergei Shtylyov
Hello. On 11/13/2015 04:54 PM, Nikolay Aleksandrov wrote: From: Nikolay Aleksandrov When __netdev_update_features() was updated to ensure some features are disabled on new lower devices, an error was introduced for devices which don't have the ndo_set_features()

Re: [PATCH net] macvlan: fix leak in macvlan_handle_frame

2015-11-17 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:54:20 +0100 > Reset pskb in macvlan_handle_frame in case skb_share_check returned a > clone. > > Fixes: 8a4eb5734e8d ("net: introduce rx_handler results and logic around > that") > Signed-off-by: Sabrina Dubroca

Re: [PATCH net] ipvlan: fix use after free of skb

2015-11-17 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:44:53 +0100 > ipvlan_handle_frame is a rx_handler, and when it returns a value other > than RX_HANDLER_CONSUMED (here, NET_RX_DROP aka RX_HANDLER_ANOTHER), > __netif_receive_skb_core expects that the skb still exists and will

Re: [PATCH net] ipvlan: fix leak in ipvlan_rcv_frame

2015-11-17 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:34:26 +0100 > Pass a **skb to ipvlan_rcv_frame so that if skb_share_check returns a > new skb, we actually use it during further processing. > > It's safe to ignore the new skb in the ipvlan_xmit_* functions, because > they

Re: [PATCH 0/2] Fix issues with vlans without REORDER_HEADER

2015-11-17 Thread David Miller
From: Vladislav Yasevich Date: Mon, 16 Nov 2015 15:43:43 -0500 > A while ago Phil Sutter brought up an issue with vlans without > REORDER_HEADER and bridges. The problem was that if a vlan > without REORDER_HEADER was a port in the bridge, the bridge ended > up forwarding

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread David Miller
From: Rainer Weikusat Date: Mon, 16 Nov 2015 22:28:40 + > An AF_UNIX datagram socket being the client in an n:1 association with > some server socket is only allowed to send messages to the server if the > receive queue of this socket contains at most

Re: [PATCH net-next] net: phy: Use interrupts when available in NOLINK state

2015-11-17 Thread David Miller
From: Andrew Lunn Date: Mon, 16 Nov 2015 23:36:46 +0100 > The NOLINK state will poll the phy once a second to see if the link > has come up. If the phy has an interrupt line, this polling can be > skipped, since the phy should interrupt when the link returns. > > Signed-off-by:

Re: [PATCH net-next] phy: marvell: Add support for 88E1540 PHY

2015-11-17 Thread David Miller
From: Andrew Lunn Date: Mon, 16 Nov 2015 23:34:41 +0100 > The 88E1540 can be found embedded in the Marvell 88E6352 switch. It > is compatible with the 88E1510, so add support for it, using the > 88E1510 specific functions. > > Signed-off-by: Andrew Lunn

Re: next build: 235 warnings 3 failures (next/next-20151117)

2015-11-17 Thread Arnd Bergmann
On Tuesday 17 November 2015 17:12:37 Will Deacon wrote: > On Tue, Nov 17, 2015 at 06:03:40PM +0100, Arnd Bergmann wrote: > > On Tuesday 17 November 2015 16:44:53 Will Deacon wrote: > > > > 8< > > > > Subject: ARM64: make smp_load_acquire() work with const arguments > > > > > > > >

Re: Asterisk deadlocks since Kernel 4.1

2015-11-17 Thread Stefan Priebe
Am 17.11.2015 um 20:15 schrieb Thomas Gleixner: On Tue, 17 Nov 2015, Stefan Priebe - Profihost AG wrote: since Upgrading our Asterisk System from Kernel 3.18.17 to 4.1.13 it deadlocks every few hours (kill -9 is the only thing working). Booting with 3.18 again let it run smooth again. An

[PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-17 Thread Tejun Heo
cgroup_is_descendant() currently walks up the hierarchy and compares each ancestor to the cgroup in question. While enough for cgroup core usages, this can't be used in hot paths to test cgroup membership. This patch adds cgroup->ancestor_ids[] which records the IDs of all ancestors including

[PATCH 2/5] kernfs: implement kernfs_walk_and_get()

2015-11-17 Thread Tejun Heo
Implement kernfs_walk_and_get() which is similar to kernfs_find_and_get() but can walk a path instead of just a name. Signed-off-by: Tejun Heo Cc: Greg Kroah-Hartman --- fs/kernfs/dir.c| 48

Re: Asterisk deadlocks since Kernel 4.1

2015-11-17 Thread Thomas Gleixner
On Tue, 17 Nov 2015, Stefan Priebe wrote: > I've now also two gdb backtraces from two crashes: > http://pastebin.com/raw.php?i=yih5jNt8 > > http://pastebin.com/raw.php?i=kGEcvH4T They don't tell me anything as I have no idea of the inner workings of asterisk. You might be better of to talk to

[PATCHSET] netfilter, cgroup: implement xt_cgroup2 match

2015-11-17 Thread Tejun Heo
Hello, In cgroup v1, dealing with cgroup membership was difficult because the number of membership associations was unbound. As a result, cgroup v1 grew several controllers whose primary purpose is either tagging membership or pull in configuration knobs from other subsystems so that cgroup

Re: How to do TCP tx checksums

2015-11-17 Thread Daniel Borkmann
On 11/17/2015 07:32 PM, Ben Greear wrote: On 11/17/2015 10:26 AM, Eric Dumazet wrote: On Tue, 2015-11-17 at 09:44 -0800, Ben Greear wrote: And in case it helps, here is the output from dmesg. This is an Ethernet frame, and in this case csum-start is the index of the first byte of the TCP

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-17 Thread David Miller
From: Yang Shi Date: Mon, 16 Nov 2015 14:35:35 -0800 > Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP > in prologue in order to get the correct stack backtrace. > > However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to > change

[PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Tejun Heo
In cgroup v1, dealing with cgroup membership was difficult because the number of membership associations was unbound. As a result, cgroup v1 grew several controllers whose primary purpose is either tagging membership or pull in configuration knobs from other subsystems so that cgroup membership

[PATCH iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-17 Thread Tejun Heo
This patch adds the extension for the xt_cgroup2 which matches packets based on the v2 cgroup path of the associated socket. Signed-off-by: Tejun Heo Cc: Daniel Borkmann --- extensions/libxt_cgroup2.c | 70 +++

[PATCH 3/5] cgroup: implement cgroup_get_from_path() and expose cgroup_put()

2015-11-17 Thread Tejun Heo
Implement cgroup_get_path() using kernfs_walk_and_get() which obtains a default hierarchy cgroup from its path. This will be used to allow cgroup path based matching from outside cgroup proper - e.g. networking and perf. Signed-off-by: Tejun Heo --- include/linux/cgroup.h | 7

Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.

2015-11-17 Thread David Miller
From: martinbj2...@gmail.com Date: Tue, 17 Nov 2015 20:49:30 +0800 > From: Martin Zhang > > 1. new skb only need dst and ip address(v4 or v6). > 2. skb_copy may need high order pages, which is very rare on long running > server. > > Signed-off-by: Junwei Zhang

  1   2   >