OSDN Git Service

nfp: abm: reset RED's child based on limit
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 12 Nov 2018 22:58:17 +0000 (14:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Nov 2018 16:51:28 +0000 (08:51 -0800)
commit6c5dbda0d4df000cff88d8bbb382de3d2e034d8f
treec2af6630374972ae8a524f589cee2208b92ca4bc
parentc0b7490b19f6ab43c3c4ef82c8d5ed3bf19a8913
nfp: abm: reset RED's child based on limit

RED qdisc will replace its child Qdisc with a new FIFO queue if
it is reconfigured and the limit parameter is not 0.

This means that when it's created with limit of 0 it will have no FIFO,
and all packets will be dropped.  If it's changed and limit is specified
it will loose its existing child (implicit graft).  Make sure we mark
RED Qdisc child as NFP_QDISC_UNTRACKED if its not the expected FIFO.

nfp_abm_qdisc_replace() will return 1 if Qdisc already existed.

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/qdisc.c