diff --git a/datapath/datapath.c b/datapath/datapath.c index 8a9e54f03..853bfb5af 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -71,16 +71,16 @@ static struct genl_family dp_datapath_genl_family; static const struct nla_policy flow_policy[]; -static struct genl_multicast_group ovs_dp_flow_multicast_group = { - .name = OVS_FLOW_MCGROUP +static const struct genl_multicast_group ovs_dp_flow_multicast_group = { + .name = OVS_FLOW_MCGROUP, }; -static struct genl_multicast_group ovs_dp_datapath_multicast_group = { - .name = OVS_DATAPATH_MCGROUP +static const struct genl_multicast_group ovs_dp_datapath_multicast_group = { + .name = OVS_DATAPATH_MCGROUP, }; -struct genl_multicast_group ovs_dp_vport_multicast_group = { - .name = OVS_VPORT_MCGROUP +const struct genl_multicast_group ovs_dp_vport_multicast_group = { + .name = OVS_VPORT_MCGROUP, }; /* Check if need to build a reply message. @@ -93,7 +93,8 @@ static bool ovs_must_notify(struct genl_family *family, struct genl_info *info, genl_has_listeners(family, genl_info_net(info), group); } -static void ovs_notify(struct genl_family *family, struct genl_multicast_group *grp, +static void ovs_notify(struct genl_family *family, + const struct genl_multicast_group *grp, struct sk_buff *skb, struct genl_info *info) { genl_notify(family, skb, info, GROUP_ID(grp), GFP_KERNEL); @@ -1442,7 +1443,7 @@ static const struct nla_policy flow_policy[OVS_FLOW_ATTR_MAX + 1] = { [OVS_FLOW_ATTR_UFID_FLAGS] = { .type = NLA_U32 }, }; -static struct genl_ops dp_flow_genl_ops[] = { +static const struct genl_ops dp_flow_genl_ops[] = { { .cmd = OVS_FLOW_CMD_NEW, #ifdef HAVE_GENL_VALIDATE_FLAGS .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, @@ -1846,7 +1847,7 @@ static const struct nla_policy datapath_policy[OVS_DP_ATTR_MAX + 1] = { [OVS_DP_ATTR_USER_FEATURES] = { .type = NLA_U32 }, }; -static struct genl_ops dp_datapath_genl_ops[] = { +static const struct genl_ops dp_datapath_genl_ops[] = { { .cmd = OVS_DP_CMD_NEW, #ifdef HAVE_GENL_VALIDATE_FLAGS .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, @@ -2303,7 +2304,7 @@ static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = { [OVS_VPORT_ATTR_NETNSID] = { .type = NLA_S32 }, }; -static struct genl_ops dp_vport_genl_ops[] = { +static const struct genl_ops dp_vport_genl_ops[] = { { .cmd = OVS_VPORT_CMD_NEW, #ifdef HAVE_GENL_VALIDATE_FLAGS .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, diff --git a/datapath/datapath.h b/datapath/datapath.h index ee7666215..3bffa1dcb 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -237,7 +237,7 @@ static inline struct datapath *get_dp(struct net *net, int dp_ifindex) extern struct notifier_block ovs_dp_device_notifier; extern struct genl_family dp_vport_genl_family; -extern struct genl_multicast_group ovs_dp_vport_multicast_group; +extern const struct genl_multicast_group ovs_dp_vport_multicast_group; void ovs_dp_process_packet(struct sk_buff *skb, struct sw_flow_key *key); void ovs_dp_detach_port(struct vport *);