lkml.org 
[lkml]   [2014]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 5/6] Drivers: net: hyperv: Enable send side checksum offload
    From
    From: "K. Y. Srinivasan" <kys@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 0x00000001
    #define TRANSPORT_INFO_TCP 0x00000002
    #define TRANSPORT_INFO_UDP 0x00000004

    Then the only value you have to return by reference is trans_off.


    \
     
     \ /
      Last update: 2014-03-06 21:41    [W:6.384 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site