]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: split and limit cmsg skb lists
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Wed, 11 Apr 2018 23:47:38 +0000 (16:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2018 01:57:28 +0000 (21:57 -0400)
commit533f50df758766c5cf6da5c304a00b2fab7cedba
tree8f69b5a96ae8d2dfeb2dcbcb02d2a95df516053d
parent59bf4c333b8167f2ef2f96fb9d328860d5cb6872
nfp: flower: split and limit cmsg skb lists

Introduce a second skb list for handling control messages and limit the
number of allowed messages. Some control messages are considered more
crucial than others, resulting in the need for a second skb list. By
splitting the list into a separate high and low priority list we can
ensure that messages on the high list get added to the head of the list
that gets processed, this however has no functional impact. Previously
there was no limit on the number of messages allowed on the queue, this
could result in the queue growing boundlessly and eventually the host
running out of memory.

Fixes: 0c9b49d3d217 ("nfp: process control messages in workqueue in flower app")
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/cmsg.c
drivers/net/ethernet/netronome/nfp/flower/cmsg.h
drivers/net/ethernet/netronome/nfp/flower/main.c
drivers/net/ethernet/netronome/nfp/flower/main.h