netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX
@ 2011-03-09 20:34 Roopa Prabhu
  2011-03-09 20:49 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Roopa Prabhu @ 2011-03-09 20:34 UTC (permalink / raw)
  To: davem; +Cc: netdev

From: Roopa Prabhu <roprabhu@cisco.com>

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

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
---
 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,


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX
  2011-03-09 20:34 [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX Roopa Prabhu
@ 2011-03-09 20:49 ` David Miller
  2011-03-10  2:16   ` roprabhu
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2011-03-09 20:49 UTC (permalink / raw)
  To: roprabhu; +Cc: netdev

From: Roopa Prabhu <roprabhu@cisco.com>
Date: Wed, 09 Mar 2011 12:34:31 -0800

> From: Roopa Prabhu <roprabhu@cisco.com>
> 
> This patch adds __PORT_REQUEST_MAX to port request enumeration. And defines
> PORT_REQUEST_MAX.
> 
> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
> Signed-off-by: David Wang <dwang2@cisco.com>
> Signed-off-by: Christian Benvenuti <benve@cisco.com>

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX
  2011-03-09 20:49 ` David Miller
@ 2011-03-10  2:16   ` roprabhu
  0 siblings, 0 replies; 3+ messages in thread
From: roprabhu @ 2011-03-10  2:16 UTC (permalink / raw)
  To: David Miller; +Cc: netdev




On 3/9/11 12:49 PM, "David Miller" <davem@davemloft.net> wrote:

> From: Roopa Prabhu <roprabhu@cisco.com>
> Date: Wed, 09 Mar 2011 12:34:31 -0800
> 
>> From: Roopa Prabhu <roprabhu@cisco.com>
>> 
>> This patch adds __PORT_REQUEST_MAX to port request enumeration. And defines
>> PORT_REQUEST_MAX.
>> 
>> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
>> Signed-off-by: David Wang <dwang2@cisco.com>
>> Signed-off-by: Christian Benvenuti <benve@cisco.com>
> 
> 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. 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-10  2:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 20:34 [net-next-2.6 PATCH] if_link: Add PORT_REQUEST_MAX Roopa Prabhu
2011-03-09 20:49 ` David Miller
2011-03-10  2:16   ` roprabhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).