All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jakub Kicinski <jakub.kicinski@netronome.com>,
	Song Liu <liu.song.a23@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	oss-drivers@netronome.com, Networking <netdev@vger.kernel.org>,
	Jiong Wang <jiong.wang@netronome.com>
Subject: Re: [PATCH bpf-next 2/7] lib: reciprocal_div: implement the improved algorithm on the paper mentioned
Date: Wed, 27 Jun 2018 10:54:29 +0200	[thread overview]
Message-ID: <1a9f5bc2-2c56-ad73-6d01-3455142e477b@iogearbox.net> (raw)
In-Reply-To: <20180626135258.7e80bead@cakuba.netronome.com>

On 06/26/2018 10:52 PM, Jakub Kicinski wrote:
> On Mon, 25 Jun 2018 23:21:10 -0700, Song Liu wrote:
>>> +struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec)
>>> +{
>>> +       struct reciprocal_value_adv R;
>>> +       u32 l, post_shift;
>>> +       u64 mhigh, mlow;
>>> +
>>> +       l = fls(d - 1);
>>> +       post_shift = l;
>>> +       /* NOTE: mlow/mhigh could overflow u64 when l == 32 which means d has
>>> +        * MSB set. This case needs to be handled before calling
>>> +        * "reciprocal_value_adv", please see the comment at
>>> +        * include/linux/reciprocal_div.h.
>>> +        */  
>>
>> Shall we handle l == 32 case better? I guess the concern here is extra
>> handling may slow down the fast path? If that's the case, we should
>> at least add a WARNING on the slow path.
> 
> Agreed, I think Jiong is travelling, hence no response.  We'll respin.

Ok, since there's going to be a respin, I've tossed the current series from
patchwork in that case.

Thanks,
Daniel

  reply	other threads:[~2018-06-27  8:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25  3:54 [PATCH bpf-next 0/7] nfp: bpf: add multiplication, divide and memcpy from maps Jakub Kicinski
2018-06-25  3:54 ` [PATCH bpf-next 1/7] nfp: bpf: allow source ptr type be map ptr in memcpy optimization Jakub Kicinski
2018-06-26  5:50   ` Song Liu
2018-06-26  7:08     ` Jakub Kicinski
2018-06-26 16:26       ` Song Liu
2018-06-25  3:54 ` [PATCH bpf-next 2/7] lib: reciprocal_div: implement the improved algorithm on the paper mentioned Jakub Kicinski
2018-06-26  6:21   ` Song Liu
2018-06-26 20:52     ` Jakub Kicinski
2018-06-27  8:54       ` Daniel Borkmann [this message]
2018-06-25  3:54 ` [PATCH bpf-next 3/7] nfp: bpf: rename umin/umax to umin_src/umax_src Jakub Kicinski
2018-06-26  6:21   ` Song Liu
2018-06-25  3:54 ` [PATCH bpf-next 4/7] nfp: bpf: copy range info for all operands of all ALU operations Jakub Kicinski
2018-06-26  6:50   ` Song Liu
2018-06-25  3:54 ` [PATCH bpf-next 5/7] nfp: bpf: support u16 and u32 multiplications Jakub Kicinski
2018-06-26 22:23   ` Song Liu
2018-06-25  3:54 ` [PATCH bpf-next 6/7] nfp: bpf: support u32 divide using reciprocal_div.h Jakub Kicinski
2018-06-26 22:28   ` Song Liu
2018-06-25  3:54 ` [PATCH bpf-next 7/7] nfp: bpf: migrate to advanced reciprocal divide in reciprocal_div.h Jakub Kicinski
2018-06-26 20:59   ` Jakub Kicinski
2018-07-05 18:28     ` Jiong Wang
2018-06-28 19:02 [PATCH bpf-next 2/7] lib: reciprocal_div: implement the improved algorithm on the paper mentioned Jiong Wang
2018-06-28 21:05 ` Jakub Kicinski

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=1a9f5bc2-2c56-ad73-6d01-3455142e477b@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiong.wang@netronome.com \
    --cc=liu.song.a23@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.