From: Stephen Hemminger <stephen@networkplumber.org>
To: Niu Xilei <niu_xilei@163.com>
Cc: davem@davemloft.net, tglx@linutronix.de, fw@strlen.de,
peterz@infradead.org, pabeni@redhat.com,
anshuman.khandual@arm.com, linyunsheng@huawei.com,
bigeasy@linutronix.de, jonathan.lemon@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pktgen: create packet use IPv6 source address between src6_min and src6_max.
Date: Fri, 10 Jan 2020 07:50:56 -0800 [thread overview]
Message-ID: <20200110075056.06df4c0c@hermes.lan> (raw)
In-Reply-To: <20200110102842.13585-1-niu_xilei@163.com>
On Fri, 10 Jan 2020 18:28:42 +0800
Niu Xilei <niu_xilei@163.com> wrote:
> +/* Kernel not implement __int128's divide and modulo operator. Implement these
> + * operation use shift-subtract division algorithm adpater from
> + * https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/absl/numeric/int128.cc */
Some rewording of this comment is necessary to fix the English grammar.
And Linux style is not to put comment closing on same line.
Something like:
/* The Linux kernel does not implement 128 bit divide and modulus operations.
* Implement these operations using shift-subtract division algorithm
* from Chrome.
* https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/absl/numeric/int128.cc
*/
Also, the int128 code you referenced is Apache licensed (not GPL-v2 like kernel).
For div128_u128 the function should be static to avoid name conflicts.
The declarations need to be in reverse christmas tree order as well.
It does seem a bit like overkill since doing source address over a 64 bit
range should be more than enough for any test in this decade.
next prev parent reply other threads:[~2020-01-10 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 10:28 [PATCH] pktgen: create packet use IPv6 source address between src6_min and src6_max Niu Xilei
2020-01-10 15:50 ` Stephen Hemminger [this message]
2020-01-10 19:13 ` 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=20200110075056.06df4c0c@hermes.lan \
--to=stephen@networkplumber.org \
--cc=anshuman.khandual@arm.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=jonathan.lemon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=niu_xilei@163.com \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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).