public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Chris Mi <chrism@mellanox.com>,
	netdev@vger.kernel.org, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, davem@davemloft.net,
	mawilcox@microsoft.com
Subject: Re: [patch net-next repost 1/3] idr: Use unsigned long instead of int
Date: Wed, 16 Aug 2017 13:06:12 +0200	[thread overview]
Message-ID: <20170816110612.GI1868@nanopsycho> (raw)
In-Reply-To: <1502881133.4936.104.camel@edumazet-glaptop3.roam.corp.google.com>

Wed, Aug 16, 2017 at 12:58:53PM CEST, eric.dumazet@gmail.com wrote:
>On Wed, 2017-08-16 at 12:53 +0200, Jiri Pirko wrote:
>
>> rhashtable is unnecesary big hammer for this. IDR is nice fit for
>> this purpose.
>
>Obviously IDR does not fit, since you have to change its ABI.

I don't think it is a problem to adjust something to your needs.
Moreover, if it's API is misdesigned from the beginning. We are just
putting IDR back on track, cleaning it's API. I don't see anything wrong
on that. Everyone would benefit.


>
>If rhashtable does not fit this, then I wonder why we spent so many days
>of work adding it in the kernel.

It fits, sure. But it is not needed (the big hammer I mentioned).
We don't need a custom key for lookup. Just a single pointer as a key
would do. And that is exactly why IDR is here for. Does not make sense
to use anything else when we have the thing to do the work right here.

  reply	other threads:[~2017-08-16 11:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16  8:14 [patch net-next repost 0/3] net/sched: Improve getting objects by indexes Chris Mi
2017-08-16  8:14 ` [patch net-next repost 1/3] idr: Use unsigned long instead of int Chris Mi
2017-08-16 10:37   ` Eric Dumazet
2017-08-16 10:53     ` Jiri Pirko
2017-08-16 10:58       ` Eric Dumazet
2017-08-16 11:06         ` Jiri Pirko [this message]
2017-08-16 14:57           ` Eric Dumazet
2017-08-16 15:00             ` Jiri Pirko
2017-08-16  8:14 ` [patch net-next repost 2/3] net/sched: Change cls_flower to use IDR Chris Mi
2017-08-16 17:42   ` Cong Wang
2017-08-16 17:50     ` David Miller
2017-08-16  8:14 ` [patch net-next repost 3/3] net/sched: Change act_api and act_xxx modules " Chris Mi

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=20170816110612.GI1868@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=chrism@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=mawilcox@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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