lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140306.143354.1296864763659469552.davem@davemloft.net>
Date:	Thu, 06 Mar 2014 14:33:54 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	kys@...rosoft.com
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists