[net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX

Subsystems: networking drivers, the rest

STALE5664d

3 messages, 2 authors, 2011-03-10 · open the first message on its own page

[net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX

From: Roopa Prabhu <hidden>
Date: 2011-03-09 20:34:32

From: Roopa Prabhu <redacted>

This patch adds __PORT_REQUEST_MAX to port request enumeration. And defines
PORT_REQUEST_MAX.

Signed-off-by: Roopa Prabhu <redacted>
Signed-off-by: David Wang <redacted>
Signed-off-by: Christian Benvenuti <redacted>
---
 include/linux/if_link.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index f4a2e6b..b37cc09 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -353,8 +353,11 @@ enum {
 	PORT_REQUEST_PREASSOCIATE_RR,
 	PORT_REQUEST_ASSOCIATE,
 	PORT_REQUEST_DISASSOCIATE,
+	__PORT_REQUEST_MAX,
 };
 
+#define PORT_REQUEST_MAX (__PORT_REQUEST_MAX - 1)
+
 enum {
 	PORT_VDP_RESPONSE_SUCCESS = 0,
 	PORT_VDP_RESPONSE_INVALID_FORMAT,

Re: [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX

From: David Miller <davem@davemloft.net>
Date: 2011-03-09 20:48:38

From: Roopa Prabhu <redacted>
Date: Wed, 09 Mar 2011 12:34:31 -0800
From: Roopa Prabhu <redacted>

This patch adds __PORT_REQUEST_MAX to port request enumeration. And defines
PORT_REQUEST_MAX.

Signed-off-by: Roopa Prabhu <redacted>
Signed-off-by: David Wang <redacted>
Signed-off-by: Christian Benvenuti <redacted>
Why?

If some new request types get added, this max value will increase and
we don't want that to happen for things exposed to userspace.

Userspace should really not depend upon how many requests there are.

Re: [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX

From: roprabhu <hidden>
Date: 2011-03-10 02:16:17



On 3/9/11 12:49 PM, "David Miller" [off-list ref] wrote:
From: Roopa Prabhu <redacted>
Date: Wed, 09 Mar 2011 12:34:31 -0800
quoted
From: Roopa Prabhu <redacted>

This patch adds __PORT_REQUEST_MAX to port request enumeration. And defines
PORT_REQUEST_MAX.

Signed-off-by: Roopa Prabhu <redacted>
Signed-off-by: David Wang <redacted>
Signed-off-by: Christian Benvenuti <redacted>
Why?

If some new request types get added, this max value will increase and
we don't want that to happen for things exposed to userspace.

Userspace should really not depend upon how many requests there are.
O ok. Did not know the reason why its was not there. Point taken. Pls
ignore. Thanks. 

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help