Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum offload

2014-03-09 Thread Ben Hutchings
On Thu, 2014-03-06 at 03:13 -0800, K. Y. Srinivasan wrote:
[...]
 @@ -593,8 +658,9 @@ static int netvsc_probe(struct hv_device *dev,
   net-netdev_ops = device_ops;
  
   /* TODO: Add GSO and Checksum offload */
 - net-hw_features = NETIF_F_RXCSUM | NETIF_F_SG;
 - net-features = NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_SG | NETIF_F_RXCSUM;
 + net-hw_features = NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_IP_CSUM;
 + net-features = NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_SG | NETIF_F_RXCSUM |
 + NETIF_F_IP_CSUM;

Missing NETIF_F_IPV6_CSUM?

Ben.

   SET_ETHTOOL_OPS(net, ethtool_ops);
   SET_NETDEV_DEV(net, dev-device);

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.


signature.asc
Description: This is a digitally signed message part
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum offload

2014-03-06 Thread David Miller
From: K. Y. Srinivasan k...@microsoft.com
Date: Thu,  6 Mar 2014 03:13:09 -0800

 +bool get_net_transport_info(struct sk_buff *skb, bool *is_v4,
 + bool *is_tcp, bool *is_udp, u32 *trans_off)
 +{

Returning so many values like this is awkward, at best.

Why not return a well defined bitmask:

#define TRANSPORT_INFO_SUCCESS  0x0001
#define TRANSPORT_INFO_TCP  0x0002
#define TRANSPORT_INFO_UDP  0x0004

Then the only value you have to return by reference is trans_off.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum offload

2014-03-06 Thread KY Srinivasan


 -Original Message-
 From: David Miller [mailto:da...@davemloft.net]
 Sent: Friday, March 7, 2014 1:04 AM
 To: KY Srinivasan
 Cc: net...@vger.kernel.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com;
 jasow...@redhat.com
 Subject: Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum
 offload
 
 From: K. Y. Srinivasan k...@microsoft.com
 Date: Thu,  6 Mar 2014 03:13:09 -0800
 
  +bool get_net_transport_info(struct sk_buff *skb, bool *is_v4,
  +   bool *is_tcp, bool *is_udp, u32 *trans_off) {
 
 Returning so many values like this is awkward, at best.
 
 Why not return a well defined bitmask:
 
 #define TRANSPORT_INFO_SUCCESS0x0001
 #define TRANSPORT_INFO_TCP0x0002
 #define TRANSPORT_INFO_UDP0x0004
 
 Then the only value you have to return by reference is trans_off.

I also need information on the IP version as well. If it is ok with you, I will 
use the return
value to get information on the network protocol and return information on 
transport via
reference - protocol and the offset.
 
Regards,

K. Y
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum offload

2014-03-06 Thread David Miller
From: KY Srinivasan k...@microsoft.com
Date: Thu, 6 Mar 2014 20:29:13 +

 
 
 -Original Message-
 From: David Miller [mailto:da...@davemloft.net]
 Sent: Friday, March 7, 2014 1:04 AM
 To: KY Srinivasan
 Cc: net...@vger.kernel.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com;
 jasow...@redhat.com
 Subject: Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum
 offload
 
 From: K. Y. Srinivasan k...@microsoft.com
 Date: Thu,  6 Mar 2014 03:13:09 -0800
 
  +bool get_net_transport_info(struct sk_buff *skb, bool *is_v4,
  +  bool *is_tcp, bool *is_udp, u32 *trans_off) {
 
 Returning so many values like this is awkward, at best.
 
 Why not return a well defined bitmask:
 
 #define TRANSPORT_INFO_SUCCESS   0x0001
 #define TRANSPORT_INFO_TCP   0x0002
 #define TRANSPORT_INFO_UDP   0x0004
 
 Then the only value you have to return by reference is trans_off.
 
 I also need information on the IP version as well. If it is ok with you, I 
 will use the return
 value to get information on the network protocol and return information on 
 transport via
 reference - protocol and the offset.

Just add TRANSPORT_INFO_IPv4 as another bitmask in the return value.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum offload

2014-03-06 Thread KY Srinivasan


 -Original Message-
 From: David Miller [mailto:da...@davemloft.net]
 Sent: Friday, March 7, 2014 2:19 AM
 To: KY Srinivasan
 Cc: net...@vger.kernel.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com;
 jasow...@redhat.com
 Subject: Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum
 offload
 
 From: KY Srinivasan k...@microsoft.com
 Date: Thu, 6 Mar 2014 20:29:13 +
 
 
 
  -Original Message-
  From: David Miller [mailto:da...@davemloft.net]
  Sent: Friday, March 7, 2014 1:04 AM
  To: KY Srinivasan
  Cc: net...@vger.kernel.org; linux-ker...@vger.kernel.org;
  de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com;
  jasow...@redhat.com
  Subject: Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side
  checksum offload
 
  From: K. Y. Srinivasan k...@microsoft.com
  Date: Thu,  6 Mar 2014 03:13:09 -0800
 
   +bool get_net_transport_info(struct sk_buff *skb, bool *is_v4,
   +bool *is_tcp, bool *is_udp, u32 
   *trans_off) {
 
  Returning so many values like this is awkward, at best.
 
  Why not return a well defined bitmask:
 
  #define TRANSPORT_INFO_SUCCESS 0x0001
  #define TRANSPORT_INFO_TCP 0x0002
  #define TRANSPORT_INFO_UDP 0x0004
 
  Then the only value you have to return by reference is trans_off.
 
  I also need information on the IP version as well. If it is ok with
  you, I will use the return value to get information on the network
  protocol and return information on transport via reference - protocol and
 the offset.
 
 Just add TRANSPORT_INFO_IPv4 as another bitmask in the return value.

The network information is independent of the transport information - I can 
partition the
return value to encode all the possible network and transport combination and 
subsequently
parse the network and transport information. I will go ahead and code it up 
this way.

Regards,

K. Y

 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel