linux-mips
[Top] [All Lists]

Re: [PATCH v2 0/5] MIPS: BPF: JIT fixes and improvements.

To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v2 0/5] MIPS: BPF: JIT fixes and improvements.
From: David Daney <ddaney@caviumnetworks.com>
Date: Tue, 14 Mar 2017 15:59:01 -0700
Authentication-results: cavium.com; dkim=none (message not signed) header.d=none;cavium.com; dmarc=none action=none header.from=caviumnetworks.com;
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, James Hogan <james.hogan@imgtec.com>, Alexei Starovoitov <ast@kernel.org>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Steven J. Hill" <steven.hill@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Cxm2cyKMDx2nD+1vTdHp82ps4dLM9t341uUl7hrHLfU=; b=hfPwEuOH+sFqzAUJ+ZVw2jQBMidLXDZFLuXZOma11m+S3o0m+QCPWGN6HOjVby/0fKprVniDvIHa/YMYttQSTc/qIj/4mCfjkCeW1NydBqQmP24y2z9SE2nW1jcHywaJr1lfE8GlbHVe9o0wu+U9uiSqmT5DN07NckIlFhP/sJo=
In-reply-to: <20170314224946.GA11983@ast-mbp.thefacebook.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20170314212144.29988-1-david.daney@cavium.com> <20170314224946.GA11983@ast-mbp.thefacebook.com>
Sender: linux-mips-bounce@linux-mips.org
Spamdiagnosticmetadata: NSPM
Spamdiagnosticoutput: 1:99
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
On 03/14/2017 03:49 PM, Alexei Starovoitov wrote:
On Tue, Mar 14, 2017 at 02:21:39PM -0700, David Daney wrote:
Changes from v1:

  - Use unsigned access for SKF_AD_HATYPE

  - Added three more patches for other problems found.


Testing the BPF JIT on Cavium OCTEON (mips64) with the test-bpf module
identified some failures and unimplemented features.

With this patch set we get:

     test_bpf: Summary: 305 PASSED, 0 FAILED, [85/297 JIT'ed]

Both big and little endian tested.

We still lack eBPF support, but this is better than nothing.

David Daney (5):
  MIPS: uasm:  Add support for LHU.
  MIPS: BPF: Add JIT support for SKF_AD_HATYPE.
  MIPS: BPF: Use unsigned access for unsigned SKB fields.
  MIPS: BPF: Quit clobbering callee saved registers in JIT code.
  MIPS: BPF: Fix multiple problems in JIT skb access helpers.

Thanks. Nice set of fixes. Especially patch 4.
Did you see crashes because of it?

Only when running the test-bpf module.

The "JMP_JA: Jump, gap, jump, ..." test doesn't actually use any registers, which I think is somewhat uncommon in BPF code. The system would either crash or have weird behavior after running this test.




Acked-by: Alexei Starovoitov <ast@kernel.org>



<Prev in Thread] Current Thread [Next in Thread>