Skip to content

Commit

Permalink
net: marvell: prestera: devlink: add traps/groups implementation
Browse files Browse the repository at this point in the history
Add devlink traps registration (with corresponding groups) for
all the traffic types that driver traps to the CPU;
prestera_rxtx: report each packet trapped to the CPU (RX) to the
prestera_devlink;

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Oleksandr Mazur authored and David S. Miller committed Jun 14, 2021
1 parent 7a4f547 commit 0a9003f
Show file tree
Hide file tree
Showing 6 changed files with 452 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/marvell/prestera/prestera.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,15 @@ struct prestera_event {

struct prestera_switchdev;
struct prestera_rxtx;
struct prestera_trap_data;

struct prestera_switch {
struct prestera_device *dev;
struct prestera_switchdev *swdev;
struct prestera_rxtx *rxtx;
struct list_head event_handlers;
struct notifier_block netdev_nb;
struct prestera_trap_data *trap_data;
char base_mac[ETH_ALEN];
struct list_head port_list;
rwlock_t port_list_lock;
Expand Down
Loading

0 comments on commit 0a9003f

Please sign in to comment.