Request for review on Hyper-V virtual network driver
Subsystems (4)
Haiyang Zhang
maintainerTo network maintainers,
Over the last several months we have addressed all the known issues in our Hyper-V virtual network driver. We are very keen on getting this driver out of the staging area. To that end, we would like to request you to review this code.
Thanks,
Haiyang
--- drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/hyperv/Kconfig | 10 + drivers/net/hyperv/Makefile | 4 + drivers/net/hyperv/hyperv_net.h | 1057 +++++++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc.c | 1014 +++++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc_drv.c | 473 +++++++++++++++++ drivers/net/hyperv/rndis_filter.c | 830 +++++++++++++++++++++++++++++ drivers/staging/hv/Kconfig | 7 - drivers/staging/hv/Makefile | 2 - drivers/staging/hv/hyperv_net.h | 1057 ------------------------------------- drivers/staging/hv/netvsc.c | 1015 ----------------------------------- drivers/staging/hv/netvsc_drv.c | 474 ----------------- drivers/staging/hv/rndis_filter.c | 831 ----------------------------- 14 files changed, 3391 insertions(+), 3386 deletions(-) create mode 100644 drivers/net/hyperv/Kconfig create mode 100644 drivers/net/hyperv/Makefile create mode 100644 drivers/net/hyperv/hyperv_net.h create mode 100644 drivers/net/hyperv/netvsc.c create mode 100644 drivers/net/hyperv/netvsc_drv.c create mode 100644 drivers/net/hyperv/rndis_filter.c delete mode 100644 drivers/staging/hv/hyperv_net.h delete mode 100644 drivers/staging/hv/netvsc.c delete mode 100644 drivers/staging/hv/netvsc_drv.c delete mode 100644 drivers/staging/hv/rndis_filter.c
drivers/net/Kconfig +2 -0
@@ -3449,4 +3449,6 @@ config VMXNET3 To compile this driver as a module, choose M here: the module will be called vmxnet3. +source "drivers/net/hyperv/Kconfig" + endif # NETDEVICES
drivers/net/Makefile +1 -0
@@ -306,3 +306,4 @@ obj-$(CONFIG_CAIF) += caif/ obj-$(CONFIG_OCTEON_MGMT_ETHERNET) += octeon/ obj-$(CONFIG_PCH_GBE) += pch_gbe/ obj-$(CONFIG_TILE_NET) += tile/ +obj-$(CONFIG_HYPERV_NET) += hyperv/
drivers/net/hyperv/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +if HYPERV + +config HYPERV_NET + tristate "Microsoft Hyper-V virtual network driver" + depends on NET + default HYPERV + help + Select this option to enable the Hyper-V virtual network driver. + +endif
drivers/net/hyperv/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +obj-$(CONFIG_HYPERV_NET) += hv_netvsc.o + +hv_netvsc-y := netvsc_drv.o netvsc.o rndis_filter.o +
drivers/net/hyperv/hyperv_net.h new file +1057 -0
1,057 lines not on this page · raw message
drivers/net/hyperv/netvsc.c new file +1014 -0
1,014 lines not on this page · raw message
drivers/net/hyperv/netvsc_drv.c new file +473 -0
473 lines not on this page · raw message
drivers/net/hyperv/rndis_filter.c new file +830 -0
432 lines not on this page · raw message
drivers/staging/hv/hyperv_net.h deleted +0 -1057
1,057 lines not on this page · raw message
drivers/staging/hv/netvsc.c deleted +0 -1015
1,015 lines not on this page · raw message
drivers/staging/hv/netvsc_drv.c deleted +0 -474
474 lines not on this page · raw message
drivers/staging/hv/rndis_filter.c deleted +0 -831
831 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.4.1
Part of the diff is not shown here. View the raw message.
Quoted 26 lines · Haiyang Zhang
To network maintainers,
Over the last several months we have addressed all the known issues in our Hyper-V virtual network driver. We are very keen on getting this driver out of the staging area. To that end, we would like to request you to review this code.
Signed-off-by Haiyang Zhang <[email protected]>--- drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/hyperv/Kconfig | 10 + drivers/net/hyperv/Makefile | 4 + drivers/net/hyperv/hyperv_net.h | 1057 +++++++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc.c | 1014 +++++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc_drv.c | 473 +++++++++++++++++ drivers/net/hyperv/rndis_filter.c | 830 +++++++++++++++++++++++++++++ drivers/staging/hv/Kconfig | 7 - drivers/staging/hv/Makefile | 2 - drivers/staging/hv/hyperv_net.h | 1057 ------------------------------------- drivers/staging/hv/netvsc.c | 1015 ----------------------------------- drivers/staging/hv/netvsc_drv.c | 474 ----------------- drivers/staging/hv/rndis_filter.c | 831 ----------------------------- 14 files changed, 3391 insertions(+), 3386 deletions(-) create mode 100644 drivers/net/hyperv/Kconfig create mode 100644 drivers/net/hyperv/Makefile
Quoted 8 lines
create mode 100644 drivers/net/hyperv/hyperv_net.h create mode 100644 drivers/net/hyperv/netvsc.c create mode 100644 drivers/net/hyperv/netvsc_drv.c create mode 100644 drivers/net/hyperv/rndis_filter.c delete mode 100644 drivers/staging/hv/hyperv_net.h delete mode 100644 drivers/staging/hv/netvsc.c delete mode 100644 drivers/staging/hv/netvsc_drv.c delete mode 100644 drivers/staging/hv/rndis_filter.c
I suggest you resend this using the -M or --find-renames option.
Haiyang Zhang
maintainerQuoted 11 lines
-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Thursday, June 09, 2011 5:39 PMQuoted 7 lines
create mode 100644 drivers/net/hyperv/netvsc.c create mode 100644 drivers/net/hyperv/netvsc_drv.c create mode 100644 drivers/net/hyperv/rndis_filter.c delete mode 100644 drivers/staging/hv/hyperv_net.h delete mode 100644 drivers/staging/hv/netvsc.c delete mode 100644 drivers/staging/hv/netvsc_drv.c delete mode 100644 drivers/staging/hv/rndis_filter.c
Quoted 1 line
I suggest you resend this using the -M or --find-renames option.
Will do.
Thanks,
- Haiyang
Quoted 11 lines · Haiyang Zhang
Quoted 11 lines
-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Thursday, June 09, 2011 5:39 PMQuoted 7 lines
create mode 100644 drivers/net/hyperv/netvsc.c create mode 100644 drivers/net/hyperv/netvsc_drv.c create mode 100644 drivers/net/hyperv/rndis_filter.c delete mode 100644 drivers/staging/hv/hyperv_net.h delete mode 100644 drivers/staging/hv/netvsc.c delete mode 100644 drivers/staging/hv/netvsc_drv.c delete mode 100644 drivers/staging/hv/rndis_filter.c
Quoted 3 lines
Quoted 1 line
I suggest you resend this using the -M or --find-renames option.
Will do.
No, that will not show anything at all, which is the point of the review. Otherwise it will just require someone to go look at the drivers/staging/hv/ directory in linux-next to properly determine what is happening here.
So this patch is fine for a review.
thanks,
greg k-h
Haiyang Zhang
maintainerQuoted 5 lines
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, June 09, 2011 6:07 PMQuoted 2 lines
Quoted 1 line
I suggest you resend this using the -M or --find-renames option.
Quoted 8 lines
Quoted 1 line
Will do.
No, that will not show anything at all, which is the point of the review. Otherwise it will just require someone to go look at the
drivers/staging/hv/directory in linux-next to properly determine what is happening here.So this patch is fine for a review.
OK, so I will wait for further review comments on the netvsc files.
Thanks,
- Haiyang
Quoted 14 lines · Greg KH
Quoted 13 lines · Haiyang Zhang
Quoted 12 lines
-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Thursday, June 09, 2011 5:39 PMQuoted 7 lines
create mode 100644 drivers/net/hyperv/netvsc.c create mode 100644 drivers/net/hyperv/netvsc_drv.c create mode 100644 drivers/net/hyperv/rndis_filter.c delete mode 100644 drivers/staging/hv/hyperv_net.h delete mode 100644 drivers/staging/hv/netvsc.c delete mode 100644 drivers/staging/hv/netvsc_drv.c delete mode 100644 drivers/staging/hv/rndis_filter.cI suggest you resend this using the -M or --find-renames option.
Quoted 8 lines
Quoted 1 line
Will do.
No, that will not show anything at all, which is the point of the review. Otherwise it will just require someone to go look at the
drivers/staging/hv/directory in linux-next to properly determine what is happening here.So this patch is fine for a review.
The line count of the files are different.
It's much more difficult to see what if anything has changed between the two versions.
trivia:
All the message logging uses of dev_<level> should have a terminating newline "\n" in netvsc.c
In netvsc.c dev_<level> messages are used.
In netvsc_drv.c netdev_<level> messages are used.
int netvsc_recv_callback(struct hv_device *device_obj,
struct hv_netvsc_packet *packet)
{
struct net_device *net = dev_get_drvdata(&device_obj->device);Maybe use the netdev_<level> style everywhere possible?
It's odd and a bit ugly to use #include "../../staging/hyperv.h"
Maybe add another include path to the Makefile and just use #include "hyperv.h"
until all of the hyperv files are moved out of staging?
Haiyang Zhang
maintainerQuoted 9 lines
-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Thursday, June 09, 2011 6:28 PM
The line count of the files are different.It's much more difficult to see what if anything has changed between the two versions.
The only changes are the include file name, just to make it compile in the net dir. After all code review suggestions are done into staging/hv, I will submit a patch with "-M" to get the entire driver out of staging area.
Quoted 8 lines
trivia:
All the message logging uses of dev_<level> should have a terminating newline "\n" in
netvsc.cIn
netvsc.cdev_<level> messages are used.
Innetvsc_drv.cnetdev_<level> messages are used.
Quoted 6 lines
int netvsc_recv_callback(struct
hv_device*device_obj,
structhv_netvsc_packet*packet){ struct net_device *net = dev_get_drvdata(&device_obj->device);Maybe use the netdev_<level> style everywhere possible?
Will do this change.
Quoted 6 lines
It's odd and a bit ugly to use #include "
../../staging/hyperv.h"Maybe add another include path to the
Makefileand just use #include "hyperv.h"
until all of the hyperv files are moved out of staging?
Will do.
Thanks,
- Haiyang
On Thu, 2011-06-09 at 15:28 -0700, Joe Perches wrote:
[...]
Quoted 5 lines
It's odd and a bit ugly to use #include "
../../staging/hyperv.h"Maybe add another include path to the
Makefileand just use #include "hyperv.h"
until all of the hyperv files are moved out of staging?
It seems strange for files outside staging to have dependencies inside staging. I think that header file should be moved out first (or at the same time).
Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Haiyang Zhang
maintainerQuoted 12 lines
-----Original Message-----
From: Ben Hutchings [mailto:[email protected]]
Sent: Thursday, June 09, 2011 6:49 PM
To: Joe Perches
Cc: Greg KH; Haiyang Zhang; Hank Janssen; KY Srinivasan; [email protected]; [email protected]
Subject: Re: Request for review on Hyper-V virtual network driverOn Thu, 2011-06-09 at 15:28 -0700, Joe Perches wrote:
[...]Quoted 2 lines
It's odd and a bit ugly to use #include "
../../staging/hyperv.h"
Quoted 7 lines
Quoted 3 lines
Maybe add another include path to the
Makefileand just use #include "hyperv.h"
until all of the hyperv files are moved out of staging?It seems strange for files outside staging to have dependencies inside staging. I think that header file should be moved out first (or at the same time).
I will request move out hyperv.h first. Actually, we already have some header files moved out of staging before.
Thanks,
- Haiyang
Quoted 11 lines · Ben Hutchings
On Thu, 2011-06-09 at 15:28 -0700, Joe Perches wrote:
[...]Quoted 5 lines
It's odd and a bit ugly to use #include "
../../staging/hyperv.h"Maybe add another include path to the
Makefileand just use #include "hyperv.h"
until all of the hyperv files are moved out of staging?It seems strange for files outside staging to have dependencies inside staging. I think that header file should be moved out first (or at the same time).
The hyperv core hasn't moved out yet, as there is other work happening there first. I think Haiyang wanted to find out what was left to do on the network driver side first while others work on the core issues.
So you can safely ignore that include for now, it's not a big deal, this isn't ready to be merged yet, that's what the review is for :)
thanks,
greg k-h
Quoted 44 lines · On Thu, 9 Jun 2011 14:27:45 -0700 Haiyang Zhang wrote:
To network maintainers,
Over the last several months we have addressed all the known issues in our Hyper-V virtual network driver. We are very keen on getting this driver out of the staging area. To that end, we would like to request you to review this code.
Thanks,
HaiyangSigned-off-by Haiyang Zhang <[email protected]>--- drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/hyperv/Kconfig | 10 + drivers/net/hyperv/Makefile | 4 + drivers/net/hyperv/hyperv_net.h | 1057 +++++++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc.c | 1014 +++++++++++++++++++++++++++++++++++ drivers/net/hyperv/netvsc_drv.c | 473 +++++++++++++++++ drivers/net/hyperv/rndis_filter.c | 830 +++++++++++++++++++++++++++++ drivers/staging/hv/Kconfig | 7 - drivers/staging/hv/Makefile | 2 - drivers/staging/hv/hyperv_net.h | 1057 ------------------------------------- drivers/staging/hv/netvsc.c | 1015 ----------------------------------- drivers/staging/hv/netvsc_drv.c | 474 ----------------- drivers/staging/hv/rndis_filter.c | 831 ----------------------------- 14 files changed, 3391 insertions(+), 3386 deletions(-) create mode 100644 drivers/net/hyperv/Kconfig create mode 100644 drivers/net/hyperv/Makefile create mode 100644 drivers/net/hyperv/hyperv_net.h create mode 100644 drivers/net/hyperv/netvsc.c create mode 100644 drivers/net/hyperv/netvsc_drv.c create mode 100644 drivers/net/hyperv/rndis_filter.c delete mode 100644 drivers/staging/hv/hyperv_net.h delete mode 100644 drivers/staging/hv/netvsc.c delete mode 100644 drivers/staging/hv/netvsc_drv.c delete mode 100644 drivers/staging/hv/rndis_filter.cdrivers/net/hyperv/Kconfig new file +0
-0
drivers/net/hyperv/Kconfig line 5
Quoted 5 lines
drivers/net/hyperv/Kconfig new file +5
-0@@ -0,0 +1,10 @@ +if HYPERV + +config HYPERV_NET + tristate "Microsoft Hyper-V virtual network driver" + depends on NET
Drop line above -- it's no longer needed since drivers/net/Kconfig handles that.
drivers/net/hyperv/Kconfig line 10
Quoted 5 lines
drivers/net/hyperv/Kconfig new file +5
-0+ default HYPERV + help + Select this option to enable the Hyper-V virtual network driver. + +endif
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Haiyang Zhang
maintainerQuoted 11 lines
-----Original Message-----
From: Randy Dunlap [mailto:[email protected]]
Sent: Thursday, June 09, 2011 5:57 PMdrivers/net/hyperv/Kconfig line 5
Quoted 3 lines
drivers/net/hyperv/Kconfig new file +3
-0+config HYPERV_NET + tristate "Microsoft Hyper-V virtual network driver" + depends on NETDrop line above -- it's no longer needed since
drivers/net/Kconfighandles that.
Will do.
Thanks,
- Haiyang