]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: abm: build full Qdisc hierarchy based on graft notifications
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 12 Nov 2018 22:58:15 +0000 (14:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Nov 2018 16:51:28 +0000 (08:51 -0800)
commit3565b1a1150f6e22183629df5c9f4054e98505ed
tree8a22781fdd723216e5b0723c5fbefc3a8deedb91
parenta3c975ac957ab9544e97fb4bfaabd5a84e69f0c7
nfp: abm: build full Qdisc hierarchy based on graft notifications

Using graft notifications recreate in the driver the full Qdisc
hierarchy.  Keep track of how many times each Qdisc is attached
to the hierarchy to make sure we don't offload Qdiscs which are
attached multiple times (device queues can't be shared).  For
graft events of Qdiscs we don't know exist make the child as
invalid/untracked.

Note that MQ Qdisc doesn't send destruction events reliably when
device is dismantled, so we need to manually clean out the
children otherwise we'd think Qdiscs which are still in use
are getting freed.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/abm/main.h
drivers/net/ethernet/netronome/nfp/abm/qdisc.c