[PATCH net-next 6/6] net: do not block BH while processing socket backlog

2016-04-27 Thread Eric Dumazet
Socket backlog processing is a major latency source. With current TCP socket sk_rcvbuf limits, I have sampled __release_sock() holding cpu for more than 5 ms, and packets being dropped by the NIC once ring buffer is filled. All users are now ready to be called from process context, we can

[PATCH net-next 2/6] tcp: do not block bh during prequeue processing

2016-04-27 Thread Eric Dumazet
AFAIK, nothing in current TCP stack absolutely wants BH being disabled once socket is owned by a thread running in process context. As mentioned in my prior patch ("tcp: give prequeue mode some care"), processing a batch of packets might take time, better not block BH at all. Signed-off-by: Eric

[PATCH net-next 4/6] udp: prepare for non BH masking at backlog processing

2016-04-27 Thread Eric Dumazet
UDP uses the generic socket backlog code, and this will soon be changed to not disable BH when protocol is called back. We need to use appropriate SNMP accessors. Signed-off-by: Eric Dumazet --- net/ipv4/udp.c | 4 ++-- net/ipv6/udp.c | 4 ++-- 2 files changed, 4

[PATCH net-next 3/6] dccp: do not assume DCCP code is non preemptible

2016-04-27 Thread Eric Dumazet
DCCP uses the generic backlog code, and this will soon be changed to not disable BH when protocol is called back. Signed-off-by: Eric Dumazet --- net/dccp/input.c | 2 +- net/dccp/ipv4.c| 4 ++-- net/dccp/ipv6.c| 4 ++-- net/dccp/options.c | 2 +- 4 files changed,

[PATCH net-next 1/6] tcp: do not assume TCP code is non preemptible

2016-04-27 Thread Eric Dumazet
We want to to make TCP stack preemptible, as draining prequeue and backlog queues can take lot of time. Many SNMP updates were assuming that BH (and preemption) was disabled. Need to convert some __NET_INC_STATS() calls to NET_INC_STATS() and some __TCP_INC_STATS() to TCP_INC_STATS() Before

[PATCH net-next 5/6] sctp: prepare for socket backlog behavior change

2016-04-27 Thread Eric Dumazet
sctp_inq_push() will soon be called without BH being blocked when generic socket code flushes the socket backlog. It is very possible SCTP can be converted to not rely on BH, but this needs to be done by SCTP experts. Signed-off-by: Eric Dumazet --- net/sctp/inqueue.c | 2

[PATCH net-next 0/6] net: make TCP preemptible

2016-04-27 Thread Eric Dumazet
Most of TCP stack assumed it was running from BH handler. This is great for most things, as TCP behavior is very sensitive to scheduling artifacts. However, the prequeue and backlog processing are problematic, as they need to be flushed with BH being blocked. To cope with modern needs, TCP

Re: [PATCH net-next 2/7] net: rtnetlink: allow only one idx saving stats attribute

2016-04-27 Thread Roopa Prabhu
On 4/27/16, 9:18 AM, Nikolay Aleksandrov wrote: > We can't allow more than one stats attribute which uses the local idx > since the result will be a mess. This is a simple check to make sure > only one is being used at a time. Later when the filter_mask's 32 bits > are over we can switch to a

Re: iproute2: bash completion function for tc

2016-04-27 Thread Stephen Hemminger
On Wed, 27 Apr 2016 20:19:26 -0700 Alexei Starovoitov wrote: > On Tue, Apr 26, 2016 at 09:28:17AM +0200, Quentin Monnet wrote: > > Hi Jamal, Stephen, > > > > I searched for a function providing auto-completion for `tc` utility in > > bash, but I found none. So I

Re: [PATCH v2 net-next 2/2] tcp: remove SKBTX_ACK_TSTAMP since it is redundant

2016-04-27 Thread Eric Dumazet
On Wed, 2016-04-27 at 23:39 -0400, Soheil Hassas Yeganeh wrote: > From: Soheil Hassas Yeganeh > > The SKBTX_ACK_TSTAMP flag is set in skb_shinfo->tx_flags when > the timestamp of the TCP acknowledgement should be reported on > error queue. Since accessing skb_shinfo is likely

Re: [PATCH v2 net-next 1/2] tcp: remove an unnecessary check in tcp_tx_timestamp

2016-04-27 Thread Eric Dumazet
On Wed, 2016-04-27 at 23:39 -0400, Soheil Hassas Yeganeh wrote: > From: Soheil Hassas Yeganeh > > Remove the redundant check for sk->sk_tsflags in tcp_tx_timestamp. > > tcp_tx_timestamp() receives the tsflags as a parameter. As a > result the "sk->sk_tsflags || tsflags" is

Re: [RFC PATCH 4/5] bnxt: Add support for segmentation of tunnels with outer checksums

2016-04-27 Thread Michael Chan
On Wed, Apr 27, 2016 at 8:21 AM, Alexander Duyck wrote: > On Tue, Apr 26, 2016 at 10:55 PM, Michael Chan > wrote: >> On Tue, Apr 19, 2016 at 12:06 PM, Alexander Duyck >> wrote: >>> This patch assumes that the bnxt

[PATCH v2 net-next 2/2] tcp: remove SKBTX_ACK_TSTAMP since it is redundant

2016-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh The SKBTX_ACK_TSTAMP flag is set in skb_shinfo->tx_flags when the timestamp of the TCP acknowledgement should be reported on error queue. Since accessing skb_shinfo is likely to incur a cache-line miss at the time of receiving the ack, the

[PATCH v2 net-next 1/2] tcp: remove an unnecessary check in tcp_tx_timestamp

2016-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh Remove the redundant check for sk->sk_tsflags in tcp_tx_timestamp. tcp_tx_timestamp() receives the tsflags as a parameter. As a result the "sk->sk_tsflags || tsflags" is redundant, since tsflags already includes sk->sk_tsflags plus overrides from

[PATCH v2 net-next 0/2] tcp: simplify ack tx timestamps

2016-04-27 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh v2: - Fully remove SKBTX_ACK_TSTAMP, as suggested by Willem de Bruijn. This patch series aims at removing redundant checks and fields for ack timestamps for TCP. Soheil Hassas Yeganeh (2): tcp: remove an unnecessary check in tcp_tx_timestamp

Re: iproute2: bash completion function for tc

2016-04-27 Thread Alexei Starovoitov
On Tue, Apr 26, 2016 at 09:28:17AM +0200, Quentin Monnet wrote: > Hi Jamal, Stephen, > > I searched for a function providing auto-completion for `tc` utility in > bash, but I found none. So I have created one, and I would like share it > with the community. It is available here: >

Re: [PATCH net-next 0/2] net: avoid some atomic ops when FASYNC is not used

2016-04-27 Thread David Miller
From: Eric Dumazet Date: Mon, 25 Apr 2016 10:39:31 -0700 > We can avoid some atomic operations on sockets not using FASYNC I guess a user can do weird things and set/clear the FASYNC bit in the middle of the SOCKWQ_ASYNC_ bit being set, and reset the FASYNC bit later and

Re: [net-next PATCH V3 0/5] samples/bpf: Improve user experience

2016-04-27 Thread David Miller
From: Jesper Dangaard Brouer Date: Wed, 27 Apr 2016 09:30:08 +0200 > It is a steep learning curve getting started with using the eBPF > examples in samples/bpf/. There are several dependencies, and > specific versions of these dependencies. Invoking make in the correct >

Re: [PATCH net-next 00/17] net: snmp: update SNMP methods

2016-04-27 Thread David Miller
From: Eric Dumazet Date: Wed, 27 Apr 2016 16:44:26 -0700 > In the old days (before linux-3.0), SNMP counters were duplicated, > one set for user context, and anther one for BH context. > > After commit 8f0ea0fe3a03 ("snmp: reduce percpu needs by 50%") > we have a single

Re: [net-next v2 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2016-04-27

2016-04-27 Thread David Miller
From: Jeff Kirsher Date: Wed, 27 Apr 2016 13:15:39 -0700 > This series contains updates to i40e and i40evf. Pulled, thanks Jeff.

[PATCH net 3/3] samples/bpf: fix trace_output example

2016-04-27 Thread Alexei Starovoitov
llvm cannot always recognize memset as builtin function and optimize it away, so just delete it. It was a leftover from testing of bpf_perf_event_output() with large data structures. Fixes: 39111695b1b8 ("samples: bpf: add bpf_perf_event_output example") Signed-off-by: Alexei Starovoitov

[PATCH net 1/3] bpf: fix refcnt overflow

2016-04-27 Thread Alexei Starovoitov
On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK, the malicious application may overflow 32-bit bpf program refcnt. It's also possible to overflow map refcnt on 1Tb system. Impose 32k hard limit which means that the same bpf program or map cannot be shared by more than 32k

[PATCH net 0/3] bpf: fix several bugs

2016-04-27 Thread Alexei Starovoitov
First two patches address bugs found by Jann Horn. Last patch is a minor samples fix spotted during the testing. Alexei Starovoitov (3): bpf: fix refcnt overflow bpf: fix check_map_func_compatibility logic samples/bpf: fix trace_output example include/linux/bpf.h | 3 +-

[PATCH net 2/3] bpf: fix check_map_func_compatibility logic

2016-04-27 Thread Alexei Starovoitov
The commit 35578d798400 ("bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter") introduced clever way to check bpf_helper<->map_type compatibility. Later on commit a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") adjusted the logic and

Re: [PATCH v2 net-next 11/13] Documentation: Bindings: Update DT binding for separating dsaf dev support

2016-04-27 Thread Yisen Zhuang
Hi Rob, Thanks for you comments. 在 2016/4/27 23:25, Rob Herring 写道: > On Tue, Apr 26, 2016 at 10:33 PM, Yisen Zhuang > wrote: >> Hi Rob and David, >> >> Please see my comments inline. >> >> David have merged this series to net-next, but we need to modify some codes >>

[PATCH net v3 5/5] drivers: net: cpsw: use of_phy_connect() in fixed-link case

2016-04-27 Thread David Rivshin (Allworx)
From: David Rivshin If a fixed-link DT subnode is used, the phy_device was looked up so that a PHY ID string could be constructed and passed to phy_connect(). This is not necessary, as the device_node can be passed directly to of_phy_connect() instead. This reuses the same

[PATCH net v3 4/5] dt: cpsw: phy-handle, phy_id, and fixed-link are mutually exclusive

2016-04-27 Thread David Rivshin (Allworx)
From: David Rivshin The phy-handle, phy_id, and fixed-link properties are mutually exclusive, and only one need be specified. Make this clear in the binding doc. Also mark the phy_id property as deprecated, as phy-handle should be used instead. Signed-off-by: David

[PATCH net v3 3/5] drivers: net: cpsw: don't ignore phy-mode if phy-handle is used

2016-04-27 Thread David Rivshin (Allworx)
From: David Rivshin The phy-mode emac property was only being processed in the phy_id or fixed-link cases. However if phy-handle was specified instead, an error message would complain about the lack of phy_id or fixed-link, and then jump past the of_get_phy_mode(). This

[PATCH net v3 2/5] drivers: net: cpsw: fix segfault in case of bad phy-handle

2016-04-27 Thread David Rivshin (Allworx)
From: David Rivshin If an emac node has a phy-handle property that points to something which is not a phy, then a segmentation fault will occur when the interface is brought up. This is because while phy_connect() will return ERR_PTR() on failure, of_phy_connect() will

[PATCH net v3 1/5] drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config

2016-04-27 Thread David Rivshin (Allworx)
From: David Rivshin Commit 9e42f715264ff158478fa30eaed847f6e131366b ("drivers: net: cpsw: add phy-handle parsing") saved the "phy-handle" phandle into a new cpsw_priv field. However, phy connections are per-slave, so the phy_node field should be in cpsw_slave_data rather

[PATCH net v3 0/5] drivers: net: cpsw: phy-handle fixes

2016-04-27 Thread David Rivshin (Allworx)
From: David Rivshin This series fixes a number of related issues around using phy-handle properties in cpsw emac nodes. Patch 1 fixes a bug if more than one slave is used, and either slave uses the phy-handle property in the devicetree. Patch 2 fixes a NULL pointer

Re: [PATCH 3.2 085/115] veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.

2016-04-27 Thread Ben Greear
On 04/27/2016 05:00 PM, Hannes Frederic Sowa wrote: Hi Ben, On Wed, Apr 27, 2016, at 20:07, Ben Hutchings wrote: On Wed, 2016-04-27 at 08:59 -0700, Ben Greear wrote: On 04/26/2016 04:02 PM, Ben Hutchings wrote: 3.2.80-rc1 review patch. If anyone has any objections, please let me know. I

Re: [PATCH 3.2 085/115] veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.

2016-04-27 Thread Hannes Frederic Sowa
Hi Ben, On Wed, Apr 27, 2016, at 20:07, Ben Hutchings wrote: > On Wed, 2016-04-27 at 08:59 -0700, Ben Greear wrote: > > On 04/26/2016 04:02 PM, Ben Hutchings wrote: > > > > > > 3.2.80-rc1 review patch.  If anyone has any objections, please let me > > > know. > > I would be careful about this.  

[PATCH net-next 13/17] net: rename NET_{ADD|INC}_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename NET_INC_STATS_BH() to __NET_INC_STATS() and NET_ADD_STATS_BH() to __NET_ADD_STATS() Signed-off-by: Eric Dumazet --- include/net/ip.h | 4 +- include/net/tcp.h | 4 +- net/core/dev.c| 4 +- net/dccp/ipv4.c |

[PATCH net-next 11/17] net: rename IP_ADD_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename IP_ADD_STATS_BH() to __IP_ADD_STATS() Signed-off-by: Eric Dumazet --- include/net/ip.h | 2 +- net/ipv4/ip_forward.c | 2 +- net/ipv4/ip_input.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h

[PATCH net-next 17/17] net: snmp: kill STATS_BH macros

2016-04-27 Thread Eric Dumazet
There is nothing related to BH in SNMP counters anymore, since linux-3.0. Rename helpers to use __ prefix instead of _BH prefix, for contexts where preemption is disabled. This more closely matches convention used to update percpu variables. Signed-off-by: Eric Dumazet ---

[PATCH net-next 10/17] net: rename ICMP6_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename ICMP6_INC_STATS_BH() to __ICMP6_INC_STATS() Signed-off-by: Eric Dumazet --- include/net/ipv6.h | 2 +- net/dccp/ipv6.c | 8 net/ipv6/icmp.c | 10 +- net/ipv6/tcp_ipv6.c | 4 ++-- net/ipv6/udp.c | 4 ++-- net/sctp/ipv6.c | 2 +-

[PATCH net-next 06/17] net: tcp: rename TCP_INC_STATS_BH

2016-04-27 Thread Eric Dumazet
Rename TCP_INC_STATS_BH() to __TCP_INC_STATS() Signed-off-by: Eric Dumazet --- include/net/tcp.h| 2 +- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 8 net/ipv4/tcp_ipv4.c | 16 net/ipv4/tcp_minisocks.c | 4 ++--

[PATCH net-next 02/17] dccp: rename DCCP_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename DCCP_INC_STATS_BH() to __DCCP_INC_STATS() Signed-off-by: Eric Dumazet --- net/dccp/dccp.h | 6 +++--- net/dccp/input.c | 2 +- net/dccp/ipv4.c | 8 net/dccp/ipv6.c | 8 net/dccp/minisocks.c | 2 +- net/dccp/options.c | 2 +-

[PATCH net-next 07/17] net: icmp: rename ICMPMSGIN_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Remove misleading _BH suffix. Signed-off-by: Eric Dumazet --- include/net/icmp.h | 2 +- net/ipv4/icmp.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/icmp.h b/include/net/icmp.h index 5a60ce819078..25edb740c648 100644 ---

[PATCH net-next 16/17] ipv6: kill ICMP6MSGIN_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
IPv6 ICMP stats are atomics anyway. Signed-off-by: Eric Dumazet --- include/net/ipv6.h | 4 +--- net/ipv6/icmp.c| 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 9f3b53f2819b..64ce3670d40a 100644 ---

[PATCH net-next 14/17] ipv6: rename IP6_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename IP6_INC_STATS_BH() to __IP6_INC_STATS() and IP6_ADD_STATS_BH() to __IP6_ADD_STATS() Signed-off-by: Eric Dumazet --- include/net/ipv6.h | 4 +-- net/bridge/br_netfilter_ipv6.c | 10 +++ net/ipv6/exthdrs.c | 66

[PATCH net-next 15/17] ipv6: rename IP6_UPD_PO_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename IP6_UPD_PO_STATS_BH() to __IP6_UPD_PO_STATS() Signed-off-by: Eric Dumazet --- include/net/ipv6.h | 2 +- net/ipv6/ip6_input.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index

[PATCH net-next 09/17] net: rename IP_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename IP_INC_STATS_BH() to __IP_INC_STATS(), to better express this is used in non preemptible context. Signed-off-by: Eric Dumazet --- include/net/ip.h| 2 +- net/bridge/br_netfilter_hooks.c | 6 +++--- net/dccp/ipv4.c | 2 +-

[PATCH net-next 12/17] net: rename IP_UPD_PO_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename IP_UPD_PO_STATS_BH() to __IP_UPD_PO_STATS() Signed-off-by: Eric Dumazet --- include/net/ip.h| 2 +- net/ipv4/ip_input.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index 0df4809bc68a..55f5de50a564

[PATCH net-next 08/17] net: sctp: rename SCTP_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename SCTP_INC_STATS_BH() to __SCTP_INC_STATS() Signed-off-by: Eric Dumazet --- include/net/sctp/sctp.h | 2 +- net/sctp/input.c| 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h

[PATCH net-next 01/17] net: snmp: kill various STATS_USER() helpers

2016-04-27 Thread Eric Dumazet
In the old days (before linux-3.0), SNMP counters were duplicated, one for user context, and one for BH context. After commit 8f0ea0fe3a03 ("snmp: reduce percpu needs by 50%") we have a single copy, and what really matters is preemption being enabled or disabled, since we use this_cpu_inc() or

[PATCH net-next 04/17] net: udp: rename UDP_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename UDP_INC_STATS_BH() to __UDP_INC_STATS(), and UDP6_INC_STATS_BH() to __UDP6_INC_STATS() Signed-off-by: Eric Dumazet --- include/net/udp.h | 12 ++-- net/ipv4/udp.c| 46 +++--- net/ipv6/udp.c| 38

[PATCH net-next 05/17] net: xfrm: kill XFRM_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Not used anymore. Signed-off-by: Eric Dumazet --- include/net/xfrm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index dab9e1b82963..adfebd6f243c 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -45,10 +45,8 @@

[PATCH net-next 03/17] net: rename ICMP_INC_STATS_BH()

2016-04-27 Thread Eric Dumazet
Rename ICMP_INC_STATS_BH() to __ICMP_INC_STATS() Signed-off-by: Eric Dumazet --- include/net/icmp.h | 2 +- net/dccp/ipv4.c | 4 ++-- net/ipv4/icmp.c | 16 net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/udp.c | 2 +- net/sctp/input.c| 2 +- 6

[PATCH net-next 00/17] net: snmp: update SNMP methods

2016-04-27 Thread Eric Dumazet
In the old days (before linux-3.0), SNMP counters were duplicated, one set for user context, and anther one for BH context. After commit 8f0ea0fe3a03 ("snmp: reduce percpu needs by 50%") we have a single copy, and what really matters is preemption being enabled or disabled, since we use

Re: [PATCH net-next v2 0/7] net: unify dst caching for tunnel devices

2016-04-27 Thread Eric Dumazet
On Tue, 2016-02-16 at 20:22 -0500, David Miller wrote: > From: Paolo Abeni > Date: Fri, 12 Feb 2016 15:43:52 +0100 > > > This patch series try to unify the dst cache implementations currently > > present in the kernel, namely in ip_tunnel.c and ip6_tunnel.c, introducing a > >

Re: [RFC 12/20] net: dsa: rename dst->ds to dst->switches

2016-04-27 Thread Andrew Lunn
On Wed, Apr 27, 2016 at 06:30:09PM -0400, Vivien Didelot wrote: > dsa_switch stores the net_device pointers in a "ports" member. Be > consistent and store the dsa_switch pointer in a "switches" member of > the dsa_switch_tree structure. > > This free us the "ds" member for a future dsa_switch

Re: [RFC 07/20] net: dsa: list ports in switch\\

2016-04-27 Thread Andrew Lunn
On Wed, Apr 27, 2016 at 06:30:04PM -0400, Vivien Didelot wrote: > List DSA port structures in their switch structure, so that drivers can > iterate on them to retrieve information such as their ports membership. And this would be so much easier using a plan array. Andrew > > Signed-off-by:

Re: [RFC 03/20] net: dsa: pass dsa_port down to drivers bridge ops

2016-04-27 Thread Andrew Lunn
On Wed, Apr 27, 2016 at 06:30:00PM -0400, Vivien Didelot wrote: > Now that DSA as proper structure for DSA ports, pass it down to the > port_bridge_join and port_bridge_leave driver functions. I should look at the later patches, but this looks like a step backwards. If your ports array is a

Re: [RFC 01/20] net: dsa: introduce a dsa_port structure

2016-04-27 Thread Andrew Lunn
> @@ -230,6 +231,13 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, > struct device *parent) > for (i = 0; i < DSA_MAX_PORTS; i++) { > char *name; > > + dp[i] = devm_kzalloc(parent, sizeof(*dp), GFP_KERNEL); > + if (dp[i] == NULL) > +

[RFC 00/20] net: dsa: dsa_port structure and tree-wide ops

2016-04-27 Thread Vivien Didelot
In a previous RFC [1], I introduced the need to implement cross-chip operations in the DSA layer. Here's a summary. In a multiple switches setup such as the following, every switch of the tree must be aware of its configuration in order to configure a correct data path between chips.

[RFC 05/20] net: dsa: pass dsa_port down to drivers VLAN ops

2016-04-27 Thread Vivien Didelot
Now that DSA as proper structure for DSA ports, pass it down to the port_vlan_{filtering,prepare,add,del,dump} driver functions. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 41 +

[RFC 01/20] net: dsa: introduce a dsa_port structure

2016-04-27 Thread Vivien Didelot
Introduce a new dsa_port structure, used to store port-centric information, such as a pointer to its DSA switch and its port number. It will later contains further data, such as its bridge device. This is a first step towards implementing cross-chip port operations. Signed-off-by: Vivien Didelot

[RFC 03/20] net: dsa: pass dsa_port down to drivers bridge ops

2016-04-27 Thread Vivien Didelot
Now that DSA as proper structure for DSA ports, pass it down to the port_bridge_join and port_bridge_leave driver functions. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 28 ++-- drivers/net/dsa/mv88e6xxx.c | 10

[RFC 02/20] net: dsa: be consistent with NETDEV_CHANGEUPPER

2016-04-27 Thread Vivien Didelot
Once NETDEV_CHANGEUPPER is emitted, the device is already (un)bridged. If an error is returned on port_bridge_join, the bridge layer will rollback the operation and unbridge the port. Respect this by setting bridge_dev to NULL on error. Also the DSA layer shouldn't assume that the drivers know

[RFC 12/20] net: dsa: rename dst->ds to dst->switches

2016-04-27 Thread Vivien Didelot
dsa_switch stores the net_device pointers in a "ports" member. Be consistent and store the dsa_switch pointer in a "switches" member of the dsa_switch_tree structure. This free us the "ds" member for a future dsa_switch list. Signed-off-by: Vivien Didelot

[RFC 10/20] net: dsa: mv88e6xxx: setup a dsa_port

2016-04-27 Thread Vivien Didelot
Change the mv88e6xxx_setup_port function to take a dsa_port structure as parameter instead of a port index. This will help us get rid of the private bridge_dev pointer. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 64

[RFC 07/20] net: dsa: list ports in switch

2016-04-27 Thread Vivien Didelot
List DSA port structures in their switch structure, so that drivers can iterate on them to retrieve information such as their ports membership. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 9 + net/dsa/dsa.c | 4 2 files changed, 13

[RFC 11/20] net: dsa: mv88e6xxx: use bridge from dsa_port

2016-04-27 Thread Vivien Didelot
Change the _mv88e6xxx_port_based_vlan_map function for a _mv88e6xxx_port_map_vlantable which takes a dsa_port structure as parameter. This allows us to iterate on dsa_port's bridge device pointer and thus get rid of the private bridge_dev structure. Signed-off-by: Vivien Didelot

[RFC 08/20] net: dsa: bcm_sf2: use bridge device from dsa_port

2016-04-27 Thread Vivien Didelot
Now that the DSA layer exposes the DSA port structures to drivers, use that to retrieve the port bridge membership and thus get rid of the private bridge_dev pointer. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 30

[RFC 06/20] net: dsa: move bridge device in dsa_port

2016-04-27 Thread Vivien Didelot
Move the pointer to the bridge device in the DSA port structure instead of cluttering the dsa_slave_priv structure. This can later be used by drivers to help them configuring their bridge group ports membership. Signed-off-by: Vivien Didelot ---

[RFC 09/20] net: dsa: mv88e6xxx: check HW vlan with dsa_port

2016-04-27 Thread Vivien Didelot
Change the mv88e6xxx_port_check_hw_vlan function for a mv88e6xxx_port_check_vtu which takes a dsa_port structure as parameter. This will help us get rid of the bridge_dev pointer. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 25

[RFC 20/20] net: dsa: mv88e6xxx: setup PVT on cross-chip ops

2016-04-27 Thread Vivien Didelot
Switches with a Cross-chip Port VLAN Table are currently configured to allow cross-chip frames to egress any internal ports. This means that unbridged cross-chip ports can actually talk to each other, and this is not what we want. In order to restrict that, we need to setup the PVT entry for an

[RFC 19/20] net: dsa: mv88e6xxx: conditionally init PVT

2016-04-27 Thread Vivien Didelot
The current code initialize the Cross-chip Port VLAN Table to all ones, even tough the switch model doesn't have one. It also assumes that the switch is configured to support up to 32-switch/16-port cross-chip devices. Implement the access to the PVT and initialize it only if the switch has such

[RFC 18/20] net: dsa: mv88e6xxx: add flags to info

2016-04-27 Thread Vivien Didelot
Add a flags bitmap to the mv88e6xxx_info structure to help describing features supported or not by a switch model. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[RFC 17/20] net: dsa: mv88e6xxx: factorize port bridge change

2016-04-27 Thread Vivien Didelot
Implement a mv88e6xxx_port_bridge_change function to factorize the configuration needed when a port joins or leaves a bridge group. This will simplify the implementation of cross-chip bridging. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c |

[RFC 13/20] net: dsa: list switches in tree

2016-04-27 Thread Vivien Didelot
List the registered dsa_switch structures in a "ds" member of the dsa_switch_tree structure. This allows the drivers to easily iterate on the DSA switch structures of their related DSA tree. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 9 +

[RFC 14/20] net: dsa: add tree-wide bridge ops

2016-04-27 Thread Vivien Didelot
In order to support cross-chip operations, we need to inform each switch driver when a port operation occurs in a DSA tree. This allows drivers to configure cross-chip port-based VLAN table, VTU or FDB entries on DSA links, in order to implement a correct hardware switching of frames. Add a new

[RFC 16/20] net: dsa: add tree-wide VLAN ops

2016-04-27 Thread Vivien Didelot
In order to support cross-chip operations, we need to inform each switch driver when a port operation occurs in a DSA tree. Implement tree-wide VLAN operations. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx.c | 12 + net/dsa/dsa_priv.h

[RFC 04/20] net: dsa: pass dsa_port down to drivers FDB ops

2016-04-27 Thread Vivien Didelot
Now that DSA as proper structure for DSA ports, pass it down to the port_fdb_{prepare,add,del,dump} driver functions. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 20 +++- drivers/net/dsa/mv88e6xxx.c | 22

[RFC 15/20] net: dsa: add tree-wide FDB ops

2016-04-27 Thread Vivien Didelot
In order to support cross-chip operations, we need to inform each switch driver when a port operation occurs in a DSA tree. Implement tree-wide FDB operations. Signed-off-by: Vivien Didelot --- drivers/net/dsa/bcm_sf2.c | 12

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Arnd Bergmann
On Wednesday 27 April 2016 14:47:29 Florian Fainelli wrote: > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c > index 499003ee8055..94a27b028dd8 100644 > --- a/drivers/net/phy/mdio_bus.c > +++ b/drivers/net/phy/mdio_bus.c > @@ -333,7 +333,7 @@ int __mdiobus_register(struct

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Arnd Bergmann
On Wednesday 27 April 2016 23:09:37 Sergei Shtylyov wrote: > Hello. > > On 04/27/2016 10:49 PM, Andrew Lunn wrote: > > >> Sergei Shtylyov writes: > >> > >>> Arnd Bergmann asked that get_phy_device() returns either NULL or the error > >>> value, not both on

[PATCH next v2] ipvlan: Fix failure path in dev registration during link creation

2016-04-27 Thread Mahesh Bandewar
From: Mahesh Bandewar When newlink creation fails at device-registration, the port->count is decremented twice. Francesco Ruggeri (frugg...@arista.com) found this issue in Macvlan and the same exists in IPvlan driver too. While fixing this issue I noticed another issue of

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Florian Fainelli
On 27/04/16 12:49, Andrew Lunn wrote: > On Wed, Apr 27, 2016 at 03:30:57PM -0400, Vivien Didelot wrote: >> Hi David, All, >> >> Sergei Shtylyov writes: >> >>> Arnd Bergmann asked that get_phy_device() returns either NULL or the error >>> value, not both on

Re: [PATCH net-next] net: dsa: Provide CPU port statistics to master netdev

2016-04-27 Thread Florian Fainelli
On 27/04/16 12:03, Andrew Lunn wrote: >> +if (stringset == ETH_SS_STATS && ds->drv->get_strings) { >> +ndata = data + mcount * len; >> +/* This function copies ETH_GSTRINGS_LEN bytes, we will mangle >> + * the output after to prepend our CPU port prefix we

[PATCH net-next #2 1/1] pch_gbe: replace private tx ring lock with common netif_tx_lock

2016-04-27 Thread Francois Romieu
pch_gbe_tx_ring.tx_lock is only used in the hard_xmit handler and in the transmit completion reaper called from NAPI context. Compile-tested only. Potential victims Cced. Someone more knowledgeable may check if pch_gbe_tx_queue could have some use for a mmiowb. Signed-off-by: Francois Romieu

Re: [PATCH net-next 1/1] pch_gbe: replace private tx ring lock with common netif_tx_lock

2016-04-27 Thread Francois Romieu
Nikolay Aleksandrov : > On 04/27/2016 12:49 AM, Francois Romieu wrote: [...] > > @@ -1652,7 +1652,7 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter, > > > > netdev_dbg(adapter->netdev, "next_to_clean : %d\n", > >

Re: [PATCH next] ipvlan: Fix failure path in dev registration during link creation

2016-04-27 Thread Mahesh Bandewar
On Wed, Apr 27, 2016 at 11:57 AM, David Miller wrote: > From: Mahesh Bandewar > Date: Wed, 27 Apr 2016 11:37:39 -0700 > >> While fixing this issue I noticed another issue of missing unregister >> in case of failure, so adding it to the fix which is

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread David Miller
From: Sergei Shtylyov Date: Wed, 27 Apr 2016 23:09:37 +0300 > On 04/27/2016 10:49 PM, Andrew Lunn wrote: > >> Please revert this, or fix all the callsites such that ENODEV is not a >> fatal error. > >OK, I'll do what DaveM decides. If you feel confident

Re: [PATCH net 0/3] bnxt_en: Bug fixes for net.

2016-04-27 Thread David Miller
From: Michael Chan Date: Mon, 25 Apr 2016 02:30:48 -0400 > Only use MSIX on VF, and fix rx page buffers on architectures with > PAGE_SIZE >= 64K. Series applied, thanks Michael.

[net-next v2 11/14] i40e/i40evf: Only offload VLAN tag if enabled

2016-04-27 Thread Jeff Kirsher
From: Jesse Brandeburg The driver was offloading the VLAN tag into the skb any time there was a VLAN tag and the hardware stripping was enabled. Just check to make sure it's enabled before put_tag. Change-Id: Ife95290c06edd9a616393b38679923938b382241 Signed-off-by:

[net-next v2 04/14] i40evf: Don't Panic

2016-04-27 Thread Jeff Kirsher
From: Mitch Williams Under some circumstances the driver remove function may be called before the driver is fully initialized. So we can't assume that we know where our towel is at, or that all of the data structures are initialized. To ensure that we don't panic,

[net-next v2 01/14] i40e/i40evf: Clean up feature flags

2016-04-27 Thread Jeff Kirsher
From: Alexander Duyck The feature flags list for i40e and i40evf is beginning to become pretty massive. I plan to add another 4 or so features to these drivers and duplicating the flags for each and every flags list is becoming a bit repetitive. The primary change here is

[net-next v2 13/14] i40e: Add VF promiscuous mode driver support

2016-04-27 Thread Jeff Kirsher
From: Anjali Singhai Jain Add infrastructure for Network Function Virtualization VLAN tagged packet steering feature. Change-Id: I9b873d8fcc253858e6baba65ac68ec5b9363944e Signed-off-by: Anjali Singhai Jain Signed-off-by: Greg Rose

[net-next v2 03/14] i40e: Add support for configuring VF RSS

2016-04-27 Thread Jeff Kirsher
From: Mitch Williams Add support for configuring RSS on behalf of the VFs. This removes the burden of dealing with different hardware interfaces from the VF drivers, allowing for better future compatibility. Change-ID: Icea75d3f37241ee8e447be5779e5abb53ddf04c0

[net-next v2 06/14] i40e: Specify AQ event opcode to wait for

2016-04-27 Thread Jeff Kirsher
From: Shannon Nelson To add a little flexibility to the nvmupdate facility, this code adds the ability to specify an AQ event opcode to wait on after the Exec_AQ request. Change-ID: Iddbfd63c3de8df3edb9d3e90678b08989bc4946e Signed-off-by: Shannon Nelson

[net-next v2 08/14] i40e: Add device capability which defines if update is available

2016-04-27 Thread Jeff Kirsher
From: Michal Kosiarz Add device capability which defines if update is available and security check is needed during update process. Change-ID: I380787c878275e1df18b39198df3ee3666342282 Signed-off-by: Michal Kosiarz Tested-by: Andrew Bowers

[net-next v2 12/14] i40e: Add promiscuous on VLAN support

2016-04-27 Thread Jeff Kirsher
From: Greg Rose NFV use cases require the ability to steer packets to VSIs by VLAN tag alone while being in promiscuous mode for multicast and unicast MAC addresses. These two new functions support that ability. Signed-off-by: Greg Rose

[net-next v2 02/14] i40e/i40evf: Add support for IPIP and SIT offloads

2016-04-27 Thread Jeff Kirsher
From: Alexander Duyck Looking over the documentation it turns out enabling IPIP and SIT offloads for i40e is pretty straightforward. As such I decided to enable them with this patch. In my testing I am seeing an improvement of 8 to 10 Gb/s for IPIP and SIT tunnels with

[net-next v2 05/14] i40e: Code cleanup in i40e_add_fdir_ethtool

2016-04-27 Thread Jeff Kirsher
From: Shannon Nelson A little bit of code cleanup in prep for more cloud filter work. Change-ID: I0dc33ce0d4c207944336a07437640fef920c100c Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff

[net-next v2 14/14] i40evf: Add driver support for promiscuous mode

2016-04-27 Thread Jeff Kirsher
From: Anjali Singhai Jain Add necessary Linux Ethernet driver support for promiscuous mode operation. Add a flag so the VF knows it is in promiscuous mode and two state flags to discreetly track multicast and unicast promiscuous states. Change-Id:

[net-next v2 09/14] i40e: Add DeviceID for X722 QSFP+

2016-04-27 Thread Jeff Kirsher
From: Kamil Krawczyk Change-ID: I1370fbc7774e815ac1ad56561e97488e829592fc Signed-off-by: Kamil Krawczyk Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next v2 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2016-04-27

2016-04-27 Thread Jeff Kirsher
This series contains updates to i40e and i40evf. Alex Duyck cleans up the feature flags since they are becoming pretty "massive", the primary change being that we now build our features list around hw_encap_features. Added support for IPIP and SIT offloads, which should improvement in throughput

  1   2   3   >