summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp/flower/cmsg.h
diff options
context:
space:
mode:
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>2018-04-12 02:47:38 +0300
committerDavid S. Miller <davem@davemloft.net>2018-04-13 04:57:28 +0300
commitcf2cbadc20f5651c3dde9f5ac2ee52fb43aa4ddd (patch)
tree8f69b5a96ae8d2dfeb2dcbcb02d2a95df516053d /drivers/net/ethernet/netronome/nfp/flower/cmsg.h
parent0b1a989ef5a751b5992842d1934e22de861a848e (diff)
downloadlinux-cf2cbadc20f5651c3dde9f5ac2ee52fb43aa4ddd.tar.xz
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: b985f870a5f0 ("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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/cmsg.h')
-rw-r--r--drivers/net/ethernet/netronome/nfp/flower/cmsg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.h b/drivers/net/ethernet/netronome/nfp/flower/cmsg.h
index 96bc0e33980c..b6c0fd053a50 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.h
+++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.h
@@ -108,6 +108,8 @@
#define NFP_FL_IPV4_TUNNEL_TYPE GENMASK(7, 4)
#define NFP_FL_IPV4_PRE_TUN_INDEX GENMASK(2, 0)
+#define NFP_FLOWER_WORKQ_MAX_SKBS 30000
+
#define nfp_flower_cmsg_warn(app, fmt, args...) \
do { \
if (net_ratelimit()) \