]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitde7a492a9bab7e431ed4932dfd10fd35940d67e3
treec2af6630374972ae8a524f589cee2208b92ca4bc
parentbe0c40c6704c3cd8ddc5761ab105e359926d887a
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