From ec689bac1eb333cf88d14d00db861488a8cd54e4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 16 Dec 2008 16:10:31 -0800 Subject: [PATCH] Move DP_MAX into public header file. vswitchd wants to know the maximum number of datapaths, so DP_MAX needs to be exported. (This is not an ideal situation. Really the kernel should not have an explicit limit on the number of datapaths, and userspace should be able to query the current maximum.) --- datapath/datapath.c | 3 --- include/openflow/openflow-netlink.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 6b7f6453..352baf39 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -76,9 +76,6 @@ MODULE_PARM(serial_num, "s"); static struct genl_family dp_genl_family; static struct genl_multicast_group mc_group; -/* It's hard to imagine wanting more than one datapath, but... */ -#define DP_MAX 32 - /* Datapaths. Protected on the read side by rcu_read_lock, on the write side * by dp_mutex. dp_mutex is almost completely redundant with genl_mutex * maintained by the Generic Netlink code, but the timeout path needs mutual diff --git a/include/openflow/openflow-netlink.h b/include/openflow/openflow-netlink.h index 895fad5c..23e26408 100644 --- a/include/openflow/openflow-netlink.h +++ b/include/openflow/openflow-netlink.h @@ -62,4 +62,7 @@ enum dp_genl_command { DP_GENL_C_MAX = __DP_GENL_C_MAX - 1 }; +/* Maximum number of datapaths. */ +#define DP_MAX 32 + #endif /* openflow/openflow-netlink.h */ -- 2.30.2