[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150604085805.GA1454@pox.localdomain>
Date: Thu, 4 Jun 2015 10:58:05 +0200
From: Thomas Graf <tgraf@...g.ch>
To: Tom Herbert <tom@...bertland.com>
Cc: davem@...emloft.net, agartrell@...com, maheshb@...gle.com,
netdev@...r.kernel.org
Subject: Re: [RFC net-next 2/6] net: Identfier Locator Addressing module
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists