[ovs-dev] [netlink v4 46/52] datapath: Extend compatibility code for genl_register_mc_group().
Jesse Gross
jesse at nicira.com
Mon Jan 17 17:24:36 UTC 2011
On Wed, Jan 12, 2011 at 12:49 AM, Ben Pfaff <blp at nicira.com> wrote:
> diff --git a/datapath/linux-2.6/compat-2.6/genetlink.inc b/datapath/linux-2.6/compat-2.6/genetlink.inc
> new file mode 100644
> index 0000000..1a2edfc
> --- /dev/null
> +++ b/datapath/linux-2.6/compat-2.6/genetlink.inc
> @@ -0,0 +1,19 @@
> +#include <net/genetlink.h>
> +#include <linux/version.h>
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
> +int genl_register_mc_group(struct genl_family *family,
> + struct genl_multicast_group *grp)
> +{
> + /* This code runs single-threaded. */
I agree that this code is currently only used in single threaded
context but why just assert it? It seems simple to just define a
mutex to provide actual protection. Certainly the real version takes
genl_lock.
More information about the dev
mailing list