[PATCH net-next 3/4] Documentation: Bindings: Update DT binding for hns dsaf node

2016-04-27 Thread Yisen Zhuang
This patch changes property port-id to reg in dsaf port node, removes property cpld-ctrl-reg, and fixes some typos. Signed-off-by: Yisen Zhuang --- .../devicetree/bindings/net/hisilicon-hns-dsaf.txt | 28 ++ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Docu

[PATCH net-next 01/10] net: hns: add a new dsaf mode for debug port

2016-04-27 Thread Yisen Zhuang
From: huangdaode This patch adds a new dsaf mode named "single-port" mode for hns driver, this mode only contains one debug port, and change the way of identify the port type through related dsaf. Signed-off-by: Daode Huang Signed-off-by: Yisen Zhuang --- drivers/net/ethernet/hisilicon/hns/hn

[PATCH net-next 07/10] net: hns: separate debug dsaf device from service dsaf device

2016-04-27 Thread Yisen Zhuang
There are two kinds of dsaf device in hns, one is for service ports, contains crossbar in it, can work under different mode. Another is for debug port, only can work under "single-port" mode. The old driver only declared a dsaf device for both service ports and debug ports. This patch separate it t

[PATCH net-next 2/4] net: hns: change port-id property to reg property in dsaf port node

2016-04-27 Thread Yisen Zhuang
Indexes should generally be avoided. So we use reg rather than port-id to index ports. Signed-off-by: Yisen Zhuang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/

[PATCH net-next 4/4] dts: hisi: update hns dst for changing property port-id to reg

2016-04-27 Thread Yisen Zhuang
Indexes should generally be avoided. This patch changes property port-id to reg in dsaf port node. Signed-off-by: Yisen Zhuang --- arch/arm64/boot/dts/hisilicon/hip05_hns.dtsi | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/hisilicon/hip05_hns.d

[PATCH net-next 1/4] net: hns: remove cpld-ctrl-reg and add cell in the cpld-syscon property

2016-04-27 Thread Yisen Zhuang
Because cpld-ctrl-reg property is offset base on cpld-syscon property, we make it as a cell in the cpld-syscon property. Signed-off-by: Yisen Zhuang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 26 --- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a

[PATCH net-next 05/10] net: hns: add syscon operation for dsaf

2016-04-27 Thread Yisen Zhuang
From: Daode Huang This patch provides the read/write function for dsaf to access the registers through syscon methods. Signed-off-by: Daode Huang Signed-off-by: Yuzeng Zhuang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 14 ++ 1 file changed, 14 insertions(+) diff --gi

[PATCH net-next 0/4] net: hns: update DT properties according to Rob's comments

2016-04-27 Thread Yisen Zhuang
There are some inappropriate properties definition in hns DT. We update the definition according to Rob's review comments and fix some typos in binding. For more details, please see individual patches. MBR. Yisen Zhuang (4): net: hns: remove cpld-ctrl-reg and add cell in the cpld-syscon p

[PATCH net-next 04/10] net: hns: add attribute reset-field-offset for dsaf node

2016-04-27 Thread Yisen Zhuang
Add the subctrl reset offset for dsaf, this property is used to reset xge/ge ports for different dsaf. If this attribute is not present, default value 0 will be use. Signed-off-by: Daode Huang Signed-off-by: Yuzeng Zhuang --- .../devicetree/bindings/net/hisilicon-hns-dsaf.txt | 2 ++ drivers/n

Re: [PATCH net 3/3] gre: receive also TEB packets for lwtunnels

2016-04-27 Thread Simon Horman
On Fri, Apr 22, 2016 at 07:44:08PM +0200, Jiri Benc wrote: > For ipgre interfaces in collect metadata mode, receive also traffic with > encapsulated Ethernet headers. The lwtunnel users are supposed to sort this > out correctly. This allows to have mixed Ethernet + L3-only traffic on the > same lwt

Re: [PATCH net-next 00/10] net: hns: add support of debug dsaf device

2016-04-27 Thread Yisen Zhuang
I am sorry for my misoperation, please ignore this series, thanks. 在 2016/4/28 15:01, Yisen Zhuang 写道: > There are two kinds of dsaf device in hns, one is for service ports, > contains crossbar in it, can work under different mode. Another is for > debug port, only can work under single port mode.

Re: [PATCH v2 0/2] pegasus: correct buffer sizes

2016-04-27 Thread Johannes Berg
On Wed, 2016-04-27 at 16:26 +, David Laight wrote: > From: Johannes Berg > > > > Sent: 27 April 2016 10:44 > > On Wed, 2016-04-27 at 12:33 +0300, Petko Manolov wrote: > > > > > > > > > Your guess turned out to be not so wild.;)All Pegasus devices are > > > configured (by the driver) to appen

[PATCH net-next 03/10] net: hns: add attribute port-idx-in-ae in enet node.

2016-04-27 Thread Yisen Zhuang
This patch parse port-idx-in-ae in enet node. port-idx-in-ae: is the index of port provided by AE. In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram: +-+---+ |

[PATCH net-next 10/10] net: hns: add attribute port-mode-offset for dsaf port node

2016-04-27 Thread Yisen Zhuang
Port mode offset for each dsaf port is different. The current code is not so readability. This patch adds configuration named port-mode-offset to make the code simple and more readability. If port-mode-offset isn't exists, default value 0 will be used. Signed-off-by: Daode Huang Signed-off-by: Yi

[PATCH net-next 08/10] net: hns: add attribute cpld_ctrl for dsaf port node

2016-04-27 Thread Yisen Zhuang
This patch add attribute cpld_ctrl for dsaf port node, parse the syscon for mac_cb from dts, and change the method of access the cpld related registers through syscon. Signed-off-by: Daode Huang Signed-off-by: Yisen Zhuang --- .../devicetree/bindings/net/hisilicon-hns-dsaf.txt | 4 +++ drivers

[PATCH net-next 09/10] net: hns: add attribute port-rst-offset for dsaf port node

2016-04-27 Thread Yisen Zhuang
The reset offset for each port in a dsaf is different. The current code is not so readability. This patch adds configuration named port-rst-offset to make the code simple and more readability. If this attribute isn't exists, default value of this attribute is equal to its port index. Signed-off-by

[PATCH net-next 06/10] net: hns: sort the header file by alphabetical order

2016-04-27 Thread Yisen Zhuang
From: Daode Huang This patch tunes the header file by the alphabetical order. Signed-off-by: Daode Huang Signed-off-by: Yuzeng Zhuang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 12 ++-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 12 ++-- drivers/net/eth

[PATCH net-next 00/10] net: hns: add support of debug dsaf device

2016-04-27 Thread Yisen Zhuang
There are two kinds of dsaf device in hns, one is for service ports, contains crossbar in it, can work under different mode. Another is for debug port, only can work under single port mode. The current code only declared a dsaf device for both service ports and debug ports.It is not so readability.

[PATCH net-next 02/10] net: hns: set debug port irq index to 0

2016-04-27 Thread Yisen Zhuang
From: Daode Huang As debug ports are removed from service dsaf to debug dsaf, its interrupts offset should start from 0, So this patch re-defines the offset index of debug ports. Signed-off-by: Daode Huang Signed-off-by: Yuzeng Zhuang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 8

Re: [RFC PATCH V2 2/2] vhost: device IOTLB API

2016-04-27 Thread Jason Wang
On 04/27/2016 07:45 PM, Michael S. Tsirkin wrote: > On Fri, Mar 25, 2016 at 10:34:34AM +0800, Jason Wang wrote: >> This patch tries to implement an device IOTLB for vhost. This could be >> used with for co-operation with userspace(qemu) implementation of DMA >> remapping. >> >> The idea is simple

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

2016-04-27 Thread Oliver Hartkopp
Hello Ramesh, please send out a new v3 patchset to trigger the process again :-) Best regards, Oliver On 04/13/2016 08:25 AM, Ramesh Shanmugasundaram wrote: HI Marc, Gentle reminder! Are you happy with the open comment's disposition? I can send a next version of patch if we have a closure on

Re: [RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree

2016-04-27 Thread Jason Wang
On 04/27/2016 07:30 PM, Michael S. Tsirkin wrote: > On Fri, Mar 25, 2016 at 10:34:33AM +0800, Jason Wang wrote: >> > Current pre-sorted memory region array has some limitations for future >> > device IOTLB conversion: >> > >> > 1) need extra work for adding and removing a single region, and it's

Re: [PATCH] vhost_net: stop polling socket during rx processing

2016-04-27 Thread Jason Wang
On 04/27/2016 07:28 PM, Michael S. Tsirkin wrote: > On Tue, Apr 26, 2016 at 03:35:53AM -0400, Jason Wang wrote: >> We don't stop polling socket during rx processing, this will lead >> unnecessary wakeups from under layer net devices (E.g >> sock_def_readable() form tun). Rx will be slowed down in

[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 unblock

[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 insertions(+), 4 deletions(-)

[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, 6 insertions(+), 6 de

[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 usin

[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 ++ 1 file changed, 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 socke

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 bitma

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 have created one, and I would lik

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 to incur a > cache-l

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 redundant, since > tsf

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 hardware will ignore existing IPv4/v6 >>> header fields for length and checksum a

[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 txstamp_ack bit was added in

[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 control messages. Si

[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 tcp: remove SKBTX_ACK

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: > https://github.c

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 the SOCKWQ_* state is st

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 > manor is also slightly

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 copy, and what really mat

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 --- sam

[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 p

[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 +- kerne

[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 inadverten

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 >> according >> to Rob's com

[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 codepath as if the phy-

[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 Rivshin --- Changes since v

[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 would result in the PHY mo

[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 return NULL. The common err

[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 than cpsw_priv. This wou

[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 dereference which can occur 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 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 wo

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.  I

[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 --- include/net/icmp.h

[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 +- 6 files changed, 15 i

[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 | 10 ++--- net/dccp/i

[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 index 0be0af3017ba..0df480

[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 ++-- net/ipv4/tcp_output.c

[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 +- net/dccp/timer.c | 4

[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 --- a/include/net/icmp.h +++ b/includ

[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 --- a/include/net/ipv6.h +++

[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 +- net/ipv

[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 aba8760dd108..9f3b53f2819b 100644 --- a/in

[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 +- net/ipv4/inet_connection_sock.c

[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 index 5a2c4c3307a7..5607c0

[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 100644 --- a/include/

[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 __t

[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 @@ #ifdef CONFIG_XFRM_STA

[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 files changed, 14 inser

[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 this_cpu_i

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 > > new generic implemen

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 list

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 membe

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. sw

[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 + drivers/net/dsa/mv88e6xxx.h | 10 +- include/net/

[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 +- drivers/net/dsa/mv88e6xxx.h |

[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 a

[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 --- include/net/dsa.h | 2 +- net/d

[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 insertions(+) diff --git a/include/n

[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 - 1 file change

[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 ++ drivers/net/dsa/bcm_sf2.h | 2 -

[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 --- drivers/net/

[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 --- include/net/dsa.h | 2 ++ net/dsa/dsa_priv.h |

[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 - 1 file changed, 12 ins

[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 ex

[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 a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xx

[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 | 67 +++---

[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 t

[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 | 8 ++ net/dsa/slave.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 + net/dsa/dsa.c | 3 +++ 2 files cha

[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 +++--- drivers/net/dsa/mv88e6xxx.h | 8

[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 drivers/net/dsa/mv88e6xxx.c | 12 net/dsa/dsa_pri

  1   2   3   >