]> 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)
commit83f3574c678004de328df25545096c33cf17f0a8
tree8f69b5a96ae8d2dfeb2dcbcb02d2a95df516053d
parentff239db5131f36cc6c962923d5aaa47c6acb4ee4
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: 24412b36046c ("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