From: Ben Pfaff Date: Wed, 17 Dec 2008 00:10:31 +0000 (-0800) Subject: Move DP_MAX into public header file. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec689bac1eb333cf88d14d00db861488a8cd54e4;p=openvswitch 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.) --- 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 */