* [PATCH net-next] hv_netvsc: Set needed_headroom according to VF
@ 2021-06-18 19:35 Haiyang Zhang
2021-06-21 19:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Haiyang Zhang @ 2021-06-18 19:35 UTC (permalink / raw)
To: linux-hyperv, netdev
Cc: haiyangz, kys, sthemmin, olaf, vkuznets, davem, linux-kernel
Set needed_headroom according to VF if VF needs a bigger
headroom.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/net/hyperv/netvsc_drv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index f682a5572d84..382bebc2420d 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] hv_netvsc: Set needed_headroom according to VF
2021-06-18 19:35 [PATCH net-next] hv_netvsc: Set needed_headroom according to VF Haiyang Zhang
@ 2021-06-21 19:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-21 19:20 UTC (permalink / raw)
To: Haiyang Zhang
Cc: linux-hyperv, netdev, kys, sthemmin, olaf, vkuznets, davem, linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 18 Jun 2021 12:35:39 -0700 you wrote:
> Set needed_headroom according to VF if VF needs a bigger
> headroom.
>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
> drivers/net/hyperv/netvsc_drv.c | 5 +++++
> 1 file changed, 5 insertions(+)
Here is the summary with links:
- [net-next] hv_netvsc: Set needed_headroom according to VF
https://git.kernel.org/netdev/net/c/536ba2e06d1a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-21 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 19:35 [PATCH net-next] hv_netvsc: Set needed_headroom according to VF Haiyang Zhang
2021-06-21 19:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).