Commit 536ba2e0 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller

hv_netvsc: Set needed_headroom according to VF

Set needed_headroom according to VF if VF needs a bigger
headroom.
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b4cd14f
......@@ -2384,6 +2384,9 @@ static int netvsc_register_vf(struct net_device *vf_netdev)
dev_hold(vf_netdev);
rcu_assign_pointer(net_device_ctx->vf_netdev, vf_netdev);
if (ndev->needed_headroom < vf_netdev->needed_headroom)
ndev->needed_headroom = vf_netdev->needed_headroom;
vf_netdev->wanted_features = ndev->features;
netdev_update_features(vf_netdev);
......@@ -2462,6 +2465,8 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev)
RCU_INIT_POINTER(net_device_ctx->vf_netdev, NULL);
dev_put(vf_netdev);
ndev->needed_headroom = RNDIS_AND_PPI_SIZE;
return NOTIFY_OK;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment