OSDN Git Service

nfp: flower: monitor and offload LAG groups
authorJohn Hurley <john.hurley@netronome.com>
Thu, 24 May 2018 02:22:53 +0000 (19:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2018 03:10:57 +0000 (23:10 -0400)
commitbb9a8d031140f186d13d82f57b0f5646d596652f
tree1d367a01216b01615475271e302f205ffb875db0
parentf44aa9ef7950a56daa3a5b41f069761f945f1a1f
nfp: flower: monitor and offload LAG groups

Monitor LAG events via the NETDEV_CHANGEUPPER/NETDEV_CHANGELOWERSTATE
notifiers to maintain a list of offloadable groups. Sync these groups with
HW via a delayed workqueue to prevent excessive re-configuration. When the
workqueue is triggered it may generate multiple control messages for
different groups. These messages are linked via a batch ID and flags to
indicate a new batch and the end of a batch.

Update private data in each repr to track their LAG lower state flags. The
state of a repr is used to determine the active netdevs that can be
offloaded. For example, in active-backup mode, we only offload the netdev
currently active.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/Makefile
drivers/net/ethernet/netronome/nfp/flower/lag_conf.c [new file with mode: 0644]
drivers/net/ethernet/netronome/nfp/flower/main.c
drivers/net/ethernet/netronome/nfp/flower/main.h