nfp: avoid soft lockups under control message storm
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 2 Oct 2018 17:10:14 +0000 (10:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:20 +0000 (09:16 +0200)
commiteb79c31aac15aad1ff700f1ac6c8223946b8553e
treeb845af358f553c7f3d94d2ced77109491cb93318
parentf578e5b34c388a9281cfc613ed59aa9c414cc83f
nfp: avoid soft lockups under control message storm

[ Upstream commit ff58e2df62ce29d0552278c290ae494b30fe0c6f ]

When FW floods the driver with control messages try to exit the cmsg
processing loop every now and then to avoid soft lockups.  Cmsg
processing is generally very lightweight so 512 seems like a reasonable
budget, which should not be exceeded under normal conditions.

Fixes: 77ece8d5f196 ("nfp: add control vNIC datapath")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Tested-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c