[PATCH v2 net-next 0/8] add TX timestamping via cmsg

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh This patch series aim at enabling TX timestamping via cmsg. Currently, to occasionally sample TX timestamping on a socket, applications need to call setsockopt twice: first for enabling timestamps and then for disabling them. This is an unnecessary

Re: [PATCH v2 net-next 2/8] tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO

2016-04-01 Thread Eric Dumazet
On Fri, 2016-04-01 at 11:04 -0400, Soheil Hassas Yeganeh wrote: > From: Soheil Hassas Yeganeh > > SOF_TIMESTAMPING_OPT_ID is set to get data-independent IDs > to associate timestamps with send calls. For TCP connections, > tp->snd_una is used as the starting point to calculate

[RFC v5 5/5] VSOCK: Add Makefile and Kconfig

2016-04-01 Thread Stefan Hajnoczi
From: Asias He Enable virtio-vsock and vhost-vsock. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v4: * Make checkpatch.pl happy with longer option description * Clarify dependency on virtio rather than QEMU as suggested

[RFC v5 3/5] VSOCK: Introduce virtio_transport.ko

2016-04-01 Thread Stefan Hajnoczi
From: Asias He VM sockets virtio transport implementation. This driver runs in the guest. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v5: * Add transport reset event handling * Drop ctrl virtqueue v4: * Add

[RFC v5 4/5] VSOCK: Introduce vhost_vsock.ko

2016-04-01 Thread Stefan Hajnoczi
From: Asias He VM sockets vhost transport implementation. This driver runs on the host. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v5: * Only take rx/tx virtqueues, userspace handles the other virtqueues * Explicitly

[RFC v5 1/5] VSOCK: transport-specific vsock_transport functions

2016-04-01 Thread Stefan Hajnoczi
struct vsock_transport contains function pointers called by AF_VSOCK core code. The transport may want its own transport-specific function pointers and they can be added after struct vsock_transport. Allow the transport to fetch vsock_transport. It can downcast it to access transport-specific

[PATCH v2 net-next 1/8] sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop

2016-04-01 Thread Soheil Hassas Yeganeh
From: Willem de Bruijn To process cmsg's of the SOL_SOCKET level in addition to cmsgs of another level, protocols can call sock_cmsg_send(). This causes a double walk on the cmsghdr list, one for SOL_SOCKET and one for the other level. Extract the inner demultiplex logic

[PATCH v2 net-next 6/8] ipv6: process socket-level control messages in IPv6

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Process socket-level control messages by invoking __sock_cmsg_send in ip6_datagram_send_ctl for control messages on the SOL_SOCKET layer. This makes sure whenever ip6_datagram_send_ctl is called for udp and raw, we also process socket-level control

[PATCH v2 net-next 3/8] tcp: use one bit in TCP_SKB_CB to mark ACK timestamps

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Currently, to avoid a cache line miss for accessing skb_shinfo, tcp_ack_tstamp skips socket that do not have SOF_TIMESTAMPING_TX_ACK bit set in sk_tsflags. This is implemented based on an implicit assumption that the SOF_TIMESTAMPING_TX_ACK is set

[RFC v5 0/5] Add virtio transport for AF_VSOCK

2016-04-01 Thread Stefan Hajnoczi
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but first I want to share the latest version of the code. Several people are playing with vsock now so sharing the latest code should avoid duplicate work.

Re: [PATCH v2 net-next 3/8] tcp: use one bit in TCP_SKB_CB to mark ACK timestamps

2016-04-01 Thread Eric Dumazet
On Fri, 2016-04-01 at 11:04 -0400, Soheil Hassas Yeganeh wrote: > From: Soheil Hassas Yeganeh > > Currently, to avoid a cache line miss for accessing skb_shinfo, > tcp_ack_tstamp skips socket that do not have > SOF_TIMESTAMPING_TX_ACK bit set in sk_tsflags. This is >

[PATCH iproute2] iplink: display IFLA_PHYS_PORT_NAME

2016-04-01 Thread Nicolas Dichtel
Signed-off-by: Nicolas Dichtel --- ip/ipaddress.c | 4 1 file changed, 4 insertions(+) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 3998d8cec4ab..b21c69a7d6ea 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -813,6 +813,10 @@ int print_linkinfo(const

[PATCH v3 net-next] net: ipv4: Consider failed nexthops in multipath routes

2016-04-01 Thread David Ahern
Multipath route lookups should consider knowledge about next hops and not select a hop that is known to be failed. Example: [h2] [h3] 15.0.0.5 | | 3| 3|

[PATCH v2 net-next 06/11] tcp/dccp: do not touch listener sk_refcnt under synflood

2016-04-01 Thread Eric Dumazet
When a SYNFLOOD targets a non SO_REUSEPORT listener, multiple cpus contend on sk->sk_refcnt and sk->sk_wmem_alloc changes. By letting listeners use SOCK_RCU_FREE infrastructure, we can relax TCP_LISTEN lookup rules and avoid touching sk_refcnt Note that we still use SLAB_DESTROY_BY_RCU rules for

[PATCH v2 net-next 02/11] udp: no longer use SLAB_DESTROY_BY_RCU

2016-04-01 Thread Eric Dumazet
Tom Herbert would like not touching UDP socket refcnt for encapsulated traffic. For this to happen, we need to use normal RCU rules, with a grace period before freeing a socket. UDP sockets are not short lived in the high usage case, so the added cost of call_rcu() should not be a concern. This

[PATCH v2 net-next 01/11] net: add SOCK_RCU_FREE socket flag

2016-04-01 Thread Eric Dumazet
We want a generic way to insert an RCU grace period before socket freeing for cases where RCU_SLAB_DESTROY_BY_RCU is adding too much overhead. SLAB_DESTROY_BY_RCU strict rules force us to take a reference on the socket sk_refcnt, and it is a performance problem for UDP encapsulation, or TCP

[PATCH v2 net-next 10/11] ipv4: tcp: set SOCK_USE_WRITE_QUEUE for ip_send_unicast_reply()

2016-04-01 Thread Eric Dumazet
TCP uses per cpu 'sockets' to send some packets : - RST packets ( tcp_v4_send_reset()) ) - ACK packets for SYN_RECV and TIMEWAIT sockets By setting SOCK_USE_WRITE_QUEUE flag, we tell sock_wfree() to not call sk_write_space() since these internal sockets do not care. This gives a small

[PATCH v2 net-next 00/11] net: various udp/tcp changes

2016-04-01 Thread Eric Dumazet
First round of patches for linux-4.7 Add a generic facility for sockets to be freed after an RCU grace period, if they need to. Then UDP stack is changed to no longer use SLAB_DESTROY_BY_RCU, in order to speedup rx processing for traffic encapsulated in UDP. It gives a 17 % speedup for normal

[PATCH v2 net-next 05/11] inet: reqsk_alloc() needs to take care of dead listeners

2016-04-01 Thread Eric Dumazet
We'll soon no longer take a refcount on listeners, so reqsk_alloc() can not assume a listener refcount is not zero. We need to use atomic_inc_not_zero() Signed-off-by: Eric Dumazet --- include/net/request_sock.h | 31 +++ 1 file changed, 15

Re: [PATCH v2 net-next] net: ipv4: Consider unreachable nexthops in multipath routes

2016-04-01 Thread David Ahern
On 4/1/16 2:09 AM, Julian Anastasov wrote: diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index d97268e8ff10..6d423faff0ce 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -1559,17 +1559,45 @@ int fib_sync_up(struct net_device *dev, unsigned int

[PATCH v2 net-next 2/8] tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh SOF_TIMESTAMPING_OPT_ID is set to get data-independent IDs to associate timestamps with send calls. For TCP connections, tp->snd_una is used as the starting point to calculate relative IDs. This socket option will fail if set before the handshake

davinci-mdio: failing to connect to PHY

2016-04-01 Thread Petr Kulhavy
Hi, I'm experiencing a peculiar problem with PHY communication in the current davinci-mdio.c driver. After upgrading from kernel 3.17 to 4.5 my DT based AM1808 board started having issues with the PHY communication. The MAC is detected, the MDIO is detected, the PHY is detected (twice?!?!),

[PATCH v2 net-next 09/11] tcp: increment sk_drops for listeners

2016-04-01 Thread Eric Dumazet
Goal: packets dropped by a listener are accounted for. This adds tcp_listendrop() helper, and clears sk_drops in sk_clone_lock() so that children do not inherit their parent drop count. Note that we no longer increment LINUX_MIB_LISTENDROPS counter when sending a SYNCOOKIE, since the SYN packet

[PATCH v2 net-next 08/11] tcp: increment sk_drops for dropped rx packets

2016-04-01 Thread Eric Dumazet
Now ss can report sk_drops, we can instruct TCP to increment this per socket counter when it drops an incoming frame, to refine monitoring and debugging. Following patch takes care of listeners drops. Signed-off-by: Eric Dumazet --- include/net/sock.h | 7 +++

[PATCH v2 net-next 11/11] tcp: rate limit ACK sent by SYN_RECV request sockets

2016-04-01 Thread Eric Dumazet
Attackers like to use SYNFLOOD targeting one 5-tuple, as they hit a single RX queue (and cpu) on the victim. If they use random sequence numbers in their SYN, we detect they do not match the expected window and send back an ACK. This patch adds a rate limitation, so that the effect of such

[PATCH v2 net-next 07/11] sock_diag: add SK_MEMINFO_DROPS

2016-04-01 Thread Eric Dumazet
Reporting sk_drops to user space was available for UDP sockets using /proc interface. Add this to sock_diag, so that we can have the same information available to ss users, and we'll be able to add sk_drops indications for TCP sockets as well. Signed-off-by: Eric Dumazet

[RFC v5 2/5] VSOCK: Introduce virtio_vsock_common.ko

2016-04-01 Thread Stefan Hajnoczi
From: Asias He This module contains the common code and header files for the following virtio_transporto and vhost_vsock kernel modules. Signed-off-by: Asias He Signed-off-by: Stefan Hajnoczi --- v5: * Add event virtqueue, struct

Re: [PATCH 4/4] samples/bpf: Enable powerpc support

2016-04-01 Thread Naveen N. Rao
On 2016/03/31 10:52AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > ... > >+ > >+#ifdef __powerpc__ > >+#define BPF_KPROBE_READ_RET_IP(ip, ctx) { (ip) = (ctx)->link; } > >+#define BPF_KRETPROBE_READ_RET_IP(ip, ctx) BPF_KPROBE_READ_RET_IP(ip, ctx) > >+#else >

Re: [PATCH 2/4] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-01 Thread Naveen N. Rao
On 2016/03/31 08:19PM, Daniel Borkmann wrote: > On 03/31/2016 07:46 PM, Alexei Starovoitov wrote: > >On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >> clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ > >> -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign > >> \

[PATCH v2 net-next 03/11] tcp/dccp: remove BH disable/enable in lookup

2016-04-01 Thread Eric Dumazet
Since linux 2.6.29, lookups only use rcu locking. Signed-off-by: Eric Dumazet --- include/net/inet_hashtables.h | 7 +-- net/ipv6/inet6_hashtables.c | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/net/inet_hashtables.h

[PATCH v2 net-next 5/8] ipv4: process socket-level control messages in IPv4

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Process socket-level control messages by invoking __sock_cmsg_send in ip_cmsg_send for control messages on the SOL_SOCKET layer. This makes sure whenever ip_cmsg_send is called in udp, icmp, and raw, we also process socket-level control messages.

[PATCH v2 net-next 4/8] sock: accept SO_TIMESTAMPING flags in socket cmsg

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Accept SO_TIMESTAMPING in control messages of the SOL_SOCKET level as a basis to accept timestamping requests per write. This implementation only accepts TX recording flags (i.e., SOF_TIMESTAMPING_TX_HARDWARE, SOF_TIMESTAMPING_TX_SOFTWARE,

[PATCH v2 net-next 8/8] sock: document timestamping via cmsg in Documentation

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Update docs and add code snippet for using cmsg for timestamping. Signed-off-by: Soheil Hassas Yeganeh Acked-by: Willem de Bruijn --- Documentation/networking/timestamping.txt | 48

[PATCH v2 net-next 7/8] sock: enable timestamping using control messages

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Currently, SOL_TIMESTAMPING can only be enabled using setsockopt. This is very costly when users want to sample writes to gather tx timestamps. Add support for enabling SO_TIMESTAMPING via control messages by using tsflags added in `struct

Re: [PATCH 2/4] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-01 Thread Alexei Starovoitov
On 4/1/16 7:37 AM, Naveen N. Rao wrote: On 2016/03/31 08:19PM, Daniel Borkmann wrote: On 03/31/2016 07:46 PM, Alexei Starovoitov wrote: On 3/31/16 4:25 AM, Naveen N. Rao wrote: clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ -D__KERNEL__ -D__ASM_SYSREG_H

[net PATCH 2/2] ipv4/GRO: Make GRO conform to RFC 6864

2016-04-01 Thread Alexander Duyck
RFC 6864 states that the IPv4 ID field MUST NOT be used for purposes other than fragmentation and reassembly. Currently we are looking at this field as a way of identifying what frames can be aggregated and which cannot for GRO. While this is valid for frames that do not have DF set, it is

[net PATCH 1/2] GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU

2016-04-01 Thread Alexander Duyck
This patch fixes an issue I found in which we were dropping frames if we had enabled checksums on GRE headers that were encapsulated by either FOU or GUE. Without this patch I was barely able to get 1 Gb/s of throughput. With this patch applied I am now at least getting around 6 Gb/s. The issue

[net PATCH 0/2] Fixes for GRO and GRE tunnels

2016-04-01 Thread Alexander Duyck
This pair of patches addresses a few issues I have discovered over the last week or so concerning GRO and GRE tunnels. The first patch addresses an item I called out as an issue with FOU/GUE encapsulating GRE, and I finally had a chance to test it and verify that the code concerning it was broken

Re: [PATCH (net.git) 0/3] stmmac MDIO and normal descr fixes

2016-04-01 Thread David Miller
From: Giuseppe Cavallaro Date: Fri, 1 Apr 2016 09:07:13 +0200 > This patch series is to fix the problems below and recently debugged > in this mailing list: > > o to fix a problem for the HW where the normal descriptor > o to fix the mdio registration according to the

[PATCH v2] sctp: use list_* in sctp_list_dequeue

2016-04-01 Thread Marcelo Ricardo Leitner
Use list_* helpers in sctp_list_dequeue, more readable. Signed-off-by: Marcelo Ricardo Leitner --- v2: patch rechecked include/net/sctp/sctp.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h

Re: [PATCH] Marvell phy: add fiber status check for some components

2016-04-01 Thread Andrew Lunn
On Fri, Apr 01, 2016 at 06:33:48PM +0200, Charles-Antoine Couret wrote: > >From a5a7a9828511ff6a522cf742109768207ff89929 Mon Sep 17 00:00:00 2001 > From: Charles-Antoine Couret > Date: Fri, 1 Apr 2016 16:16:35 +0200 > Subject: [PATCH] Marvell phy: add fiber

Re: [PATCH] net: mvneta: use cache_line_size() to get cacheline size

2016-04-01 Thread David Miller
From: Jisheng Zhang Date: Fri, 1 Apr 2016 17:12:49 +0800 > L1_CACHE_BYTES may not be the real cacheline size, use cache_line_size > to determine the cacheline size in runtime. > > Signed-off-by: Jisheng Zhang > Suggested-by: Marcin Wojtas

Re: [PATCH 1/2] ipv6: rework the lock in addrconf_permanent_addr

2016-04-01 Thread David Miller
From: roy.qing...@gmail.com Date: Fri, 1 Apr 2016 17:26:58 +0800 > From: Li RongQing > > 1. nothing of idev is changed, so read lock is enough > 2. ifp is changed, so used ifp->lock or cmpxchg to protect it > > Signed-off-by: Li RongQing You

Re: [PATCH] net: mvpp2: use cache_line_size() to get cacheline size

2016-04-01 Thread David Miller
From: Jisheng Zhang Date: Fri, 1 Apr 2016 17:11:05 +0800 > L1_CACHE_BYTES may not be the real cacheline size, use cache_line_size > to determine the cacheline size in runtime. > > Signed-off-by: Jisheng Zhang > Suggested-by: Marcin Wojtas

Re: [net PATCH 2/2] ipv4/GRO: Make GRO conform to RFC 6864

2016-04-01 Thread Eric Dumazet
On Fri, 2016-04-01 at 11:05 -0700, Alexander Duyck wrote: > RFC 6864 states that the IPv4 ID field MUST NOT be used for purposes other > than fragmentation and reassembly. Currently we are looking at this field > as a way of identifying what frames can be aggregated and which cannot for > GRO.

Re: [PATCH v2 net-next 11/11] tcp: rate limit ACK sent by SYN_RECV request sockets

2016-04-01 Thread Neal Cardwell
On Fri, Apr 1, 2016 at 11:52 AM, Eric Dumazet wrote: > Attackers like to use SYNFLOOD targeting one 5-tuple, as they > hit a single RX queue (and cpu) on the victim. > > If they use random sequence numbers in their SYN, we detect > they do not match the expected window and

Re: qdisc spin lock

2016-04-01 Thread Michael Ma
2016-03-31 19:19 GMT-07:00 David Miller : > From: Michael Ma > Date: Thu, 31 Mar 2016 16:48:43 -0700 > >> I didn't really know that multiple qdiscs can be isolated using MQ so > ... > > Please stop top-posting. Sorry that I wasn't aware of this...

Re: [PATCH] net: mvpp2: fix maybe-uninitialized warning

2016-04-01 Thread David Miller
From: Jisheng Zhang Date: Thu, 31 Mar 2016 17:01:23 +0800 > This is to fix the following maybe-uninitialized warning: > > drivers/net/ethernet/marvell/mvpp2.c:6007:18: warning: 'err' may be > used uninitialized in this function [-Wmaybe-uninitialized] > > Signed-off-by:

Re: [PATCH 3/4] net: w5100: enable to support sleepable register access interface

2016-04-01 Thread Akinobu Mita
2016-04-01 4:30 GMT+09:00 David Miller : > From: Akinobu Mita > Date: Thu, 31 Mar 2016 01:38:39 +0900 > >> + struct sk_buff_head tx_queue; > > The way the queueing works in this driver is that it is only possible > to have one SKB being transmitted

[PATCH v2] sctp: flush if we can't fit another DATA chunk

2016-04-01 Thread Marcelo Ricardo Leitner
There is no point on delaying the packet if we can't fit a single byte of data on it anymore. So lets just reduce the threshold by the amount that a data chunk with 4 bytes (rounding) would use. v2: based on the right tree Signed-off-by: Marcelo Ricardo Leitner ---

Re: Question on rhashtable in worst-case scenario.

2016-04-01 Thread Ben Greear
On 03/31/2016 05:46 PM, Herbert Xu wrote: On Thu, Mar 31, 2016 at 05:29:59PM +0200, Johannes Berg wrote: Does removing this completely disable the "-EEXIST" error? I can't say I fully understand the elasticity stuff in __rhashtable_insert_fast(). What EEXIST error are you talking about? The

[PATCH] Marvell phy: add fiber status check for some components

2016-04-01 Thread Charles-Antoine Couret
>From a5a7a9828511ff6a522cf742109768207ff89929 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 1 Apr 2016 16:16:35 +0200 Subject: [PATCH] Marvell phy: add fiber status check for some components This patch is not tested with all Marvell's phy.

[PATCH] Marvell phy: add fiber status check for some components

2016-04-01 Thread Charles-Antoine Couret
>From a5a7a9828511ff6a522cf742109768207ff89929 Mon Sep 17 00:00:00 2001 From: Charles-Antoine Couret Date: Fri, 1 Apr 2016 16:16:35 +0200 Subject: [PATCH] Marvell phy: add fiber status check for some components This patch is not tested with all Marvell's phy.

Re: [RFC PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-04-01 Thread Alexei Starovoitov
On 4/1/16 2:58 AM, Naveen N. Rao wrote: PPC64 eBPF JIT compiler. Works for both ABIv1 and ABIv2. Enable with: echo 1 > /proc/sys/net/core/bpf_jit_enable or echo 2 > /proc/sys/net/core/bpf_jit_enable ... to see the generated JIT code. This can further be processed with tools/net/bpf_jit_disasm.

Re: [PATCH net 4/4] tcp: various missing rcu_read_lock around __sk_dst_get

2016-04-01 Thread Daniel Borkmann
On 04/01/2016 08:33 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 01 Apr 2016 10:10:11 +0200 Dave, do you need me to resubmit this one w/o changes: http://patchwork.ozlabs.org/patch/603903/ ? I'll apply this and queue it up for -stable, thanks. Ok, thanks!

[Odd commit author id merge via netdev]

2016-04-01 Thread santosh shilimkar
Hi Dave, I noticed something odd while checking the recent commits of mine in kernel.org tree made it via netdev. Don't know if its patchwork tool doing this. Usual author line in my git objects : Author: Santosh Shilimkar But the commits going via your tree seems to be like

Re: [PATCH 4/4] samples/bpf: Enable powerpc support

2016-04-01 Thread Alexei Starovoitov
On 4/1/16 7:41 AM, Naveen N. Rao wrote: On 2016/03/31 10:52AM, Alexei Starovoitov wrote: On 3/31/16 4:25 AM, Naveen N. Rao wrote: ... + +#ifdef __powerpc__ +#define BPF_KPROBE_READ_RET_IP(ip, ctx){ (ip) = (ctx)->link; } +#define BPF_KRETPROBE_READ_RET_IP(ip, ctx)

Re: [RFC PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-04-01 Thread Daniel Borkmann
On 04/01/2016 08:10 PM, Alexei Starovoitov wrote: On 4/1/16 2:58 AM, Naveen N. Rao wrote: PPC64 eBPF JIT compiler. Works for both ABIv1 and ABIv2. Enable with: echo 1 > /proc/sys/net/core/bpf_jit_enable or echo 2 > /proc/sys/net/core/bpf_jit_enable ... to see the generated JIT code. This can

Re: [PATCH net 4/4] tcp: various missing rcu_read_lock around __sk_dst_get

2016-04-01 Thread David Miller
From: Daniel Borkmann Date: Fri, 01 Apr 2016 10:10:11 +0200 > Dave, do you need me to resubmit this one w/o changes: > http://patchwork.ozlabs.org/patch/603903/ ? I'll apply this and queue it up for -stable, thanks.

Re: [PATCH] bridge: remove br_dev_set_multicast_list

2016-04-01 Thread David Miller
From: roy.qing...@gmail.com Date: Fri, 1 Apr 2016 16:16:10 +0800 > From: Li RongQing > > remove br_dev_set_multicast_list which does nothing > > Signed-off-by: Li RongQing This will break SIOCADDMULTI et al. on the bridge, see net/core/dev.c

[RFC v3 -next 0/2] virtio-net: Advised MTU feature

2016-04-01 Thread Aaron Conole
The following series adds the ability for a hypervisor to set an MTU on the guest during feature negotiation phase. This is useful for VM orchestration when, for instance, tunneling is involved and the MTU of the various systems should be homogenous. The first patch adds the feature bit as

Re: [PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-01 Thread David Miller
From: Daniel Borkmann Date: Fri, 1 Apr 2016 11:41:03 +0200 > Moreover, I noticed that when in the non-error path the __skb_pull() > is done and the original offset to mac header was non-zero, we fixup > from a wrong skb->data offset in the checksum complete processing. >

Re: [net PATCH 2/2] ipv4/GRO: Make GRO conform to RFC 6864

2016-04-01 Thread David Miller
From: Eric Dumazet Date: Fri, 01 Apr 2016 11:49:03 -0700 > For example, TCP stack tracks per socket ID generation, even if it > sends DF=1 frames. Damn useful for tcpdump analysis and drop > inference. Thanks for mentioning this, I never considered this use case. > With

[PATCH v4 net-next 10/15] nfp: slice .ndo_open() and .ndo_stop() up

2016-04-01 Thread Jakub Kicinski
Divide .ndo_open() and .ndo_stop() into logical, callable chunks. No functional changes. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 218 + 1 file changed, 136 insertions(+), 82 deletions(-) diff

[PATCH v4 net-next 06/15] nfp: cleanup tx ring flush and rename to reset

2016-04-01 Thread Jakub Kicinski
Since we never used flush without freeing the ring later the functionality of the two operations is mixed. Rename flush to ring reset and move there all the things which have to be done after FW ring state is cleared. While at it do some clean-ups. Signed-off-by: Jakub Kicinski

[PATCH v4 net-next 14/15] nfp: pass ring count as function parameter

2016-04-01 Thread Jakub Kicinski
Soon ring resize will call this functions with values different than the current configuration we need to explicitly pass the ring count as parameter. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 23 +-

[PATCH v4 net-next 11/15] nfp: sync ring state during FW reconfiguration

2016-04-01 Thread Jakub Kicinski
FW reconfiguration in .ndo_open()/.ndo_stop() should reset/ restore queue state. Since we need IRQs to be disabled when filling rings on RX path we have to move disable_irq() from .ndo_open() all the way up to IRQ allocation. nfp_net_start_vec() becomes trivial now so it's inlined.

[PATCH v4 net-next 08/15] nfp: preallocate RX buffers early in .ndo_open

2016-04-01 Thread Jakub Kicinski
We want the .ndo_open() to have following structure: - allocate resources; - configure HW/FW; - enable the device from stack perspective. Therefore filling RX rings needs to be moved to the beginning of .ndo_open(). Signed-off-by: Jakub Kicinski ---

Re: [PATCH v3 net-next] net: ipv4: Consider failed nexthops in multipath routes

2016-04-01 Thread Julian Anastasov
Hello, On Fri, 1 Apr 2016, David Ahern wrote: > v3 > - Julian comments: changed use of dead in documentation to failed, > init state to NUD_REACHABLE which simplifies fib_good_nh, use of > nh_dev for neighbor lookup, fallback to first entry which is what > current logic does > >

Re: [PATCH v2 -next] net/core/dev: Warn on a too-short GRO frame

2016-04-01 Thread Eric Dumazet
On Fri, 2016-04-01 at 15:58 -0400, Aaron Conole wrote: > From: Aaron Conole > > When signaling that a GRO frame is ready to be processed, the network stack > correctly checks length and aborts processing when a frame is less than 14 > bytes. However, such a condition is

[PATCH v4 net-next 05/15] nfp: allocate ring SW structs dynamically

2016-04-01 Thread Jakub Kicinski
To be able to switch rings more easly on config changes allocate them dynamically, separately from nfp_net structure. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 ++--- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCH v4 net-next 12/15] nfp: propagate list buffer size in struct rx_ring

2016-04-01 Thread Jakub Kicinski
Free list buffer size needs to be propagated to few functions as a parameter and added to struct nfp_net_rx_ring since soon some of the functions will be reused to manage rings with buffers of size different than nn->fl_bufsz. Signed-off-by: Jakub Kicinski ---

[PATCH v4 net-next 13/15] nfp: convert .ndo_change_mtu() to prepare/commit paradigm

2016-04-01 Thread Jakub Kicinski
When changing MTU on running device first allocate new rings and buffers and once it succeeds proceed with changing MTU. Allocation of new rings is not really necessary for this operation - it's done to keep the code simple and because size of the extra ring memory is quite small compared to the

[PATCH v4 net-next 00/15] MTU/buffer reconfig changes

2016-04-01 Thread Jakub Kicinski
Hi! Sorry it takes me so long to iterate this. Previous series included some not entirely related patches, this one is cut down. Main issue I'm trying to solve here is that .ndo_change_mtu() in nfpvf driver is doing full close/open to reallocate buffers - which if open fails can result in

[PATCH v4 net-next 04/15] nfp: make *x_ring_init do all the init

2016-04-01 Thread Jakub Kicinski
nfp_net_[rt]x_ring_init functions used to be called from probe path only and some of their functionality was spilled to the call site. In order to reuse them for ring reconfiguration we need them to do all the init. Signed-off-by: Jakub Kicinski ---

[PATCH v4 net-next 02/15] nfp: move link state interrupt request/free calls

2016-04-01 Thread Jakub Kicinski
We need to be able to disable the link state interrupt when the device is brought down. We used to just free the IRQ at the beginning of .ndo_stop(). As we now move towards more ordered .ndo_open()/.ndo_stop() paths LSC allocation should be placed in the "allocate resource" section. Since the

[PATCH v4 net-next 03/15] nfp: break up nfp_net_{alloc|free}_rings

2016-04-01 Thread Jakub Kicinski
nfp_net_{alloc|free}_rings contained strange mix of allocations and vector initialization. Remove it, declare vector init as a separate function and handle allocations explicitly. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCH v4 net-next 09/15] nfp: move filling ring information to FW config

2016-04-01 Thread Jakub Kicinski
nfp_net_[rt]x_ring_{alloc,free} should only allocate or free ring resources without touching the device. Move setting parameters in the BAR to separate functions. This will make it possible to reuse alloc/free functions to allocate new rings while the device is running. Signed-off-by: Jakub

[PATCH v4 net-next 15/15] nfp: allow ring size reconfiguration at runtime

2016-04-01 Thread Jakub Kicinski
Since much of the required changes have already been made for changing MTU at runtime let's use it for ring size changes as well. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 +

[PATCH v4 net-next 07/15] nfp: reorganize initial filling of RX rings

2016-04-01 Thread Jakub Kicinski
Separate allocation of buffers from giving them to FW, thanks to this it will be possible to move allocation earlier on .ndo_open() path and reuse buffers during runtime reconfiguration. Similar to TX side clean up the spill of functionality from flush to freeing the ring. Unlike on TX side, RX

Re: [PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-01 Thread Daniel Borkmann
On 04/01/2016 09:00 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 1 Apr 2016 11:41:03 +0200 Moreover, I noticed that when in the non-error path the __skb_pull() is done and the original offset to mac header was non-zero, we fixup from a wrong skb->data offset

Re: [Odd commit author id merge via netdev]

2016-04-01 Thread Johannes Berg
On Fri, 2016-04-01 at 10:51 -0700, santosh shilimkar wrote: > Hi Dave, > > I noticed something odd while checking the recent > commits of mine in kernel.org tree made it via netdev. > > Don't know if its patchwork tool doing this. > Usual author line in my git objects : > Author: Santosh

[PATCH v4 net-next 01/15] nfp: correct RX buffer length calculation

2016-04-01 Thread Jakub Kicinski
When calculating the RX buffer length we need to account for up to 2 VLAN tags and up to 8 MPLS labels. Rounding up to 1k is an relic of a distant past and can be removed. While at it also remove trivial print statement. Signed-off-by: Jakub Kicinski ---

RE: [net PATCH 2/2] ipv4/GRO: Make GRO conform to RFC 6864

2016-04-01 Thread Subash Abhinov Kasiviswanathan
| For transmit we can leave the IP ID code as is. For receive we should not be | snooping into the IP ID for any frames that have the DF bit set as devices | that have adopted RFC 6864 on their transmit path will end up causing issues. Currently, GRO does not coalesce TCP packets originating

[RFC v3 -net 1/2] virtio: Start feature MTU support

2016-04-01 Thread Aaron Conole
This commit adds the feature bit and associated mtu device entry for the virtio network device. Future commits will make use of these bits to support negotiated MTU. Signed-off-by: Aaron Conole --- v2,v3: * No change include/uapi/linux/virtio_net.h | 3 +++ 1 file changed,

[RFC v3 -next 2/2] virtio_net: Read the advised MTU

2016-04-01 Thread Aaron Conole
This patch checks the feature bit for the VIRTIO_NET_F_MTU feature. If it exists, read the advised MTU and use it. No proper error handling is provided for the case where a user changes the negotiated MTU. A future commit will add proper error handling. Instead, a warning is emitted if the guest

Re: [PATCH] RDS: sync congestion map updating

2016-04-01 Thread santosh shilimkar
(cc-ing netdev) On 3/30/2016 7:59 PM, Wengang Wang wrote: 在 2016年03月31日 09:51, Wengang Wang 写道: 在 2016年03月31日 01:16, santosh shilimkar 写道: Hi Wengang, On 3/30/2016 9:19 AM, Leon Romanovsky wrote: On Wed, Mar 30, 2016 at 05:08:22PM +0800, Wengang Wang wrote: Problem is found that some

Re: Question on rhashtable in worst-case scenario.

2016-04-01 Thread Johannes Berg
On Fri, 2016-04-01 at 08:46 +0800, Herbert Xu wrote: > On Thu, Mar 31, 2016 at 05:29:59PM +0200, Johannes Berg wrote: > > > > > > Does removing this completely disable the "-EEXIST" error? I can't > > say > > I fully understand the elasticity stuff in > > __rhashtable_insert_fast(). > What

Re: [v7, 4/5] powerpc/fsl: move mpc85xx.h to include/linux/fsl

2016-04-01 Thread Stephen Boyd
On 03/31/2016 08:07 PM, Yangbo Lu wrote: > drivers/clk/clk-qoriq.c | 3 +-- > For clk part: Acked-by: Stephen Boyd -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH] net: mvneta: fix changing MTU when using per-cpu processing

2016-04-01 Thread David Miller
From: Marcin Wojtas Date: Fri, 1 Apr 2016 15:21:18 +0200 > After enabling per-cpu processing it appeared that under heavy load > changing MTU can result in blocking all port's interrupts and transmitting > data is not possible after the change. > > This commit fixes above

[PATCH v2 -next] net/core/dev: Warn on a too-short GRO frame

2016-04-01 Thread Aaron Conole
From: Aaron Conole When signaling that a GRO frame is ready to be processed, the network stack correctly checks length and aborts processing when a frame is less than 14 bytes. However, such a condition is really indicative of a broken driver, and should be loudly signaled,

Re: [net PATCH 2/2] ipv4/GRO: Make GRO conform to RFC 6864

2016-04-01 Thread Alexander Duyck
On Fri, Apr 1, 2016 at 12:24 PM, David Miller wrote: > From: Eric Dumazet > Date: Fri, 01 Apr 2016 11:49:03 -0700 > >> For example, TCP stack tracks per socket ID generation, even if it >> sends DF=1 frames. Damn useful for tcpdump analysis and drop

[PATCH] ip6_tunnel: set rtnl_link_ops before calling register_netdevice

2016-04-01 Thread Thadeu Lima de Souza Cascardo
When creating an ip6tnl tunnel with ip tunnel, rtnl_link_ops is not set before ip6_tnl_create2 is called. When register_netdevice is called, there is no linkinfo attribute in the NEWLINK message because of that. Setting rtnl_link_ops before calling register_netdevice fixes that. Signed-off-by:

[PATCH (net.git) 2/3] Revert "stmmac: Fix 'eth0: No PHY found' regression"

2016-04-01 Thread Giuseppe Cavallaro
This reverts commit 88f8b1bb41c6208f81b6a480244533ded7b59493. due to problems on GeekBox and Banana Pi M1 board when connected to a real transceiver instead of a switch via fixed-link. Signed-off-by: Giuseppe Cavallaro Cc: Gabriel Fernandez

[PATCH (net.git) 1/3] stmmac: fix TX normal DESC

2016-04-01 Thread Giuseppe Cavallaro
This patch fixs a regression raised when test on chips that use the normal descriptor layout. In fact, no len bits were set for the TDES1 and no OWN bit inside the TDES0. Signed-off-by: Giuseppe CAVALLARO Tested-by: Andreas Färber Cc: Fabrice Gasnier

[PATCH (net.git) 0/3] stmmac MDIO and normal descr fixes

2016-04-01 Thread Giuseppe Cavallaro
This patch series is to fix the problems below and recently debugged in this mailing list: o to fix a problem for the HW where the normal descriptor o to fix the mdio registration according to the different platform configurations I am resending all the patches again: built on top of net.git

Re: Section 4 No. 9,10 Failed was occurred by IPv6 Ready Logo Conformance Test

2016-04-01 Thread Rongqing Li
On 2016年04月01日 15:31, Yuki Machida wrote: > Hi all, > > I tested 4.6-rc1 by IPv6 Ready Logo Core Conformance Test. > 4.6-rc1 has some FAILs in Section 4 (RFC 1981: Path MTU Discovery for IP > version 6). > I conformed that it was PASSed in 3.14.28 and it was FAILed in 4.1.17. > I will find a

[PATCH] bridge: remove br_dev_set_multicast_list

2016-04-01 Thread roy . qing . li
From: Li RongQing remove br_dev_set_multicast_list which does nothing Signed-off-by: Li RongQing --- net/bridge/br_device.c | 5 - 1 file changed, 5 deletions(-) diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index

Re: [PATCH v2] can: rcar_canfd: Add Renesas R-Car CAN FD driver

2016-04-01 Thread Marc Kleine-Budde
On 03/03/2016 04:38 PM, Ramesh Shanmugasundaram wrote: > This patch adds support for the CAN FD controller found in Renesas R-Car > SoCs. The controller operates in CAN FD mode by default. > > CAN FD mode supports both Classical CAN & CAN FD frame formats. The > controller supports ISO

Section 4 No. 9,10 Failed was occurred by IPv6 Ready Logo Conformance Test

2016-04-01 Thread Yuki Machida
Hi all, I tested 4.6-rc1 by IPv6 Ready Logo Core Conformance Test. 4.6-rc1 has some FAILs in Section 4 (RFC 1981: Path MTU Discovery for IP version 6). I conformed that it was PASSed in 3.14.28 and it was FAILed in 4.1.17. I will find a patch between 3.14 and 4.1. IPv6 Ready Logo

  1   2   >