From: David Miller <davem@davemloft.net>
To: krkumar2@in.ibm.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] genetlink: Optimize and one bug fix in genl_generate_id()
Date: Sat, 17 Oct 2009 23:58:10 -0700 (PDT) [thread overview]
Message-ID: <20091017.235810.19115879.davem@davemloft.net> (raw)
In-Reply-To: <20091015055507.30128.60763.sendpatchset@localhost.localdomain>
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Thu, 15 Oct 2009 11:25:07 +0530
> From: Krishna Kumar <krkumar2@in.ibm.com>
>
> 1. GENL_MIN_ID is a valid id -> no need to start at
> GENL_MIN_ID + 1.
> 2. Avoid going through the ids two times: If we start at
> GENL_MIN_ID+1 (*or bigger*) and all ids are over!, the
> code iterates through the list twice (*or lesser*).
> 3. Simplify code - no need to start at idx=0 which gets
> reset to GENL_MIN_ID.
>
> Patch on net-next-2.6. Reboot test shows that first id
> passed to genl_register_family was 16, next two were
> GENL_ID_GENERATE and genl_generate_id returned 17 & 18
> (user level testing of same code shows expected values
> across entire range of MIN/MAX).
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Applied, thanks.
next prev parent reply other threads:[~2009-10-18 6:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 5:54 [PATCH] genetlink: Optimize genl_register_family() Krishna Kumar
2009-10-15 5:55 ` [PATCH] genetlink: Optimize and one bug fix in genl_generate_id() Krishna Kumar
2009-10-18 6:58 ` David Miller [this message]
2009-10-18 6:58 ` [PATCH] genetlink: Optimize genl_register_family() David Miller
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=20091017.235810.19115879.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=krkumar2@in.ibm.com \
--cc=netdev@vger.kernel.org \
/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).