[ovs-dev] [PATCH 2/3] datapath: Add support for 4.2 kernel.
Jesse Gross
jesse at nicira.com
Wed Sep 16 22:00:37 UTC 2015
On Tue, Sep 15, 2015 at 11:09 AM, Pravin B Shelar <pshelar at nicira.com> wrote:
> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
What about this commit?
openvswitch: allocate nr_node_ids flow_stats instead of num_possible_nodes
> diff --git a/datapath/linux/compat/socket.c b/datapath/linux/compat/socket.c
> new file mode 100644
> index 0000000..776f9e2
> --- /dev/null
> +++ b/datapath/linux/compat/socket.c
> +#ifndef HAVE_SOCK_CREATE_KERN_NET
> +int ovs_sock_create_kern(struct net *net, int family, int type, int protocol, struct socket **res)
> +{
> + int err;
> +
> + err = sock_create_kern(family, type, protocol, res);
> + if (err < 0)
> + return err;
> +
> + sk_change_net((*res)->sk, net);
> + return err;
> +}
> +
> +void ovs_sock_release(struct socket *sock)
> +{
> + sk_release_kernel(sock->sk);
> +}
> +#endif
Is there a reason we can't use a macro and then keep the original
name? I'm also not sure that we need to put this in a new .c file but
that's more just personal opinion.
More information about the dev
mailing list