netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexei.starovoitov@gmail.com
Cc: sparclinux@vger.kernel.org, netdev@vger.kernel.org,
	ast@kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH 2/2] sparc64: Add eBPF JIT.
Date: Sat, 22 Apr 2017 14:27:22 -0400 (EDT)	[thread overview]
Message-ID: <20170422.142722.2115566524446267818.davem@davemloft.net> (raw)
In-Reply-To: <20170422153233.GA47144@ast-mbp.thefacebook.com>

From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Date: Sat, 22 Apr 2017 08:32:35 -0700

> On Fri, Apr 21, 2017 at 08:17:11PM -0700, David Miller wrote:
>> 
>> This is an eBPF JIT for sparc64.  All major features are supported.
>> 
>> All tests under tools/testing/selftests/bpf/ pass.
>> 
>> Signed-off-by: David S. Miller <davem@davemloft.net>
> ...
>> +	/* tail call */
>> +	case BPF_JMP | BPF_CALL |BPF_X:
>> +		emit_tail_call(ctx);
>> +
> 
> I think 'break;' is missing here.

Good catch, I'll fix that.

> When tail_call's target program is null the current program should
> continue instead of aborting.
> Like in our current ddos+lb setup the program looks like:
>  bpf_tail_call(ctx, &prog_array, 1);
>  bpf_tail_call(ctx, &prog_array, 2);
>  bpf_tail_call(ctx, &prog_array, 3);
>  return XDP_DROP;
> 
> this way it will jump into the program that is installed in slot 1.
> If it's empty, it will try slot 2...
> If no programs installed it will drop the packet.

Yes, with the break; fixed above that's what the sparc64 JIT will
end up doing.  If any of the tests don't pass in emit_tail_call()
we branch to the end of the emit_tail_call() sequence.

Thanks.

  reply	other threads:[~2017-04-22 18:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-22  3:17 [PATCH 2/2] sparc64: Add eBPF JIT David Miller
2017-04-22 15:32 ` Alexei Starovoitov
2017-04-22 18:27   ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-04-18 18:58 David Miller
2017-04-19  9:35 ` Daniel Borkmann
2017-04-21  1:49   ` 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=20170422.142722.2115566524446267818.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=sparclinux@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).