From 4c1f9a45e1d9061ef1ed752a6f32313bf48de541 Mon Sep 17 00:00:00 2001 From: Alex Ng Date: Fri, 22 Sep 2017 20:12:30 -0400 Subject: [PATCH 1/2] RH7: hv_netvsc: Restore needed_headroom request --- hv-rhel7.x/hv/netvsc_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hv-rhel7.x/hv/netvsc_drv.c b/hv-rhel7.x/hv/netvsc_drv.c index 0780f5bb8..eb68131b7 100644 --- a/hv-rhel7.x/hv/netvsc_drv.c +++ b/hv-rhel7.x/hv/netvsc_drv.c @@ -1955,7 +1955,9 @@ static int netvsc_probe(struct hv_device *dev, net->ethtool_ops = ðtool_ops; SET_NETDEV_DEV(net, &dev->device); - /* Notify the netvsc driver of the new device */ + /* We always need headroom for rndis header */ + net->needed_headroom = RNDIS_AND_PPI_SIZE; + memset(&device_info, 0, sizeof(device_info)); device_info.ring_size = ring_size; device_info.num_chn = VRSS_CHANNEL_DEFAULT; From 633b8b84e9b0bfea4e705fc0d175735db2822def Mon Sep 17 00:00:00 2001 From: Alex Ng Date: Fri, 22 Sep 2017 20:16:13 -0400 Subject: [PATCH 2/2] RH7: [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases --- hv-rhel7.x/hv/netvsc_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hv-rhel7.x/hv/netvsc_drv.c b/hv-rhel7.x/hv/netvsc_drv.c index eb68131b7..eb01986ca 100644 --- a/hv-rhel7.x/hv/netvsc_drv.c +++ b/hv-rhel7.x/hv/netvsc_drv.c @@ -1958,6 +1958,13 @@ static int netvsc_probe(struct hv_device *dev, /* We always need headroom for rndis header */ net->needed_headroom = RNDIS_AND_PPI_SIZE; + /* Initialize the number of queues to be 1, we may change it if more + * channels are offered later. + */ + netif_set_real_num_tx_queues(net, 1); + netif_set_real_num_rx_queues(net, 1); + + /* Notify the netvsc driver of the new device */ memset(&device_info, 0, sizeof(device_info)); device_info.ring_size = ring_size; device_info.num_chn = VRSS_CHANNEL_DEFAULT;