OSDN Git Service

devlink: Add API to register packet trap groups
authorIdo Schimmel <idosch@mellanox.com>
Sun, 22 Mar 2020 18:48:26 +0000 (20:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:40:40 +0000 (21:40 -0700)
commit95ad9555b5a1e1b34d6b8a52fb6189274a61dad3
tree344a36694f8a4843b2325026ef01d5aff3abe130
parentc64797d45344fdf8df19697be730df586c741eaa
devlink: Add API to register packet trap groups

Currently, packet trap groups are implicitly registered by drivers upon
packet trap registration. When the traps are registered, each is
associated with a group and the group is created by devlink, if it does
not exist already.

This makes it difficult for drivers to pass additional attributes for
the groups.

Therefore, as a preparation for future patches that require passing
additional group attributes, add an API to explicitly register /
unregister these groups.

Next patches will convert existing drivers to use this API.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c