summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/rocker
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-06-13 06:35:47 +0200
committerDavid S. Miller <davem@davemloft.net>2015-06-16 01:06:48 +0200
commit02a9fbfc878ec3e4c17b11d6ac41dfe86667b732 (patch)
tree1a7a041bd5d57f709f5736395425b297b14f1f58 /drivers/net/ethernet/rocker
parentrocker: revert back to support for nowait processes (diff)
downloadlinux-02a9fbfc878ec3e4c17b11d6ac41dfe86667b732.tar.xz
linux-02a9fbfc878ec3e4c17b11d6ac41dfe86667b732.zip
rocker: mark neigh update event processing as 'no wait'
Neigh update event handler runs in a context where we can't sleep, so mark processing in driver with ROCKER_OP_FLAG_NOWAIT. NOWAIT will use GFP_ATOMIC for allocations and will queue cmds to the device's cmd ring but will not wait (sleep) for cmd response back from device. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/rocker')
-rw-r--r--drivers/net/ethernet/rocker/rocker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index c1910c15a86f..1995b592af4e 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -5251,7 +5251,8 @@ static struct notifier_block rocker_netdevice_nb __read_mostly = {
static int rocker_neigh_update(struct net_device *dev, struct neighbour *n)
{
struct rocker_port *rocker_port = netdev_priv(dev);
- int flags = (n->nud_state & NUD_VALID) ? 0 : ROCKER_OP_FLAG_REMOVE;
+ int flags = (n->nud_state & NUD_VALID ? 0 : ROCKER_OP_FLAG_REMOVE) |
+ ROCKER_OP_FLAG_NOWAIT;
__be32 ip_addr = *(__be32 *)n->primary_key;
return rocker_port_ipv4_neigh(rocker_port, SWITCHDEV_TRANS_NONE,