mbox series

[net-next,0/4] net: dsa: use switchdev attr and obj handlers

Message ID 20190611214747.22285-1-vivien.didelot@gmail.com
Headers show
Series net: dsa: use switchdev attr and obj handlers | expand

Message

Vivien Didelot June 11, 2019, 9:47 p.m. UTC
This series reduces boilerplate in the handling of switchdev attribute and
object operations by using the switchdev_handle_* helpers, which check the
targeted devices and recurse into their lower devices.

This also brings back the ability to inspect operations targeting the bridge
device itself (where .orig_dev is the bridge device and .dev is the slave),
even though that is of no use yet and skipped by this series.

Vivien Didelot (4):
  net: dsa: do not check orig_dev in vlan del
  net: dsa: make cpu_dp non const
  net: dsa: make dsa_slave_dev_check use const
  net: dsa: use switchdev handle helpers

 include/net/dsa.h |  2 +-
 net/dsa/port.c    |  9 ------
 net/dsa/slave.c   | 81 ++++++++++++++++++++---------------------------
 3 files changed, 36 insertions(+), 56 deletions(-)

Comments

Vivien Didelot June 13, 2019, 5:28 p.m. UTC | #1
Hi David,

On Tue, 11 Jun 2019 17:47:43 -0400, Vivien Didelot <vivien.didelot@gmail.com> wrote:
> This series reduces boilerplate in the handling of switchdev attribute and
> object operations by using the switchdev_handle_* helpers, which check the
> targeted devices and recurse into their lower devices.
> 
> This also brings back the ability to inspect operations targeting the bridge
> device itself (where .orig_dev is the bridge device and .dev is the slave),
> even though that is of no use yet and skipped by this series.
> 
> Vivien Didelot (4):
>   net: dsa: do not check orig_dev in vlan del
>   net: dsa: make cpu_dp non const
>   net: dsa: make dsa_slave_dev_check use const
>   net: dsa: use switchdev handle helpers
> 
>  include/net/dsa.h |  2 +-
>  net/dsa/port.c    |  9 ------
>  net/dsa/slave.c   | 81 ++++++++++++++++++++---------------------------
>  3 files changed, 36 insertions(+), 56 deletions(-)

Please do not merge. The orig_dev != dev test in patch 4 is not correct,
because it skips the programming of the HOST_MDB object. I'll respin in a few.


Thanks,
Vivien