diff mbox

[net-next-26,5/5] cxgb4vf: Mark "UDP [RSS Hash] Enable" as a 1-bit field.

Message ID 1289503844-18059-6-git-send-email-leedom@chelsio.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Casey Leedom Nov. 11, 2010, 7:30 p.m. UTC
Mark the UDP RSS Hash Enable field as 1-bit in length.  Also clean up
formatting from previous changeset which changed the RSS 1-bit fields from
"int" to "unsigned int".

Signed-off-by: Casey Leedom <leedom@chelsio.com>
---
 drivers/net/cxgb4vf/t4vf_common.h |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

Comments

David Miller Nov. 15, 2010, 5:20 p.m. UTC | #1
From: Casey Leedom <leedom@chelsio.com>
Date: Thu, 11 Nov 2010 11:30:44 -0800

> +		uint synmapen:1;	/* SYN Map Enable */

Please do not use the "uint" shorthand for "unsigned int", I know it's
in linux/types.h but that is there for sysv compatibility in
userspace and is ugly as hell.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Casey Leedom Nov. 15, 2010, 5:43 p.m. UTC | #2
| From: David Miller <davem@davemloft.net>
| Date: Monday, November 15, 2010 09:20 am
| 
| From: Casey Leedom <leedom@chelsio.com>
| Date: Thu, 11 Nov 2010 11:30:44 -0800
| 
| > +		uint synmapen:1;	/* SYN Map Enable */
| 
| Please do not use the "uint" shorthand for "unsigned int", I know it's
| in linux/types.h but that is there for sysv compatibility in
| userspace and is ugly as hell.

  Okay, sorry about that.  I wasn't sure so I looked around and saw several 
other network device drivers using "uint" and figured it was okay.  I assume 
that it's okay to use u32, etc?  I was just trying to be neet and solve the 
"greater than 80 column" restriction which the patch check script complains 
about for when a previous changeset converted "int" to "unsigned int".  Just let 
me know what the correct action is and I'll respin this one patch.  Thanks for 
your patience with my ignorance!

Casey
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/cxgb4vf/t4vf_common.h b/drivers/net/cxgb4vf/t4vf_common.h
index a65c80a..7541a60 100644
--- a/drivers/net/cxgb4vf/t4vf_common.h
+++ b/drivers/net/cxgb4vf/t4vf_common.h
@@ -132,15 +132,15 @@  struct rss_params {
 	unsigned int mode;		/* RSS mode */
 	union {
 	    struct {
-		unsigned int synmapen:1;	/* SYN Map Enable */
-		unsigned int syn4tupenipv6:1;	/* enable hashing 4-tuple IPv6 SYNs */
-		unsigned int syn2tupenipv6:1;	/* enable hashing 2-tuple IPv6 SYNs */
-		unsigned int syn4tupenipv4:1;	/* enable hashing 4-tuple IPv4 SYNs */
-		unsigned int syn2tupenipv4:1;	/* enable hashing 2-tuple IPv4 SYNs */
-		unsigned int ofdmapen:1;	/* Offload Map Enable */
-		unsigned int tnlmapen:1;	/* Tunnel Map Enable */
-		unsigned int tnlalllookup:1;	/* Tunnel All Lookup */
-		unsigned int hashtoeplitz:1;	/* use Toeplitz hash */
+		uint synmapen:1;	/* SYN Map Enable */
+		uint syn4tupenipv6:1;	/* enable hashing 4-tuple IPv6 SYNs */
+		uint syn2tupenipv6:1;	/* enable hashing 2-tuple IPv6 SYNs */
+		uint syn4tupenipv4:1;	/* enable hashing 4-tuple IPv4 SYNs */
+		uint syn2tupenipv4:1;	/* enable hashing 2-tuple IPv4 SYNs */
+		uint ofdmapen:1;	/* Offload Map Enable */
+		uint tnlmapen:1;	/* Tunnel Map Enable */
+		uint tnlalllookup:1;	/* Tunnel All Lookup */
+		uint hashtoeplitz:1;	/* use Toeplitz hash */
 	    } basicvirtual;
 	} u;
 };
@@ -151,11 +151,11 @@  struct rss_params {
 union rss_vi_config {
     struct {
 	u16 defaultq;			/* Ingress Queue ID for !tnlalllookup */
-	unsigned int ip6fourtupen:1;	/* hash 4-tuple IPv6 ingress packets */
-	unsigned int ip6twotupen:1;	/* hash 2-tuple IPv6 ingress packets */
-	unsigned int ip4fourtupen:1;	/* hash 4-tuple IPv4 ingress packets */
-	unsigned int ip4twotupen:1;	/* hash 2-tuple IPv4 ingress packets */
-	int udpen;			/* hash 4-tuple UDP ingress packets */
+	uint ip6fourtupen:1;		/* hash 4-tuple IPv6 ingress packets */
+	uint ip6twotupen:1;		/* hash 2-tuple IPv6 ingress packets */
+	uint ip4fourtupen:1;		/* hash 4-tuple IPv4 ingress packets */
+	uint ip4twotupen:1;		/* hash 2-tuple IPv4 ingress packets */
+	uint udpen:1;			/* hash 4-tuple UDP ingress packets */
     } basicvirtual;
 };