Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325898 > unrolled thread

[PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM and NETIF_F_TSO6 for netvsc

Started bySimon Xiao <sixiao@microsoft.com>
First post2016-02-03 21:00 +0100
Last post2016-02-03 21:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM and NETIF_F_TSO6 for netvsc Simon Xiao <sixiao@microsoft.com> - 2016-02-03 21:00 +0100
    Re: [PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM  and NETIF_F_TSO6 for netvsc Tom Herbert <tom@herbertland.com> - 2016-02-03 21:10 +0100

#1325898 — [PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM and NETIF_F_TSO6 for netvsc

FromSimon Xiao <sixiao@microsoft.com>
Date2016-02-03 21:00 +0100
Subject[PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM and NETIF_F_TSO6 for netvsc
Message-ID<qYbKO-6ij-7@gated-at.bofh.it>
1. Adding NETIF_F_IPV6_CSUM and NETIF_F_TSO6 feature flags which are
supported by Hyper-V platform.
2. Cleanup the coding style of flag assignment by using macro.

Signed-off-by: Simon Xiao <sixiao@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
---
 drivers/net/hyperv/netvsc_drv.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 1d3a665..0cde741 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -43,6 +43,12 @@
 
 #define RING_SIZE_MIN 64
 #define LINKCHANGE_INT (2 * HZ)
+#define NETVSC_HW_FEATURES	(NETIF_F_RXCSUM | \
+				 NETIF_F_SG | \
+				 NETIF_F_TSO | \
+				 NETIF_F_TSO6 | \
+				 NETIF_F_IP_CSUM | \
+				 NETIF_F_IPV6_CSUM)
 static int ring_size = 128;
 module_param(ring_size, int, S_IRUGO);
 MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");
@@ -1081,10 +1087,8 @@ static int netvsc_probe(struct hv_device *dev,
 
 	net->netdev_ops = &device_ops;
 
-	net->hw_features = NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_IP_CSUM |
-				NETIF_F_TSO;
-	net->features = NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_SG | NETIF_F_RXCSUM |
-			NETIF_F_IP_CSUM | NETIF_F_TSO;
+	net->hw_features = NETVSC_HW_FEATURES;
+	net->features = NETVSC_HW_FEATURES | NETIF_F_HW_VLAN_CTAG_TX;
 
 	net->ethtool_ops = &ethtool_ops;
 	SET_NETDEV_DEV(net, &dev->device);
-- 
2.5.0

[toc] | [next] | [standalone]


#1325903 — Re: [PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM and NETIF_F_TSO6 for netvsc

FromTom Herbert <tom@herbertland.com>
Date2016-02-03 21:10 +0100
SubjectRe: [PATCH net-next] hv_netvsc: Add feature flags NETIF_F_IPV6_CSUM and NETIF_F_TSO6 for netvsc
Message-ID<qYbUt-6Aw-3@gated-at.bofh.it>
In reply to#1325898
On Wed, Feb 3, 2016 at 1:30 PM, Simon Xiao <sixiao@microsoft.com> wrote:
> 1. Adding NETIF_F_IPV6_CSUM and NETIF_F_TSO6 feature flags which are
> supported by Hyper-V platform.

NETIF_F_IPV6_CSUM and NETIF_F_IP_CSUM are being deprecated. Please
change to use NETIF_F_HW_CSUM (calling helper functions if need).

Thanks,
Tom

> 2. Cleanup the coding style of flag assignment by using macro.
>
> Signed-off-by: Simon Xiao <sixiao@microsoft.com>
> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
>  drivers/net/hyperv/netvsc_drv.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index 1d3a665..0cde741 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -43,6 +43,12 @@
>
>  #define RING_SIZE_MIN 64
>  #define LINKCHANGE_INT (2 * HZ)
> +#define NETVSC_HW_FEATURES     (NETIF_F_RXCSUM | \
> +                                NETIF_F_SG | \
> +                                NETIF_F_TSO | \
> +                                NETIF_F_TSO6 | \
> +                                NETIF_F_IP_CSUM | \
> +                                NETIF_F_IPV6_CSUM)
>  static int ring_size = 128;
>  module_param(ring_size, int, S_IRUGO);
>  MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");
> @@ -1081,10 +1087,8 @@ static int netvsc_probe(struct hv_device *dev,
>
>         net->netdev_ops = &device_ops;
>
> -       net->hw_features = NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_IP_CSUM |
> -                               NETIF_F_TSO;
> -       net->features = NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_SG | NETIF_F_RXCSUM |
> -                       NETIF_F_IP_CSUM | NETIF_F_TSO;
> +       net->hw_features = NETVSC_HW_FEATURES;
> +       net->features = NETVSC_HW_FEATURES | NETIF_F_HW_VLAN_CTAG_TX;
>
>         net->ethtool_ops = &ethtool_ops;
>         SET_NETDEV_DEV(net, &dev->device);
> --
> 2.5.0
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web