netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Tom Herbert <tom@herbertland.com>
Cc: davem@davemloft.net, agartrell@fb.com, maheshb@google.com,
	netdev@vger.kernel.org
Subject: Re: [RFC net-next 2/6] net: Identfier Locator Addressing module
Date: Thu, 4 Jun 2015 10:58:05 +0200	[thread overview]
Message-ID: <20150604085805.GA1454@pox.localdomain> (raw)
In-Reply-To: <1433361502-3478761-3-git-send-email-tom@herbertland.com>

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.

  reply	other threads:[~2015-06-04  8:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 19:58 [RFC net-next 0/6] net: Identifier Locator Addressing Tom Herbert
2015-06-03 19:58 ` [RFC net-next 1/6] net: Checksum functions to replace 8 bytes at a time Tom Herbert
2015-06-03 19:58 ` [RFC net-next 2/6] net: Identfier Locator Addressing module Tom Herbert
2015-06-04  8:58   ` Thomas Graf [this message]
2015-06-04 10:02   ` Hannes Frederic Sowa
2015-06-03 19:58 ` [RFC net-next 3/6] net: Special routing hook Tom Herbert
2015-06-04  7:40   ` Hannes Frederic Sowa
2015-06-03 19:58 ` [RFC net-next 4/6] net: ILA use special route hook Tom Herbert
2015-06-03 19:58 ` [RFC net-next 5/6] net: ILA iptables target Tom Herbert
2015-06-03 19:58 ` [RFC net-next 6/6] ipvlan: Call ILA in incoming and outgoing receive paths Tom Herbert
2015-06-04  8:58   ` Thomas Graf
2015-06-04  9:00 ` [RFC net-next 0/6] net: Identifier Locator Addressing Thomas Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150604085805.GA1454@pox.localdomain \
    --to=tgraf@suug.ch \
    --cc=agartrell@fb.com \
    --cc=davem@davemloft.net \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).