]> git.baikalelectronics.ru Git - kernel.git/commitdiff
genetlink: move to smaller ops wherever possible
authorJakub Kicinski <kuba@kernel.org>
Fri, 2 Oct 2020 21:49:54 +0000 (14:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Oct 2020 02:11:11 +0000 (19:11 -0700)
Bulk of the genetlink users can use smaller ops, move them.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
32 files changed:
drivers/block/nbd.c
drivers/net/gtp.c
drivers/net/ieee802154/mac802154_hwsim.c
drivers/net/macsec.c
drivers/net/team/team.c
drivers/net/wireless/mac80211_hwsim.c
drivers/target/target_core_user.c
drivers/thermal/thermal_netlink.c
fs/dlm/netlink.c
kernel/taskstats.c
net/batman-adv/netlink.c
net/core/devlink.c
net/core/drop_monitor.c
net/hsr/hsr_netlink.c
net/ieee802154/netlink.c
net/ipv4/fou.c
net/ipv4/tcp_metrics.c
net/l2tp/l2tp_netlink.c
net/mptcp/pm_netlink.c
net/ncsi/ncsi-netlink.c
net/netfilter/ipvs/ip_vs_ctl.c
net/netlabel/netlabel_calipso.c
net/netlabel/netlabel_cipso_v4.c
net/netlabel/netlabel_mgmt.c
net/netlabel/netlabel_unlabeled.c
net/openvswitch/conntrack.c
net/openvswitch/datapath.c
net/openvswitch/meter.c
net/psample/psample.c
net/tipc/netlink_compat.c
net/wimax/stack.c
net/wireless/nl80211.c

index edf8b632e3d27b4b907a52dd55e41e3a6b8a03ef..ab2bbe2208ef6819c6cb71fc8aca47d11c84f164 100644 (file)
@@ -2183,7 +2183,7 @@ out:
        return ret;
 }
 
-static const struct genl_ops nbd_connect_genl_ops[] = {
+static const struct genl_small_ops nbd_connect_genl_ops[] = {
        {
                .cmd    = NBD_CMD_CONNECT,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -2215,8 +2215,8 @@ static struct genl_family nbd_genl_family __ro_after_init = {
        .name           = NBD_GENL_FAMILY_NAME,
        .version        = NBD_GENL_VERSION,
        .module         = THIS_MODULE,
-       .ops            = nbd_connect_genl_ops,
-       .n_ops          = ARRAY_SIZE(nbd_connect_genl_ops),
+       .small_ops      = nbd_connect_genl_ops,
+       .n_small_ops    = ARRAY_SIZE(nbd_connect_genl_ops),
        .maxattr        = NBD_ATTR_MAX,
        .policy = nbd_attr_policy,
        .mcgrps         = nbd_mcast_grps,
index 611722eafed812a561825540c10cade4fe63c20e..c09fe18c6c52deae1bb28283756356d9a06e89d1 100644 (file)
@@ -1339,7 +1339,7 @@ static const struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = {
        [GTPA_O_TEI]            = { .type = NLA_U32, },
 };
 
-static const struct genl_ops gtp_genl_ops[] = {
+static const struct genl_small_ops gtp_genl_ops[] = {
        {
                .cmd = GTP_CMD_NEWPDP,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1369,8 +1369,8 @@ static struct genl_family gtp_genl_family __ro_after_init = {
        .policy = gtp_genl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = gtp_genl_ops,
-       .n_ops          = ARRAY_SIZE(gtp_genl_ops),
+       .small_ops      = gtp_genl_ops,
+       .n_small_ops    = ARRAY_SIZE(gtp_genl_ops),
        .mcgrps         = gtp_genl_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(gtp_genl_mcgrps),
 };
index c20e7ef18bc955984f58dd9f8cba38e1bedcb663..c0bf7d78276e42e2f2c995501fd0c22cbd960198 100644 (file)
@@ -583,7 +583,7 @@ static const struct nla_policy hwsim_genl_policy[MAC802154_HWSIM_ATTR_MAX + 1] =
 };
 
 /* Generic Netlink operations array */
-static const struct genl_ops hwsim_nl_ops[] = {
+static const struct genl_small_ops hwsim_nl_ops[] = {
        {
                .cmd = MAC802154_HWSIM_CMD_NEW_RADIO,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -628,8 +628,8 @@ static struct genl_family hwsim_genl_family __ro_after_init = {
        .maxattr = MAC802154_HWSIM_ATTR_MAX,
        .policy = hwsim_genl_policy,
        .module = THIS_MODULE,
-       .ops = hwsim_nl_ops,
-       .n_ops = ARRAY_SIZE(hwsim_nl_ops),
+       .small_ops = hwsim_nl_ops,
+       .n_small_ops = ARRAY_SIZE(hwsim_nl_ops),
        .mcgrps = hwsim_mcgrps,
        .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
 };
index 124045cbcda338e3f9386a4d1df3334ab6d84881..3f4d8c6625dee7abefd0e12c6f747670e7432de0 100644 (file)
@@ -3285,7 +3285,7 @@ done:
        return skb->len;
 }
 
-static const struct genl_ops macsec_genl_ops[] = {
+static const struct genl_small_ops macsec_genl_ops[] = {
        {
                .cmd = MACSEC_CMD_GET_TXSC,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -3361,8 +3361,8 @@ static struct genl_family macsec_fam __ro_after_init = {
        .policy = macsec_genl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = macsec_genl_ops,
-       .n_ops          = ARRAY_SIZE(macsec_genl_ops),
+       .small_ops      = macsec_genl_ops,
+       .n_small_ops    = ARRAY_SIZE(macsec_genl_ops),
 };
 
 static netdev_tx_t macsec_start_xmit(struct sk_buff *skb,
index 8c1e02752ff61f8752df7b435ced4ef376dbe682..a0c8c2fe6c3ec7f4dd2f72f9cb7a05c93fd73bbf 100644 (file)
@@ -2795,7 +2795,7 @@ static int team_nl_cmd_port_list_get(struct sk_buff *skb,
        return err;
 }
 
-static const struct genl_ops team_nl_ops[] = {
+static const struct genl_small_ops team_nl_ops[] = {
        {
                .cmd = TEAM_CMD_NOOP,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -2832,8 +2832,8 @@ static struct genl_family team_nl_family __ro_after_init = {
        .policy = team_nl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = team_nl_ops,
-       .n_ops          = ARRAY_SIZE(team_nl_ops),
+       .small_ops      = team_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(team_nl_ops),
        .mcgrps         = team_nl_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(team_nl_mcgrps),
 };
index f8d15abd079bd4e7277320701293416ba6de9097..3b3fc7c9c91dc1b0f391d5fac0f74f8c691fd8a7 100644 (file)
@@ -3964,7 +3964,7 @@ done:
 }
 
 /* Generic Netlink operations array */
-static const struct genl_ops hwsim_ops[] = {
+static const struct genl_small_ops hwsim_ops[] = {
        {
                .cmd = HWSIM_CMD_REGISTER,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -4008,8 +4008,8 @@ static struct genl_family hwsim_genl_family __ro_after_init = {
        .policy = hwsim_genl_policy,
        .netnsok = true,
        .module = THIS_MODULE,
-       .ops = hwsim_ops,
-       .n_ops = ARRAY_SIZE(hwsim_ops),
+       .small_ops = hwsim_ops,
+       .n_small_ops = ARRAY_SIZE(hwsim_ops),
        .mcgrps = hwsim_mcgrps,
        .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
 };
index 9b75923505020534a878aa32fc3eafc034ac7776..1a060a2c98d67008f253ff6a51bad89def211aec 100644 (file)
@@ -436,7 +436,7 @@ static int tcmu_genl_set_features(struct sk_buff *skb, struct genl_info *info)
        return 0;
 }
 
-static const struct genl_ops tcmu_genl_ops[] = {
+static const struct genl_small_ops tcmu_genl_ops[] = {
        {
                .cmd    = TCMU_CMD_SET_FEATURES,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -474,8 +474,8 @@ static struct genl_family tcmu_genl_family __ro_after_init = {
        .mcgrps = tcmu_mcgrps,
        .n_mcgrps = ARRAY_SIZE(tcmu_mcgrps),
        .netnsok = true,
-       .ops = tcmu_genl_ops,
-       .n_ops = ARRAY_SIZE(tcmu_genl_ops),
+       .small_ops = tcmu_genl_ops,
+       .n_small_ops = ARRAY_SIZE(tcmu_genl_ops),
 };
 
 #define tcmu_cmd_set_dbi_cur(cmd, index) ((cmd)->dbi_cur = (index))
index e9999d5dfdd52d31c5d407080e76b3d5875ae3d4..da2891fcac891489f06bcfd2044d23492733a543 100644 (file)
@@ -601,7 +601,7 @@ out_free_msg:
        return ret;
 }
 
-static const struct genl_ops thermal_genl_ops[] = {
+static const struct genl_small_ops thermal_genl_ops[] = {
        {
                .cmd = THERMAL_GENL_CMD_TZ_GET_ID,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -635,8 +635,8 @@ static struct genl_family thermal_gnl_family __ro_after_init = {
        .version        = THERMAL_GENL_VERSION,
        .maxattr        = THERMAL_GENL_ATTR_MAX,
        .policy         = thermal_genl_policy,
-       .ops            = thermal_genl_ops,
-       .n_ops          = ARRAY_SIZE(thermal_genl_ops),
+       .small_ops      = thermal_genl_ops,
+       .n_small_ops    = ARRAY_SIZE(thermal_genl_ops),
        .mcgrps         = thermal_genl_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(thermal_genl_mcgrps),
 };
index e338c407cb75ccdfb786eaab8ae8a56f1b8e699a..67f68d48d60ceaa470d1154deb43f2991511fc8c 100644 (file)
@@ -62,7 +62,7 @@ static int user_cmd(struct sk_buff *skb, struct genl_info *info)
        return 0;
 }
 
-static const struct genl_ops dlm_nl_ops[] = {
+static const struct genl_small_ops dlm_nl_ops[] = {
        {
                .cmd    = DLM_CMD_HELLO,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -73,8 +73,8 @@ static const struct genl_ops dlm_nl_ops[] = {
 static struct genl_family family __ro_after_init = {
        .name           = DLM_GENL_NAME,
        .version        = DLM_GENL_VERSION,
-       .ops            = dlm_nl_ops,
-       .n_ops          = ARRAY_SIZE(dlm_nl_ops),
+       .small_ops      = dlm_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(dlm_nl_ops),
        .module         = THIS_MODULE,
 };
 
index e2ac0e37c4ae7bac1b574e8b660a1203d01a75fd..ef4de29fbe8ac38f54c15a11d317735672458f1e 100644 (file)
@@ -644,7 +644,7 @@ err:
        nlmsg_free(rep_skb);
 }
 
-static const struct genl_ops taskstats_ops[] = {
+static const struct genl_small_ops taskstats_ops[] = {
        {
                .cmd            = TASKSTATS_CMD_GET,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -687,8 +687,8 @@ static struct genl_family family __ro_after_init = {
        .version        = TASKSTATS_GENL_VERSION,
        .maxattr        = TASKSTATS_CMD_ATTR_MAX,
        .module         = THIS_MODULE,
-       .ops            = taskstats_ops,
-       .n_ops          = ARRAY_SIZE(taskstats_ops),
+       .small_ops      = taskstats_ops,
+       .n_small_ops    = ARRAY_SIZE(taskstats_ops),
        .pre_doit       = taskstats_pre_doit,
 };
 
index dc193618a761c0b451e860ca83921007d286e09b..c7a55647b520e87d560bdcb29a644eef30f2855c 100644 (file)
@@ -1350,7 +1350,7 @@ static void batadv_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
        }
 }
 
-static const struct genl_ops batadv_netlink_ops[] = {
+static const struct genl_small_ops batadv_netlink_ops[] = {
        {
                .cmd = BATADV_CMD_GET_MESH,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1484,8 +1484,8 @@ struct genl_family batadv_netlink_family __ro_after_init = {
        .pre_doit = batadv_pre_doit,
        .post_doit = batadv_post_doit,
        .module = THIS_MODULE,
-       .ops = batadv_netlink_ops,
-       .n_ops = ARRAY_SIZE(batadv_netlink_ops),
+       .small_ops = batadv_netlink_ops,
+       .n_small_ops = ARRAY_SIZE(batadv_netlink_ops),
        .mcgrps = batadv_netlink_mcgrps,
        .n_mcgrps = ARRAY_SIZE(batadv_netlink_mcgrps),
 };
index 2a95f7f27a544da340f6d5c47f8743729348e50b..0f3c8b2ec0565f8cf09e0054b1aa0243dc1e2d8f 100644 (file)
@@ -7139,7 +7139,7 @@ static const struct nla_policy devlink_nl_policy[DEVLINK_ATTR_MAX + 1] = {
        [DEVLINK_ATTR_PORT_FUNCTION] = { .type = NLA_NESTED },
 };
 
-static const struct genl_ops devlink_nl_ops[] = {
+static const struct genl_small_ops devlink_nl_ops[] = {
        {
                .cmd = DEVLINK_CMD_GET,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -7464,8 +7464,8 @@ static struct genl_family devlink_nl_family __ro_after_init = {
        .pre_doit       = devlink_nl_pre_doit,
        .post_doit      = devlink_nl_post_doit,
        .module         = THIS_MODULE,
-       .ops            = devlink_nl_ops,
-       .n_ops          = ARRAY_SIZE(devlink_nl_ops),
+       .small_ops      = devlink_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(devlink_nl_ops),
        .mcgrps         = devlink_nl_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(devlink_nl_mcgrps),
 };
index a28b743489c55814d7cc667a0d62b6e0d117f91c..571f191c06d947440858e91f4ad3a52ec9630538 100644 (file)
@@ -1575,7 +1575,7 @@ static const struct nla_policy net_dm_nl_policy[NET_DM_ATTR_MAX + 1] = {
        [NET_DM_ATTR_HW_DROPS]  = {. type = NLA_FLAG },
 };
 
-static const struct genl_ops dropmon_ops[] = {
+static const struct genl_small_ops dropmon_ops[] = {
        {
                .cmd = NET_DM_CMD_CONFIG,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1625,8 +1625,8 @@ static struct genl_family net_drop_monitor_family __ro_after_init = {
        .pre_doit       = net_dm_nl_pre_doit,
        .post_doit      = net_dm_nl_post_doit,
        .module         = THIS_MODULE,
-       .ops            = dropmon_ops,
-       .n_ops          = ARRAY_SIZE(dropmon_ops),
+       .small_ops      = dropmon_ops,
+       .n_small_ops    = ARRAY_SIZE(dropmon_ops),
        .mcgrps         = dropmon_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(dropmon_mcgrps),
 };
index 0e4681cf71db84aae57347d9282ea05979aed413..f3c8f91dbe2c1687b7960ed20b20fffc48b48e62 100644 (file)
@@ -493,7 +493,7 @@ fail:
        return res;
 }
 
-static const struct genl_ops hsr_ops[] = {
+static const struct genl_small_ops hsr_ops[] = {
        {
                .cmd = HSR_C_GET_NODE_STATUS,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -518,8 +518,8 @@ static struct genl_family hsr_genl_family __ro_after_init = {
        .policy = hsr_genl_policy,
        .netnsok = true,
        .module = THIS_MODULE,
-       .ops = hsr_ops,
-       .n_ops = ARRAY_SIZE(hsr_ops),
+       .small_ops = hsr_ops,
+       .n_small_ops = ARRAY_SIZE(hsr_ops),
        .mcgrps = hsr_mcgrps,
        .n_mcgrps = ARRAY_SIZE(hsr_mcgrps),
 };
index 7fe3b6b6c4959ca7687024d8d0e988f3daf0f03e..b07abc38b4b3d6a73b7a6968aa2d6fc5f7f1f293 100644 (file)
@@ -81,7 +81,7 @@ int ieee802154_nl_reply(struct sk_buff *msg, struct genl_info *info)
        return genlmsg_reply(msg, info);
 }
 
-static const struct genl_ops ieee802154_ops[] = {
+static const struct genl_small_ops ieee802154_ops[] = {
        /* see nl-phy.c */
        IEEE802154_DUMP(IEEE802154_LIST_PHY, ieee802154_list_phy,
                        ieee802154_dump_phy),
@@ -130,8 +130,8 @@ struct genl_family nl802154_family __ro_after_init = {
        .maxattr        = IEEE802154_ATTR_MAX,
        .policy         = ieee802154_policy,
        .module         = THIS_MODULE,
-       .ops            = ieee802154_ops,
-       .n_ops          = ARRAY_SIZE(ieee802154_ops),
+       .small_ops      = ieee802154_ops,
+       .n_small_ops    = ARRAY_SIZE(ieee802154_ops),
        .mcgrps         = ieee802154_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(ieee802154_mcgrps),
 };
index 5308cfa3de626e614f924cbbb65a75fc3c7aa9d5..e5f69b0bf3df551e28344ddd1c5068069c823cd1 100644 (file)
@@ -911,7 +911,7 @@ static int fou_nl_dump(struct sk_buff *skb, struct netlink_callback *cb)
        return skb->len;
 }
 
-static const struct genl_ops fou_nl_ops[] = {
+static const struct genl_small_ops fou_nl_ops[] = {
        {
                .cmd = FOU_CMD_ADD,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -940,8 +940,8 @@ static struct genl_family fou_nl_family __ro_after_init = {
        .policy = fou_nl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = fou_nl_ops,
-       .n_ops          = ARRAY_SIZE(fou_nl_ops),
+       .small_ops      = fou_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(fou_nl_ops),
 };
 
 size_t fou_encap_hlen(struct ip_tunnel_encap *e)
index 279db8822439dadf8582eda047478429183652ed..6b27c481fe18b47e064e3a65eefc2e1eb0040fe2 100644 (file)
@@ -943,7 +943,7 @@ static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info)
        return 0;
 }
 
-static const struct genl_ops tcp_metrics_nl_ops[] = {
+static const struct genl_small_ops tcp_metrics_nl_ops[] = {
        {
                .cmd = TCP_METRICS_CMD_GET,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -966,8 +966,8 @@ static struct genl_family tcp_metrics_nl_family __ro_after_init = {
        .policy = tcp_metrics_nl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = tcp_metrics_nl_ops,
-       .n_ops          = ARRAY_SIZE(tcp_metrics_nl_ops),
+       .small_ops      = tcp_metrics_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(tcp_metrics_nl_ops),
 };
 
 static unsigned int tcpmhash_entries;
index 5ca5056e9636453c0514ba68a805f4fcc60cc3d9..83956c9ee1fcc7b17ed33239d6c8df53ba4598fd 100644 (file)
@@ -914,7 +914,7 @@ static const struct nla_policy l2tp_nl_policy[L2TP_ATTR_MAX + 1] = {
        },
 };
 
-static const struct genl_ops l2tp_nl_ops[] = {
+static const struct genl_small_ops l2tp_nl_ops[] = {
        {
                .cmd = L2TP_CMD_NOOP,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -981,8 +981,8 @@ static struct genl_family l2tp_nl_family __ro_after_init = {
        .policy = l2tp_nl_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = l2tp_nl_ops,
-       .n_ops          = ARRAY_SIZE(l2tp_nl_ops),
+       .small_ops      = l2tp_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(l2tp_nl_ops),
        .mcgrps         = l2tp_multicast_group,
        .n_mcgrps       = ARRAY_SIZE(l2tp_multicast_group),
 };
index 5a0e4d11bcc32e5bd3a18579547a93d21d846f7a..9f9cd41b7733ee92a6405fcaf1890204e5f181c2 100644 (file)
@@ -1054,7 +1054,7 @@ fail:
        return -EMSGSIZE;
 }
 
-static struct genl_ops mptcp_pm_ops[] = {
+static struct genl_small_ops mptcp_pm_ops[] = {
        {
                .cmd    = MPTCP_PM_CMD_ADD_ADDR,
                .doit   = mptcp_nl_cmd_add_addr,
@@ -1093,8 +1093,8 @@ static struct genl_family mptcp_genl_family __ro_after_init = {
        .policy         = mptcp_pm_policy,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = mptcp_pm_ops,
-       .n_ops          = ARRAY_SIZE(mptcp_pm_ops),
+       .small_ops      = mptcp_pm_ops,
+       .n_small_ops    = ARRAY_SIZE(mptcp_pm_ops),
        .mcgrps         = mptcp_pm_mcgrps,
        .n_mcgrps       = ARRAY_SIZE(mptcp_pm_mcgrps),
 };
index 8b386d766e7d330256c0e1c7f93ba840d0ad9049..adddc7707aa4cc80545db81a77de156cdc62440c 100644 (file)
@@ -716,7 +716,7 @@ static int ncsi_set_channel_mask_nl(struct sk_buff *msg,
        return 0;
 }
 
-static const struct genl_ops ncsi_ops[] = {
+static const struct genl_small_ops ncsi_ops[] = {
        {
                .cmd = NCSI_CMD_PKG_INFO,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -762,8 +762,8 @@ static struct genl_family ncsi_genl_family __ro_after_init = {
        .maxattr = NCSI_ATTR_MAX,
        .policy = ncsi_genl_policy,
        .module = THIS_MODULE,
-       .ops = ncsi_ops,
-       .n_ops = ARRAY_SIZE(ncsi_ops),
+       .small_ops = ncsi_ops,
+       .n_small_ops = ARRAY_SIZE(ncsi_ops),
 };
 
 int ncsi_init_netlink(struct net_device *dev)
index 8dbfd84322a8897057a4e0221d14376dfebe164d..e279ded4e3065a2618a3973e5923480ae09d1e3b 100644 (file)
@@ -3893,7 +3893,7 @@ out:
 }
 
 
-static const struct genl_ops ip_vs_genl_ops[] = {
+static const struct genl_small_ops ip_vs_genl_ops[] = {
        {
                .cmd    = IPVS_CMD_NEW_SERVICE,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -4001,8 +4001,8 @@ static struct genl_family ip_vs_genl_family __ro_after_init = {
        .policy = ip_vs_cmd_policy,
        .netnsok        = true,         /* Make ipvsadm to work on netns */
        .module         = THIS_MODULE,
-       .ops            = ip_vs_genl_ops,
-       .n_ops          = ARRAY_SIZE(ip_vs_genl_ops),
+       .small_ops      = ip_vs_genl_ops,
+       .n_small_ops    = ARRAY_SIZE(ip_vs_genl_ops),
 };
 
 static int __init ip_vs_genl_register(void)
index 1a98247ab148166a578ed4e884eb2a2d53438ebf..4e62f2ad35757f98fbda2f90a8a9672875b16f0f 100644 (file)
@@ -304,7 +304,7 @@ static int netlbl_calipso_remove(struct sk_buff *skb, struct genl_info *info)
 /* NetLabel Generic NETLINK Command Definitions
  */
 
-static const struct genl_ops netlbl_calipso_ops[] = {
+static const struct genl_small_ops netlbl_calipso_ops[] = {
        {
        .cmd = NLBL_CALIPSO_C_ADD,
        .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -342,8 +342,8 @@ static struct genl_family netlbl_calipso_gnl_family __ro_after_init = {
        .maxattr = NLBL_CALIPSO_A_MAX,
        .policy = calipso_genl_policy,
        .module = THIS_MODULE,
-       .ops = netlbl_calipso_ops,
-       .n_ops = ARRAY_SIZE(netlbl_calipso_ops),
+       .small_ops = netlbl_calipso_ops,
+       .n_small_ops = ARRAY_SIZE(netlbl_calipso_ops),
 };
 
 /* NetLabel Generic NETLINK Protocol Functions
index 0f16080b87cb9d608a4448ca01638f1a64c6fcfa..726dda95934c660b051fdbd618825080320e3775 100644 (file)
@@ -724,7 +724,7 @@ static int netlbl_cipsov4_remove(struct sk_buff *skb, struct genl_info *info)
  * NetLabel Generic NETLINK Command Definitions
  */
 
-static const struct genl_ops netlbl_cipsov4_ops[] = {
+static const struct genl_small_ops netlbl_cipsov4_ops[] = {
        {
        .cmd = NLBL_CIPSOV4_C_ADD,
        .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -762,8 +762,8 @@ static struct genl_family netlbl_cipsov4_gnl_family __ro_after_init = {
        .maxattr = NLBL_CIPSOV4_A_MAX,
        .policy = netlbl_cipsov4_genl_policy,
        .module = THIS_MODULE,
-       .ops = netlbl_cipsov4_ops,
-       .n_ops = ARRAY_SIZE(netlbl_cipsov4_ops),
+       .small_ops = netlbl_cipsov4_ops,
+       .n_small_ops = ARRAY_SIZE(netlbl_cipsov4_ops),
 };
 
 /*
index e7a25fbfaf8b485d9e276542c477a88479a1061c..eb1d66d20afbbfcf834db5a7f38f9b2f9be54a1f 100644 (file)
@@ -757,7 +757,7 @@ version_failure:
  * NetLabel Generic NETLINK Command Definitions
  */
 
-static const struct genl_ops netlbl_mgmt_genl_ops[] = {
+static const struct genl_small_ops netlbl_mgmt_genl_ops[] = {
        {
        .cmd = NLBL_MGMT_C_ADD,
        .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -823,8 +823,8 @@ static struct genl_family netlbl_mgmt_gnl_family __ro_after_init = {
        .maxattr = NLBL_MGMT_A_MAX,
        .policy = netlbl_mgmt_genl_policy,
        .module = THIS_MODULE,
-       .ops = netlbl_mgmt_genl_ops,
-       .n_ops = ARRAY_SIZE(netlbl_mgmt_genl_ops),
+       .small_ops = netlbl_mgmt_genl_ops,
+       .n_small_ops = ARRAY_SIZE(netlbl_mgmt_genl_ops),
 };
 
 /*
index 77bb1bb22c3bfced3a6302d4241f5a0cdbd5d069..2e8e3f7b21110e44732382d5d1af2f046ec7145d 100644 (file)
@@ -1301,7 +1301,7 @@ unlabel_staticlistdef_return:
  * NetLabel Generic NETLINK Command Definitions
  */
 
-static const struct genl_ops netlbl_unlabel_genl_ops[] = {
+static const struct genl_small_ops netlbl_unlabel_genl_ops[] = {
        {
        .cmd = NLBL_UNLABEL_C_STATICADD,
        .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1367,8 +1367,8 @@ static struct genl_family netlbl_unlabel_gnl_family __ro_after_init = {
        .maxattr = NLBL_UNLABEL_A_MAX,
        .policy = netlbl_unlabel_genl_policy,
        .module = THIS_MODULE,
-       .ops = netlbl_unlabel_genl_ops,
-       .n_ops = ARRAY_SIZE(netlbl_unlabel_genl_ops),
+       .small_ops = netlbl_unlabel_genl_ops,
+       .n_small_ops = ARRAY_SIZE(netlbl_unlabel_genl_ops),
 };
 
 /*
index e86b9601f5b1d88d62ea019ddeda47c046fe753e..18af10b7ef0e34c8d05d7c7046a3c6ce57c2ee25 100644 (file)
@@ -2231,7 +2231,7 @@ exit_err:
        return err;
 }
 
-static struct genl_ops ct_limit_genl_ops[] = {
+static struct genl_small_ops ct_limit_genl_ops[] = {
        { .cmd = OVS_CT_LIMIT_CMD_SET,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
@@ -2263,8 +2263,8 @@ struct genl_family dp_ct_limit_genl_family __ro_after_init = {
        .policy = ct_limit_policy,
        .netnsok = true,
        .parallel_ops = true,
-       .ops = ct_limit_genl_ops,
-       .n_ops = ARRAY_SIZE(ct_limit_genl_ops),
+       .small_ops = ct_limit_genl_ops,
+       .n_small_ops = ARRAY_SIZE(ct_limit_genl_ops),
        .mcgrps = &ovs_ct_limit_multicast_group,
        .n_mcgrps = 1,
        .module = THIS_MODULE,
index 00df39b736edea6523ed09009793db83be307daf..832f898edb6adc46aed452f2224be683427e6e8e 100644 (file)
@@ -652,7 +652,7 @@ static const struct nla_policy packet_policy[OVS_PACKET_ATTR_MAX + 1] = {
        [OVS_PACKET_ATTR_HASH] = { .type = NLA_U64 },
 };
 
-static const struct genl_ops dp_packet_genl_ops[] = {
+static const struct genl_small_ops dp_packet_genl_ops[] = {
        { .cmd = OVS_PACKET_CMD_EXECUTE,
          .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
          .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
@@ -668,8 +668,8 @@ static struct genl_family dp_packet_genl_family __ro_after_init = {
        .policy = packet_policy,
        .netnsok = true,
        .parallel_ops = true,
-       .ops = dp_packet_genl_ops,
-       .n_ops = ARRAY_SIZE(dp_packet_genl_ops),
+       .small_ops = dp_packet_genl_ops,
+       .n_small_ops = ARRAY_SIZE(dp_packet_genl_ops),
        .module = THIS_MODULE,
 };
 
@@ -1453,7 +1453,7 @@ static const struct nla_policy flow_policy[OVS_FLOW_ATTR_MAX + 1] = {
        [OVS_FLOW_ATTR_UFID_FLAGS] = { .type = NLA_U32 },
 };
 
-static const struct genl_ops dp_flow_genl_ops[] = {
+static const struct genl_small_ops dp_flow_genl_ops[] = {
        { .cmd = OVS_FLOW_CMD_NEW,
          .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
          .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
@@ -1485,8 +1485,8 @@ static struct genl_family dp_flow_genl_family __ro_after_init = {
        .policy = flow_policy,
        .netnsok = true,
        .parallel_ops = true,
-       .ops = dp_flow_genl_ops,
-       .n_ops = ARRAY_SIZE(dp_flow_genl_ops),
+       .small_ops = dp_flow_genl_ops,
+       .n_small_ops = ARRAY_SIZE(dp_flow_genl_ops),
        .mcgrps = &ovs_dp_flow_multicast_group,
        .n_mcgrps = 1,
        .module = THIS_MODULE,
@@ -1918,7 +1918,7 @@ static const struct nla_policy datapath_policy[OVS_DP_ATTR_MAX + 1] = {
                PCPU_MIN_UNIT_SIZE / sizeof(struct mask_cache_entry)),
 };
 
-static const struct genl_ops dp_datapath_genl_ops[] = {
+static const struct genl_small_ops dp_datapath_genl_ops[] = {
        { .cmd = OVS_DP_CMD_NEW,
          .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
          .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
@@ -1950,8 +1950,8 @@ static struct genl_family dp_datapath_genl_family __ro_after_init = {
        .policy = datapath_policy,
        .netnsok = true,
        .parallel_ops = true,
-       .ops = dp_datapath_genl_ops,
-       .n_ops = ARRAY_SIZE(dp_datapath_genl_ops),
+       .small_ops = dp_datapath_genl_ops,
+       .n_small_ops = ARRAY_SIZE(dp_datapath_genl_ops),
        .mcgrps = &ovs_dp_datapath_multicast_group,
        .n_mcgrps = 1,
        .module = THIS_MODULE,
@@ -2401,7 +2401,7 @@ static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = {
        [OVS_VPORT_ATTR_NETNSID] = { .type = NLA_S32 },
 };
 
-static const struct genl_ops dp_vport_genl_ops[] = {
+static const struct genl_small_ops dp_vport_genl_ops[] = {
        { .cmd = OVS_VPORT_CMD_NEW,
          .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
          .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
@@ -2433,8 +2433,8 @@ struct genl_family dp_vport_genl_family __ro_after_init = {
        .policy = vport_policy,
        .netnsok = true,
        .parallel_ops = true,
-       .ops = dp_vport_genl_ops,
-       .n_ops = ARRAY_SIZE(dp_vport_genl_ops),
+       .small_ops = dp_vport_genl_ops,
+       .n_small_ops = ARRAY_SIZE(dp_vport_genl_ops),
        .mcgrps = &ovs_dp_vport_multicast_group,
        .n_mcgrps = 1,
        .module = THIS_MODULE,
index 3d3d8e0945468193bf37ea81992fa98ae17f2f27..50541e874726dfe85cf3b05128ce24eba27774de 100644 (file)
@@ -672,7 +672,7 @@ bool ovs_meter_execute(struct datapath *dp, struct sk_buff *skb,
        return false;
 }
 
-static struct genl_ops dp_meter_genl_ops[] = {
+static struct genl_small_ops dp_meter_genl_ops[] = {
        { .cmd = OVS_METER_CMD_FEATURES,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                .flags = 0,               /* OK for unprivileged users. */
@@ -711,8 +711,8 @@ struct genl_family dp_meter_genl_family __ro_after_init = {
        .policy = meter_policy,
        .netnsok = true,
        .parallel_ops = true,
-       .ops = dp_meter_genl_ops,
-       .n_ops = ARRAY_SIZE(dp_meter_genl_ops),
+       .small_ops = dp_meter_genl_ops,
+       .n_small_ops = ARRAY_SIZE(dp_meter_genl_ops),
        .mcgrps = &ovs_meter_multicast_group,
        .n_mcgrps = 1,
        .module = THIS_MODULE,
index a042261a45c5cf8598eb46c763aad5bb5fe722b0..33e238c965bd89366a90a6f0ad82d183449595b6 100644 (file)
@@ -96,7 +96,7 @@ static int psample_nl_cmd_get_group_dumpit(struct sk_buff *msg,
        return msg->len;
 }
 
-static const struct genl_ops psample_nl_ops[] = {
+static const struct genl_small_ops psample_nl_ops[] = {
        {
                .cmd = PSAMPLE_CMD_GET_GROUP,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -112,8 +112,8 @@ static struct genl_family psample_nl_family __ro_after_init = {
        .netnsok        = true,
        .module         = THIS_MODULE,
        .mcgrps         = psample_nl_mcgrps,
-       .ops            = psample_nl_ops,
-       .n_ops          = ARRAY_SIZE(psample_nl_ops),
+       .small_ops      = psample_nl_ops,
+       .n_small_ops    = ARRAY_SIZE(psample_nl_ops),
        .n_mcgrps       = ARRAY_SIZE(psample_nl_mcgrps),
 };
 
index 90e3c70a91ad0757ad643a17f50b7e767c5a498b..1c7aa51cc2a3d33c7a57fe13232b1d02af53fefe 100644 (file)
@@ -1337,7 +1337,7 @@ send:
        return err;
 }
 
-static const struct genl_ops tipc_genl_compat_ops[] = {
+static const struct genl_small_ops tipc_genl_compat_ops[] = {
        {
                .cmd            = TIPC_GENL_CMD,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -1352,8 +1352,8 @@ static struct genl_family tipc_genl_compat_family __ro_after_init = {
        .maxattr        = 0,
        .netnsok        = true,
        .module         = THIS_MODULE,
-       .ops            = tipc_genl_compat_ops,
-       .n_ops          = ARRAY_SIZE(tipc_genl_compat_ops),
+       .small_ops      = tipc_genl_compat_ops,
+       .n_small_ops    = ARRAY_SIZE(tipc_genl_compat_ops),
 };
 
 int __init tipc_netlink_compat_start(void)
index 4b9b1c5e8f3a7ce7d2b1272f4ae86babf4b8927c..b6dd9d956ed8e5cc84855065f821ed7c427bf874 100644 (file)
@@ -401,7 +401,7 @@ static const struct nla_policy wimax_gnl_policy[WIMAX_GNL_ATTR_MAX + 1] = {
        },
 };
 
-static const struct genl_ops wimax_gnl_ops[] = {
+static const struct genl_small_ops wimax_gnl_ops[] = {
        {
                .cmd = WIMAX_GNL_OP_MSG_FROM_USER,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -560,8 +560,8 @@ struct genl_family wimax_gnl_family __ro_after_init = {
        .maxattr = WIMAX_GNL_ATTR_MAX,
        .policy = wimax_gnl_policy,
        .module = THIS_MODULE,
-       .ops = wimax_gnl_ops,
-       .n_ops = ARRAY_SIZE(wimax_gnl_ops),
+       .small_ops = wimax_gnl_ops,
+       .n_small_ops = ARRAY_SIZE(wimax_gnl_ops),
        .mcgrps = wimax_gnl_mcgrps,
        .n_mcgrps = ARRAY_SIZE(wimax_gnl_mcgrps),
 };
index 91d4550677d0293871b536ba20b9e4fcc5d063d1..59b4677cc587b1733374f2903c9ab71c4759b23a 100644 (file)
@@ -14665,6 +14665,9 @@ static const struct genl_ops nl80211_ops[] = {
                .internal_flags = NL80211_FLAG_NEED_WIPHY |
                                  NL80211_FLAG_NEED_RTNL,
        },
+};
+
+static const struct genl_small_ops nl80211_small_ops[] = {
        {
                .cmd = NL80211_CMD_SET_WIPHY,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -15526,6 +15529,8 @@ static struct genl_family nl80211_fam __ro_after_init = {
        .module = THIS_MODULE,
        .ops = nl80211_ops,
        .n_ops = ARRAY_SIZE(nl80211_ops),
+       .small_ops = nl80211_small_ops,
+       .n_small_ops = ARRAY_SIZE(nl80211_small_ops),
        .mcgrps = nl80211_mcgrps,
        .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
        .parallel_ops = true,