On 06/03/15 at 12:58pm, Tom Herbert wrote:
> +static struct genl_family ila_nl_family = {
> + .id = GENL_ID_GENERATE,
> + .hdrsize = 0,
> + .name = ILA_GENL_NAME,
> + .version = ILA_GENL_VERSION,
> + .maxattr = ILA_ATTR_MAX,
> + .netnsok = true,
> +};
Since you have bucket locks, you might want to see if you can
enable .parallel_ops = true to speed up the rate of map updates.
Use of rhashtable is another obvious consideration.
> +static int ila_nl_cmd_get_mapping(struct sk_buff *skb, struct genl_info
> *info)
> +{
> + struct net *net = genl_info_net(info);
> + struct ila_net *ilan = net_generic(net, ila_net_id);
> + struct sk_buff *msg;
> + struct ila_cfg cfg;
> + struct ila_map *ila;
> + int ret;
> +
> + ret = parse_nl_config(info, &cfg);
> + if (ret)
> + return ret;
> +
> + msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
> + if (!msg)
> + return -ENOMEM;
Since the message size is actually really small it might be worth
to calculate it accurately here to speed up the get.
> +#define ILA_HASH_TABLE_SIZE 1024
Already defined at the top.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html