linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mihai.maruseac@gmail.com
Cc: shemminger@vyatta.com, eric.dumazet@gmail.com,
	mirq-linux@rere.qmqm.pl, therbert@google.com, jpirko@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	dbaluta@ixiacom.com, mmaruseac@ixiacom.com
Subject: Re: [PATCH] dev: use name hash for dev_seq_ops
Date: Thu, 20 Oct 2011 16:17:41 -0400 (EDT)	[thread overview]
Message-ID: <20111020.161741.1961240945982687125.davem@davemloft.net> (raw)
In-Reply-To: <1319097717-14910-1-git-send-email-mmaruseac@ixiacom.com>

From: Mihai Maruseac <mihai.maruseac@gmail.com>
Date: Thu, 20 Oct 2011 11:01:57 +0300

> Instead of using the dev->next chain and trying to resync at each call to
> dev_seq_start, use the name hash, keeping the bucket and the offset in
> seq->private field.

I'm totally fine with this patch from a technical perspective, but I'd
like one small thing tidied up before I apply this.

> +	unsigned int pos; /* bucket << 24 + offset */

Please don't mention this as a constant in the comment, if we ever
change NETDEV_HASHBITS this comment will be inaccurate.

I'd suggest putting the BUCKET_SPACE define before the dev_iter_state
definition, and using BUCKET_SPACE in the comment instead of 24.

Thanks.

  reply	other threads:[~2011-10-20 20:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  8:01 [PATCH] dev: use name hash for dev_seq_ops Mihai Maruseac
2011-10-20 20:17 ` David Miller [this message]
2011-10-21  6:45 ` Mihai Maruseac
2011-10-21  6:52   ` Eric Dumazet
2011-10-21  6:55   ` David Miller
2011-10-21 17:07   ` Stephen Hemminger
  -- strict thread matches above, loose matches on Subject: below --
2011-10-07 15:20 Mihai Maruseac
2011-10-07 16:24 ` Stephen Hemminger
2011-10-08  7:22   ` Mihai Maruseac
2011-10-10  8:43   ` Mihai Maruseac
2011-10-11  5:55     ` Stephen Hemminger
2011-10-12 10:08       ` Mihai Maruseac

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=20111020.161741.1961240945982687125.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dbaluta@ixiacom.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jpirko@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mihai.maruseac@gmail.com \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=mmaruseac@ixiacom.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=therbert@google.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).