Skip to content

Commit

Permalink
nfp: process MTU updates from firmware flower app
Browse files Browse the repository at this point in the history
Now that control message processing occurs in a workqueue rather than a BH
handler MTU updates received from the firmware may be safely processed.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Simon Horman authored and David S. Miller committed Aug 16, 2017
1 parent b985f87 commit 2dff196
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/net/ethernet/netronome/nfp/flower/cmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,17 @@ nfp_flower_cmsg_portmod_rx(struct nfp_app *app, struct sk_buff *skb)
return;
}

if (link)
if (link) {
u16 mtu = be16_to_cpu(msg->mtu);

netif_carrier_on(netdev);
else

/* An MTU of 0 from the firmware should be ignored */
if (mtu)
dev_set_mtu(netdev, mtu);
} else {
netif_carrier_off(netdev);
}
rcu_read_unlock();
}

Expand Down

0 comments on commit 2dff196

Please sign in to comment.