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
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
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
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/
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
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
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
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
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
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
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.
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
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:
+-+---+
|
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
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
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
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
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.
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
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
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
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
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
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
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
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(-)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
From: Jeff Kirsher
Date: Wed, 27 Apr 2016 13:15:39 -0700
> This series contains updates to i40e and i40evf.
Pulled, thanks Jeff.
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
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
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
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
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
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-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
+++
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
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
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
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
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/
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
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 +++
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
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
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
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
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
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:
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
> @@ -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)
> +
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
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/
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
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 |
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
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
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
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
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 -
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/
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 |
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
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
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
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
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 +++---
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
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
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
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
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 - 100 of 242 matches
Mail list logo