All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] hv_netvsc: Check VF datapath when sending traffic to VF
@ 2021-01-06  1:15 Long Li
  2021-01-06  1:15 ` [PATCH 2/3] hv_netvsc: Wait for completion on request NVSP_MSG4_TYPE_SWITCH_DATA_PATH Long Li
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Long Li @ 2021-01-06  1:15 UTC (permalink / raw)
  To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	David S. Miller, Jakub Kicinski, linux-hyperv, netdev,
	linux-kernel
  Cc: Long Li

From: Long Li <longli@microsoft.com>

The driver needs to check if the datapath has been switched to VF before
sending traffic to VF.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/hyperv/netvsc_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index f32f28311d57..5dd4f37afa3d 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -539,7 +539,8 @@ static int netvsc_xmit(struct sk_buff *skb, struct net_device *net, bool xdp_tx)
 	 */
 	vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev);
 	if (vf_netdev && netif_running(vf_netdev) &&
-	    netif_carrier_ok(vf_netdev) && !netpoll_tx_running(net))
+	    netif_carrier_ok(vf_netdev) && !netpoll_tx_running(net) &&
+	    net_device_ctx->data_path_is_vf)
 		return netvsc_vf_xmit(net, vf_netdev, skb);
 
 	/* We will atmost need two pages to describe the rndis
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-01-07 18:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06  1:15 [PATCH 1/3] hv_netvsc: Check VF datapath when sending traffic to VF Long Li
2021-01-06  1:15 ` [PATCH 2/3] hv_netvsc: Wait for completion on request NVSP_MSG4_TYPE_SWITCH_DATA_PATH Long Li
2021-01-06  4:25   ` kernel test robot
2021-01-06  4:25     ` kernel test robot
2021-01-06 23:59     ` Long Li
2021-01-06 23:59     ` Long Li
2021-01-07 18:36       ` Long Li
2021-01-07 18:36       ` Long Li
2021-01-06 17:36   ` Haiyang Zhang
2021-01-06  1:15 ` [PATCH 3/3] hv_netvsc: Process NETDEV_GOING_DOWN on VF hot remove Long Li
2021-01-06 17:36   ` Haiyang Zhang
2021-01-06 17:36 ` [PATCH 1/3] hv_netvsc: Check VF datapath when sending traffic to VF Haiyang Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.