[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5102a3e2fdc14815a4c4df0ea3c3f763@BY2PR03MB299.namprd03.prod.outlook.com>
Date: Thu, 6 Mar 2014 21:00:39 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"jasowang@...hat.com" <jasowang@...hat.com>
Subject: RE: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum
offload
> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Friday, March 7, 2014 2:19 AM
> To: KY Srinivasan
> Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> jasowang@...hat.com
> Subject: Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum
> offload
>
> From: KY Srinivasan <kys@...rosoft.com>
> Date: Thu, 6 Mar 2014 20:29:13 +0000
>
> >
> >
> >> -----Original Message-----
> >> From: David Miller [mailto:davem@...emloft.net]
> >> Sent: Friday, March 7, 2014 1:04 AM
> >> To: KY Srinivasan
> >> Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> >> devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> >> jasowang@...hat.com
> >> Subject: Re: [PATCH 5/6] Drivers: net: hyperv: Enable send side
> >> checksum offload
> >>
> >> From: "K. Y. Srinivasan" <kys@...rosoft.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 0x00000001
> >> #define TRANSPORT_INFO_TCP 0x00000002
> >> #define TRANSPORT_INFO_UDP 0x00000004
> >>
> >> 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists