提交 2dff1962 编写于 作者: S Simon Horman 提交者: David S. Miller

nfp: process MTU updates from firmware flower app

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: NSimon Horman <simon.horman@netronome.com>
Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b985f870
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册