[Bridge] [PATCH] net: bridge: add a br_set_state helper function

2014-10-12 Thread Florian Fainelli
In preparation for being able to propagate port states to e.g: notifiers or other kernel parts, do not manipulate the port state directly, but instead use a helper function which will allow us to do a bit more than just setting the state. Signed-off-by: Florian Fainelli --- net/bridge/br_if.c

Re: [Bridge] [PATCH] net: bridge: add a br_set_state helper function

2014-10-12 Thread Florian Fainelli
On 09/30/2014 03:59 PM, Florian Fainelli wrote: > In preparation for being able to propagate port states to e.g: notifiers > or other kernel parts, do not manipulate the port state directly, but > instead use a helper function which will allow us to do a bit more than > just setting t

[Bridge] [PATCH net-next] net: bridge: add a br_set_state helper function

2014-10-12 Thread Florian Fainelli
In preparation for being able to propagate port states to e.g: notifiers or other kernel parts, do not manipulate the port state directly, but instead use a helper function which will allow us to do a bit more than just setting the state. Signed-off-by: Florian Fainelli --- net/bridge/br_if.c

[Bridge] [PATCH net-next 1/2] net: ipv4: handle DSA enabled master network devices

2015-01-14 Thread Florian Fainelli
network device from operating. Signed-off-by: Florian Fainelli --- net/ipv4/ipconfig.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 7fa18bc7e47f..d10073d2be0f 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c

[Bridge] [PATCH net-next 2/2] net: bridge: reject DSA-enabled master netdevices as bridge members

2015-01-14 Thread Florian Fainelli
evices to be bridge members, since those will work correctly in all circumstances. Signed-off-by: Florian Fainelli --- net/bridge/br_if.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 81e49fb73169..b087d278c679 100644

[Bridge] [PATCH net-next 0/2] net: DSA fixes for bridge and ip-autoconf

2015-01-14 Thread Florian Fainelli
is better. Patch 2 solves a different, yet very real problem as well at the bridge layer when using DSA network devices. Thanks! Florian Fainelli (2): net: ipv4: handle DSA enabled master network devices net: bridge: reject DSA-enabled master netdevices as bridge members net/bridge/br_if.c

[Bridge] [PATCH net-next v2 0/2] net: DSA fixes for bridge and ip-autoconf

2015-01-16 Thread Florian Fainelli
is better. Patch 2 solves a different, yet very real problem as well at the bridge layer when using DSA network devices. Florian Fainelli (2): net: ipv4: handle DSA enabled master network devices net: bridge: reject DSA-enabled master netdevices as bridge members net/bridge/br_if.c | 10

[Bridge] [PATCH net-next v2 1/2] net: ipv4: handle DSA enabled master network devices

2015-01-16 Thread Florian Fainelli
network device from operating. Signed-off-by: Florian Fainelli --- Changes in v2: - fixed typo in first comment hunk - remove spurious newline change - removed second comment, the code is obvious enough net/ipv4/ipconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net

[Bridge] [PATCH net-next v2 2/2] net: bridge: reject DSA-enabled master netdevices as bridge members

2015-01-16 Thread Florian Fainelli
evices to be bridge members, since those will work correctly in all circumstances. Signed-off-by: Florian Fainelli --- net/bridge/br_if.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 81e49fb73169..b087d278c679 100644

[Bridge] [RFC net-next 0/3] net: bridge: Allow CPU port configuration

2016-11-21 Thread Florian Fainelli
- if the default behavior is to have all VLANs associated with the CPU port be ingressing/egressing tagged to the CPU, is this really useful? Florian Fainelli (3): net: bridge: Allow bridge master device to configure switch CPU port net: dsa: Propagate VLAN add/del to CPU port(s) net: dsa

[Bridge] [RFC net-next 1/3] net: bridge: Allow bridge master device to configure switch CPU port

2016-11-21 Thread Florian Fainelli
dd vid 2 dev port0 -> port0 (switch port 0) gets programmed Signed-off-by: Florian Fainelli --- net/bridge/br_vlan.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index b6de4f457161..b335d66d21

[Bridge] [RFC net-next 2/3] net: dsa: Propagate VLAN add/del to CPU port(s)

2016-11-21 Thread Florian Fainelli
Now that the bridge layer can call into switchdev to signal programming requests targeting the bridge master device itself, allow the switch drivers to implement separate programming of downstream and upstream/management ports. Signed-off-by: Vivien Didelot Signed-off-by: Florian Fainelli

[Bridge] [RFC net-next 3/3] net: dsa: b53: Remove CPU port specific VLAN programming

2016-11-21 Thread Florian Fainelli
Now that DSA calls into the switch driver to program the CPU port's VLAN attributes, we can get rid of the code that dealt with adding/removing the CPU port to a downstream facing port VLAN membership. Signed-off-by: Florian Fainelli --- drivers/net/dsa/b53/b53_common.c

Re: [Bridge] [RFC net-next 0/3] net: bridge: Allow CPU port configuration

2016-11-22 Thread Florian Fainelli
On 11/22/2016 09:41 AM, Ido Schimmel wrote: > Hi Florian, > > On Mon, Nov 21, 2016 at 11:09:22AM -0800, Florian Fainelli wrote: >> Hi all, >> >> This patch series allows using the bridge master interface to configure >> an Ethernet switch port's CPU/manageme

Re: [Bridge] [RFC net-next 0/3] net: bridge: Allow CPU port configuration

2016-11-22 Thread Florian Fainelli
On 11/22/2016 02:08 PM, Jiri Pirko wrote: > Tue, Nov 22, 2016 at 06:48:29PM CET, and...@lunn.ch wrote: >> Hi Ido >> >>> First of all, I want to be sure that when we say "CPU port", we're >>> talking about the same thing. In mlxsw, the CPU port is a pipe between >>> the device and the host, through

Re: [Bridge] [RFC net-next 2/3] net: dsa: Propagate VLAN add/del to CPU port(s)

2016-11-27 Thread Florian Fainelli
On 11/22/2016 08:50 AM, Vivien Didelot wrote: > Hi Florian, > > Open question: will we need to do the same for FDB and MDB objects? (overlooked that question early this week), I do expect that this could be helpful for FDB and MBD objects as well, yes. > > Florian Fainelli wr

Re: [Bridge] [RFC net-next 0/3] net: bridge: Allow CPU port configuration

2016-12-01 Thread Florian Fainelli
On 11/23/2016 05:48 AM, Ido Schimmel wrote: > Hi Florian, > > On Tue, Nov 22, 2016 at 09:56:30AM -0800, Florian Fainelli wrote: >> On 11/22/2016 09:41 AM, Ido Schimmel wrote: >>> Hi Florian, >>> >>> On Mon, Nov 21, 2016 at 11:09:22AM -0800, Florian F

Re: [Bridge] [PATCH net-next] bridge: fdb add and delete tracepoints

2017-08-27 Thread Florian Fainelli
On 08/27/2017 02:33 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > Tracepoints to trace bridge forwarding database updates. Thanks for adding this! > > Signed-off-by: Roopa Prabhu > --- > include/trace/events/bridge.h | 98 > +++ > net/bridge/br_fdb

Re: [Bridge] [PATCH RFC WIP 0/5] IGMP snooping for local traffic

2017-08-27 Thread Florian Fainelli
Hi Andrew, On 08/26/2017 01:56 PM, Andrew Lunn wrote: > This is a WIP patchset i would like comments on from bridge, > switchdev and hardware offload people. > > The linux bridge supports IGMP snooping. It will listen to IGMP > reports on bridge ports and keep track of which groups have been >

Re: [Bridge] [PATCH net-next v2] bridge: fdb add and delete tracepoints

2017-08-29 Thread Florian Fainelli
On 08/28/2017 09:22 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > A few useful tracepoints to trace bridge forwarding > database updates. > > Signed-off-by: Roopa Prabhu Reviewed-by: Florian Fainelli Small nit below, but probably not a candidate for a v3 > ---

Re: [Bridge] [PATCH net-next v3] bridge: fdb add and delete tracepoints

2017-08-29 Thread Florian Fainelli
On 08/29/2017 01:16 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > A few useful tracepoints to trace bridge forwarding > database updates. > > Signed-off-by: Roopa Prabhu Reviewed-by: Florian Fainelli thanks for quick turnaround! -- Florian

Re: [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs

2018-05-24 Thread Florian Fainelli
Hi Petr, On 05/24/2018 08:09 AM, Petr Machata wrote: > In commit 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap > mirror"), mlxsw got support for offloading mirror-to-gretap such that > the underlay packet path involves a bridge. In that case, the offload is > also influenced by PVID

Re: [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs

2018-05-24 Thread Florian Fainelli
On 05/24/2018 10:20 AM, Florian Fainelli wrote: > Hi Petr, > > On 05/24/2018 08:09 AM, Petr Machata wrote: >> In commit 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap >> mirror"), mlxsw got support for offloading mirror-to-gretap such that >>

Re: [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs

2018-05-24 Thread Florian Fainelli
nothing to support. Correspondingly, all > switchdev drivers have been updated to return -EOPNOTSUPP for bridge > VLAN notifications. This is great, see the other two emails about why I like it so much: Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Thanks! > > In patch

Re: [Bridge] [PATCH net-next v4 5/8] dsa: port: Ignore bridge VLAN events

2018-05-29 Thread Florian Fainelli
specific support for these VLANs, just ignore the > notifications to maintain the current behavior. > > Signed-off-by: Petr Machata > Reviewed-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

[Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-11 Thread Florian Fainelli
Hi Nikolay, Roopa, Jiri, Ido, When a bridge has vlan_filtering=0 and notifies a switch driver through HOST_OBJ_MDB about MC addresses that the CPU/management port is interested in getting MC traffic for, I am seeing that the mdb->vid is set to 0 because br_allowed_ingress() checks for BROPT_VLAN_E

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-12 Thread Florian Fainelli
On 12/12/18 1:02 AM, Ido Schimmel wrote: > On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: >> Hi Nikolay, Roopa, Jiri, Ido, >> >> When a bridge has vlan_filtering=0 and notifies a switch driver through >> HOST_OBJ_MDB about MC addresses that

[Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-12 Thread Florian Fainelli
ned-off-by: Florian Fainelli --- Hi all, Please review carefully, and let me know if you think some of the behaviors described below do not make any sense. Thanks! Documentation/networking/switchdev.txt | 86 ++ 1 file changed, 86 insertions(+) diff --git a/Documentation/

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-15 Thread Florian Fainelli
Le 12/12/18 à 1:02 AM, Ido Schimmel a écrit : > On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: >> Hi Nikolay, Roopa, Jiri, Ido, >> >> When a bridge has vlan_filtering=0 and notifies a switch driver through >> HOST_OBJ_MDB about MC addresses that

Re: [Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-16 Thread Florian Fainelli
Le 12/16/18 à 12:25 AM, Ido Schimmel a écrit : > On Wed, Dec 12, 2018 at 03:09:43PM -0800, Florian Fainelli wrote: >> This patch provides details on the expected behavior of switchdev >> enabled network devices when operating in a "stand alone" mode, as well >> as

Re: [Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-16 Thread Florian Fainelli
On December 16, 2018 12:25:19 AM PST, Ido Schimmel wrote: >On Wed, Dec 12, 2018 at 03:09:43PM -0800, Florian Fainelli wrote: > >mlxsw doesn't support it. These bridges are mainly used with VLAN >devices where the packets ingress the bridge untagged. When configured >ove

Re: [Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-18 Thread Florian Fainelli
On 12/17/18 11:01 PM, Ido Schimmel wrote: > On Sun, Dec 16, 2018 at 09:14:09AM -0800, Florian Fainelli wrote: >> Le 12/16/18 à 12:25 AM, Ido Schimmel a écrit : >>> On Wed, Dec 12, 2018 at 03:09:43PM -0800, Florian Fainelli wrote: >>>> +Non-bridged network ports of t

[Bridge] [PATCH net-next v2] Documentation: networking: Clarify switchdev devices behavior

2019-01-03 Thread Florian Fainelli
ned-off-by: Florian Fainelli --- Changes in v2: - clarified a few parts about VLAN devices wrt. VLAN filtering and their behavior during enslaving. Ido, hopefully this captures correctly what we just talked about this morning. Thanks! Documentation/networking/switchde

Re: [Bridge] [PATCH net-next v2] Documentation: networking: Clarify switchdev devices behavior

2019-01-08 Thread Florian Fainelli
Le 1/4/19 à 5:58 AM, Ido Schimmel a écrit : > On Thu, Jan 03, 2019 at 02:47:02PM -0800, Florian Fainelli wrote: >> +A switchdev driver can also refuse to support dynamic toggling of the VLAN >> +filtering knob at runtime and require a destruction of the bridge device(s) >>

[Bridge] [PATCH net-next v3] Documentation: networking: Clarify switchdev devices behavior

2019-01-08 Thread Florian Fainelli
ned-off-by: Florian Fainelli --- Changes in v3: - spell checks, past vs. present use (Randy) - clarified some behaviors a bit more regarding multicast flooding - added some missing sentence about multicast snopping knob being dynamically turned on/off Changes in v2: - clarified a few parts

[Bridge] [PATCH net-next v4] Documentation: networking: Clarify switchdev devices behavior

2019-01-10 Thread Florian Fainelli
ned-off-by: Florian Fainelli --- Changes in v4: - more spelling/grammar/sentence fixes (Randy) Changes in v3: - spell checks, past vs. present use (Randy) - clarified some behaviors a bit more regarding multicast flooding - added some missing sentence about multicast snopping knob being dynamica

Re: [Bridge] [PATCH net-next v4] Documentation: networking: Clarify switchdev devices behavior

2019-01-11 Thread Florian Fainelli
On 1/11/19 7:06 AM, Ido Schimmel wrote: > On Thu, Jan 10, 2019 at 11:32:06AM -0800, Florian Fainelli wrote: >> This patch provides details on the expected behavior of switchdev >> enabled network devices when operating in a "stand alone" mode, as well >> as

[Bridge] [PATCH net-next] net: Fix ip_mc_{dec, inc}_group allocation context

2019-02-01 Thread Florian Fainelli
uot;bridge: join all-snoopers multicast address") Signed-off-by: Florian Fainelli --- Reproducer: brctl addbr br0 brctl addif br0 eth0 ip link set dev br0 up ip link set dev eth0 up ip ro add 226.94.1.1/32 dev br0 echo 0 > /sys/class/net/br0/bridge/multicast_snooping echo 1

[Bridge] [PATCH 00/12] net: Introduce ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
t all relevant drivers to use it - get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID A subsequent set of patches will convert switchdev_port_attr_set() to use a blocking notifier call, and still get rid of switchdev_port_attr_get() altogether. Florian Fainelli (12): net: Introduce ndo_get_port_pare

[Bridge] [PATCH 01/12] net: Introduce ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
ement both switchdev_port_attr_get() and ndo_get_port_parent_id() operations. Signed-off-by: Florian Fainelli --- include/linux/netdevice.h | 6 ++ net/bridge/br_switchdev.c | 6 +- net/core/net-sysfs.c | 6 +- net/core/rtnetlink.c | 6 +- net/ipv4/ipmr.c | 8 +

[Bridge] [PATCH 02/12] bnxt: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
: Florian Fainelli --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 12 +++- 4 files changed, 15 insertions(+), 30

[Bridge] [PATCH 03/12] liquidio: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
Liquidio only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- .../net/ethernet/cavium/liquidio/lio_main.c | 22

[Bridge] [PATCH 04/12] net/mlx5e: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
mlx5e only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 31

[Bridge] [PATCH 06/12] mscc: ocelot: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
Ocelot only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID as a valid switchdev attribute getter, convert it to use ndo_get_port_parent_id() and get rid of the switchdev_ops::switchdev_port_attr_get altogether. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mscc/ocelot.c | 33

[Bridge] [PATCH 05/12] mlxsw: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- .../net/ethernet/mellanox

[Bridge] [PATCH 07/12] nfp: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
NFP only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- .../ethernet/netronome/nfp/nfp_net_common.c | 4 +--- .../net

[Bridge] [PATCH 08/12] rocker: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker

[Bridge] [PATCH 10/12] staging: fsl-dpaa2: ethsw: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
ethsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2

[Bridge] [PATCH 09/12] netdevsim: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
netdevsim only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- drivers/net/netdevsim/netdev.c | 22 ++ 1

[Bridge] [PATCH 11/12] net: dsa: Implement ndo_get_port_parent_id()

2019-02-04 Thread Florian Fainelli
DSA implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- net/dsa/slave.c | 18

[Bridge] [PATCH 12/12] net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID

2019-02-04 Thread Florian Fainelli
Now that we have a dedicated NDO for getting a port's parent ID, get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID and convert all callers to use the NDO exclusively. This is a preliminary change to getting rid of switchdev_ops eventually. Signed-off-by: Florian Fainelli --- include/net/switch

[Bridge] [PATCH net-next v2 00/12] net: Introduce ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
id of SWITCHDEV_ATTR_ID_PORT_PARENT_ID A subsequent set of patches will convert switchdev_port_attr_set() to use a blocking notifier call, and still get rid of switchdev_port_attr_get() altogether. Florian Fainelli (12): net: Introduce ndo_get_port_parent_id() bnxt: Implement ndo_get_port_parent_id() liq

[Bridge] [PATCH net-next v2 01/12] net: Introduce ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
call the helper functino when valid before falling back to switchdev_port_attr_get(). This will allow us to convert all relevant drivers in one go instead of having to implement both switchdev_port_attr_get() and ndo_get_port_parent_id() operations, then get rid of switchdev_port_attr_get(). Signed-

[Bridge] [PATCH net-next v2 03/12] liquidio: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
Liquidio only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- .../net/ethernet/cavium/liquidio/lio_main.c | 22

[Bridge] [PATCH net-next v2 02/12] bnxt: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
uses of switchdev_port_same_parent_id() convert it to use netdev_port_same_parent_id(). Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

[Bridge] [PATCH net-next v2 04/12] net/mlx5e: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
(). Signed-off-by: Florian Fainelli --- .../ethernet/mellanox/mlx5/core/en/tc_tun.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 31 +++ .../net/ethernet/mellanox/mlx5/core/en_tc.c | 5 ++- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/drivers/net

[Bridge] [PATCH net-next v2 06/12] mscc: ocelot: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
Ocelot only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID as a valid switchdev attribute getter, convert it to use ndo_get_port_parent_id() and get rid of the switchdev_ops::switchdev_port_attr_get altogether. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mscc/ocelot.c | 33

[Bridge] [PATCH net-next v2 07/12] nfp: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
-off-by: Florian Fainelli --- .../ethernet/netronome/nfp/flower/action.c| 3 +-- .../ethernet/netronome/nfp/nfp_net_common.c | 4 +--- .../net/ethernet/netronome/nfp/nfp_net_repr.c | 4 +--- drivers/net/ethernet/netronome/nfp/nfp_port.c | 23 +-- drivers/net/ethernet

[Bridge] [PATCH net-next v2 05/12] mlxsw: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- .../net/ethernet/mellanox

[Bridge] [PATCH net-next v2 08/12] rocker: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker

[Bridge] [PATCH net-next v2 09/12] netdevsim: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
netdevsim only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- drivers/net/netdevsim/netdev.c | 22 ++ 1

[Bridge] [PATCH net-next v2 12/12] net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID

2019-02-05 Thread Florian Fainelli
Now that we have a dedicated NDO for getting a port's parent ID, get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID and convert all callers to use the NDO exclusively. This is a preliminary change to getting rid of switchdev_ops eventually. Signed-off-by: Florian Fainelli --- include/net/switch

[Bridge] [PATCH net-next v2 10/12] staging: fsl-dpaa2: ethsw: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
ethsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2

[Bridge] [PATCH net-next v2 11/12] net: dsa: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
DSA implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- net/dsa/slave.c | 18

Re: [Bridge] [PATCH net-next v2 10/12] staging: fsl-dpaa2: ethsw: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
On 2/5/19 2:13 PM, Florian Fainelli wrote: > ethsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid > of switchdev_ops eventually, ease that migration by implementing a > ndo_get_port_parent_id() function which returns what > switchdev_port_attr_get() would do. >

[Bridge] [PATCH net-next v3 00/12] net: Introduce ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
t_attr_get() altogether. Florian Fainelli (12): net: Introduce ndo_get_port_parent_id() bnxt: Implement ndo_get_port_parent_id() liquidio: Implement ndo_get_port_parent_id() net/mlx5e: Implement ndo_get_port_parent_id() mlxsw: Implement ndo_get_port_parent_id() mscc: ocelot:

[Bridge] [PATCH net-next v3 01/12] net: Introduce ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
call the helper functino when valid before falling back to switchdev_port_attr_get(). This will allow us to convert all relevant drivers in one go instead of having to implement both switchdev_port_attr_get() and ndo_get_port_parent_id() operations, then get rid of switchdev_port_attr_get(). Signed-

[Bridge] [PATCH net-next v3 03/12] liquidio: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
Liquidio only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- .../net/ethernet/cavium/liquidio/lio_main.c | 22

[Bridge] [PATCH net-next v3 02/12] bnxt: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
uses of switchdev_port_same_parent_id() convert it to use netdev_port_same_parent_id(). Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

[Bridge] [PATCH net-next v3 04/12] net/mlx5e: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
(). Signed-off-by: Florian Fainelli --- .../ethernet/mellanox/mlx5/core/en/tc_tun.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 31 +++ .../net/ethernet/mellanox/mlx5/core/en_tc.c | 5 ++- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/drivers/net

[Bridge] [PATCH net-next v3 05/12] mlxsw: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- .../net/ethernet/mellanox

[Bridge] [PATCH net-next v3 06/12] mscc: ocelot: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
Ocelot only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID as a valid switchdev attribute getter, convert it to use ndo_get_port_parent_id() and get rid of the switchdev_ops::switchdev_port_attr_get altogether. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mscc/ocelot.c | 33

[Bridge] [PATCH net-next v3 07/12] nfp: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
-off-by: Florian Fainelli --- .../ethernet/netronome/nfp/flower/action.c| 3 +-- .../ethernet/netronome/nfp/nfp_net_common.c | 4 +--- .../net/ethernet/netronome/nfp/nfp_net_repr.c | 4 +--- drivers/net/ethernet/netronome/nfp/nfp_port.c | 23 +-- drivers/net/ethernet

[Bridge] [PATCH net-next v3 08/12] rocker: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker

[Bridge] [PATCH net-next v3 09/12] netdevsim: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
netdevsim only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Signed-off-by: Florian Fainelli --- drivers/net/netdevsim/netdev.c | 23

[Bridge] [PATCH net-next v3 10/12] staging: fsl-dpaa2: ethsw: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
ethsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2

[Bridge] [PATCH net-next v3 11/12] net: dsa: Implement ndo_get_port_parent_id()

2019-02-05 Thread Florian Fainelli
DSA implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- net/dsa/slave.c | 18

[Bridge] [PATCH net-next v3 12/12] net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID

2019-02-05 Thread Florian Fainelli
Now that we have a dedicated NDO for getting a port's parent ID, get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID and convert all callers to use the NDO exclusively. This is a preliminary change to getting rid of switchdev_ops eventually. Signed-off-by: Florian Fainelli --- include/net/switch

[Bridge] [PATCH net-next v4 00/12] net: Introduce ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
id() and convert all relevant drivers to use it - get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID A subsequent set of patches will convert switchdev_port_attr_set() to use a blocking notifier call, and still get rid of switchdev_port_attr_get() altogether. Florian Fainelli (12): net: Introduce nd

[Bridge] [PATCH net-next v4 01/12] net: Introduce ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
-by: Jiri Pirko Signed-off-by: Florian Fainelli --- include/linux/netdevice.h | 9 +++ net/bridge/br_switchdev.c | 9 +-- net/core/dev.c| 57 +++ net/core/net-sysfs.c | 7 - net/core/rtnetlink.c | 6 - net/ipv4/ipmr.c

[Bridge] [PATCH net-next v4 03/12] liquidio: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
Liquidio only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- .../net/ethernet/cavium/liquidio

[Bridge] [PATCH net-next v4 02/12] bnxt: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
uses of switchdev_port_same_parent_id() convert it to use netdev_port_same_parent_id(). Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +-- drivers/net/ethernet

[Bridge] [PATCH net-next v4 04/12] net/mlx5e: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
(). Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- .../ethernet/mellanox/mlx5/core/en/tc_tun.c | 2 +- .../net/ethernet/mellanox/mlx5/core/en_rep.c | 31 +++ .../net/ethernet/mellanox/mlx5/core/en_tc.c | 5 ++- 3 files changed, 14 insertions(+), 24 deletions(-) diff

[Bridge] [PATCH net-next v4 08/12] rocker: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- drivers

[Bridge] [PATCH net-next v4 06/12] mscc: ocelot: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
Ocelot only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID as a valid switchdev attribute getter, convert it to use ndo_get_port_parent_id() and get rid of the switchdev_ops::switchdev_port_attr_get altogether. Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mscc

[Bridge] [PATCH net-next v4 05/12] mlxsw: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
mlxsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- .../net

[Bridge] [PATCH net-next v4 07/12] nfp: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
: Jiri Pirko Signed-off-by: Florian Fainelli --- .../ethernet/netronome/nfp/flower/action.c| 3 +-- .../ethernet/netronome/nfp/nfp_net_common.c | 4 +--- .../net/ethernet/netronome/nfp/nfp_net_repr.c | 4 +--- drivers/net/ethernet/netronome/nfp/nfp_port.c | 22 +-- drivers

[Bridge] [PATCH net-next v4 09/12] netdevsim: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
netdevsim only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get(). Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- drivers/net/netdevsim/netdev.c | 23

[Bridge] [PATCH net-next v4 10/12] staging: fsl-dpaa2: ethsw: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
ethsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2

[Bridge] [PATCH net-next v4 12/12] net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID

2019-02-06 Thread Florian Fainelli
Now that we have a dedicated NDO for getting a port's parent ID, get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID and convert all callers to use the NDO exclusively. This is a preliminary change to getting rid of switchdev_ops eventually. Signed-off-by: Florian Fainelli --- include/net/switch

[Bridge] [PATCH net-next v4 11/12] net: dsa: Implement ndo_get_port_parent_id()

2019-02-06 Thread Florian Fainelli
DSA implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- net/dsa

[Bridge] [PATCH net-next 00/16] net: Remove switchdev_ops

2019-02-08 Thread Florian Fainelli
being programmed during the prepare phase - once we get rid of getting switchdev port attributes we convert the setting of such attributes using a blocking notifier And then remove switchdev_ops completely. Please review and let me know what you think! Florian Fainelli (16): Document

[Bridge] [PATCH net-next 01/16] Documentation: networking: switchdev: Update port parent ID section

2019-02-08 Thread Florian Fainelli
net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID") Signed-off-by: Florian Fainelli --- Documentation/networking/switchdev.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt index f3244d

[Bridge] [PATCH net-next 03/16] staging: fsl-dpaa2: ethsw: Check bridge port flags during set

2019-02-08 Thread Florian Fainelli
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, have ethsw check that the bridge port flags that are being set are supported. Signed-off-by: Florian Fainelli --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[Bridge] [PATCH net-next 02/16] mlxsw: spectrum: Check bridge flags during prepare phase

2019-02-08 Thread Florian Fainelli
In preparation for getting rid of switchdev_port_attr_get(), have mlxsw check for the bridge flags being set through switchdev_port_attr_set() with the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute identifier. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/mellanox/mlxsw

[Bridge] [PATCH net-next 06/16] net: bridge: Stop calling switchdev_port_attr_get()

2019-02-08 Thread Florian Fainelli
Now that all switchdev drivers have been converted to checking the bridge port flags during the prepare phase of the switchdev_port_attr_set(), we can move straight to trying to set the desired flag through SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS. Signed-off-by: Florian Fainelli --- net/bridge

[Bridge] [PATCH net-next 04/16] net: dsa: Add setter for SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

2019-02-08 Thread Florian Fainelli
-off-by: Florian Fainelli --- net/dsa/dsa_priv.h | 3 +++ net/dsa/port.c | 10 ++ net/dsa/slave.c| 4 3 files changed, 17 insertions(+) diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 1f4972dab9f2..97594f0b6efb 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa

[Bridge] [PATCH net-next 05/16] rocker: Check bridge flags during prepare phase

2019-02-08 Thread Florian Fainelli
In preparation for getting rid of switchdev_port_attr_get(), have rocker check for the bridge flags being set through switchdev_port_attr_set() with the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute identifier. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/rocker/rocker_main.c | 40

[Bridge] [PATCH net-next 08/16] net: Get rid of switchdev_port_attr_get()

2019-02-08 Thread Florian Fainelli
since this was the only place where it was called. Signed-off-by: Florian Fainelli --- Documentation/networking/switchdev.txt| 5 ++- .../mellanox/mlxsw/spectrum_switchdev.c | 32 --- drivers/net/ethernet/rocker/rocker_main.c | 30 - drivers

[Bridge] [PATCH net-next 07/16] net: Remove SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT

2019-02-08 Thread Florian Fainelli
Now that we have converted the bridge code and the drivers to check for bridge port(s) flags at the time we try to set them, there is no need for a get() -> set() sequence anymore and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT therefore becomes unused. Signed-off-by: Florian Faine

  1   2   3   >