Add a test for verifier log handling. Check bad attr combinations
but focus on cases when log is truncated.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
Acked-by: Alexei Starovoitov <a...@kernel.org>
Acked-b
page_address() does not handle NULL argument gracefully,
make sure we NULL-check the page pointer before passing it
to page_address().
Fixes: ecd63a0217d5 ("nfp: add XDP support in the driver")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon H
The while loop fetching 64 bit ethtool statistics may have
to retry multiple times, it shouldn't modify the outside state.
Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-
in the driver "for ever" and fix won't backport
cleanly beyond commit 325945ede6d4 ("nfp: split software and hardware
vNIC statistics") which is in net.
Jakub Kicinski (2):
nfp: fix ethtool stats gather retry
nfp: handle page allocation failures
drivers/net/ethernet/netronome/
If CONFIG_DST_CACHE is not selected cpu variable
will be unused and we will see a compilation warning.
Move it under the ifdef.
Reported-by: kbuild test robot <fengguang...@intel.com>
Fixes: d66f2b91f95b ("bpf: don't rely on the verifier lock for metadata_dst
allocation")
Sign
Separate the instruction printing into a standalone source file.
This way sneaky code from tools/ can compile it in directly.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
kernel/bpf/Makefile | 1 +
kernel/
of allocating a smaller buffer (a page)
and writing it out into the user buffer whenever it fills up.
To simplify the code assume that prints will never be longer
than 1024 bytes.
This is in preparation of the global verifier lock removal.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.
Compile the instruction printer from kernel/bpf and use it
for disassembling "translated" eBPF code.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
tools/bpf/bpftool/Documentation/bpftool-prog.rst
of actually removing the verifier lock is left to someone
more competent and self-confident :)
Jakub Kicinski (5):
bpf: remove global verifier log
bpf: move instruction printing into a separate file
tools: bpftool: use the kernel's instruction printer
bpf: don't rely on the verifier lock
The biggest piece of global state protected by the verifier lock
is the verifier log. Move that log to struct bpf_verifier_env.
struct bpf_verifier_env has to be passed now to all invocations
of verbose().
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon
bpf_skb_set_tunnel_*() functions require allocation of per-cpu
metadata_dst. The allocation happens upon verfication of the
first program using those helpers. In preparation for removing
the verifier lock, use cmpxchg() to make sure we only allocate
the metadata_dsts once.
Signed-off-by: Jakub
On Wed, 04 Oct 2017 21:46:47 -0700 (PDT), David Miller wrote:
> From: Jakub Kicinski <jakub.kicin...@netronome.com>
> Date: Wed, 4 Oct 2017 20:10:02 -0700
>
> > Hi!
> >
> > This set adds bpftool to the tools/ directory. The first
> > patch renames tool
On Fri, 28 Jul 2017 23:28:26 -0700, Roopa Prabhu wrote:
> On Fri, Jul 28, 2017 at 9:46 AM, Jakub Kicinski <kubak...@wp.pl> wrote:
> > On Fri, 28 Jul 2017 07:53:01 -0700, Roopa Prabhu wrote:
> >> On Thu, Jul 27, 2017 at 7:33 PM, Jakub Kicinski <kubak...@wp.pl> wrote
ntext pointers and add
to selftests the test case described here.
Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
Dave, a merge note - in net-next this will need env to be passed
to verbose().
kernel/
On Mon, 16 Oct 2017 17:16:24 +0100, Edward Cree wrote:
> On 16/10/17 16:45, Jakub Kicinski wrote:
> > Commit f1174f77b50c ("bpf/verifier: rework value tracking")
> > removed the crafty selection of which pointer types are
> > allowed to be modified. This is OK f
g.
This was pointed out in review but I misunderstood the comment.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 2 +-
tools/bpf/bpftool/main.h
ntext pointers and add
to selftests the test case described here.
Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
Dave, a merge note - in net-next this will need env to be passed
to verbos
On Mon, 16 Oct 2017 17:47:45 +0100, Edward Cree wrote:
> On 16/10/17 17:30, Jakub Kicinski wrote:
> > On Mon, 16 Oct 2017 17:16:24 +0100, Edward Cree wrote:
> >> On 16/10/17 16:45, Jakub Kicinski wrote:
> >>> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verif
On Tue, 17 Oct 2017 14:48:12 +0200, Jiri Pirko wrote:
> Fri, Oct 13, 2017 at 03:08:24AM CEST, jakub.kicin...@netronome.com wrote:
> >On Thu, 12 Oct 2017 19:18:16 +0200, Jiri Pirko wrote:
> >> diff --git a/drivers/net/ethernet/netronome/nfp/bpf/offload.c
> >>
-by: Mark Brown <broo...@kernel.org>
Acked-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Thank you!
Since the verifier ops don't have to be associated with
the program for its entire lifetime we can move it to
verifier's struct bpf_verifier_env.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
include/linux/bpf.h | 1 -
include/linux/bpf_verifier.h | 1 +
kern
struct bpf_verifier_ops contains both verifier ops and operations
used later during program's lifetime (test_run). Split the runtime
ops into a different structure.
BPF_PROG_TYPE() will now append ## _prog_ops or ## _verifier_ops
to the names.
Signed-off-by: Jakub Kicinski <jakub.ki
Since we are now doing strict checking of what offloads
may access, make sure skb->len is on that list.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
net/core/filter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/filter.c b/net/core/filte
/bpf_types.h).
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
include/linux/bpf.h | 3 +++
kernel/bpf/verifier.c | 55 +++
net/core/filter.c | 40 +
3 files changed, 59 insertions(
analysis. To do that, I have
to first move the test_run callback to a separate structure. Then
verifier ops can be declared in the verifier directly and
different sets can be picked for verification vs analysis.
Jakub Kicinski (4):
bpf: split verifier and program ops
bpf: remove the verifier
have removed the call from nfp_net_pf_app_start().
>
> Fixes: 02082701b974 ("nfp: create control vNICs and wire up rx/tx")
> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
Acked-by: Jakub Kicinski <jakub.kicin...@netronome.com>
ed: Change act_api and act_xxx modules to use IDR")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
net/sched/act_api.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/sched/ac
On Thu, 7 Sep 2017 11:10:33 +0200, Jiri Pirko wrote:
> Hi Kuba.
>
> I'm looking into cls_bpf code and nfp_net_bpf_offload function in your
> driver. Why do you need TC_CLSBPF_ADD? Seems like TC_CLSBPF_REPLACE
> should be enough. It would make the cls_bpf code easier.
>
> Note that other cls just
On Thu, 7 Sep 2017 16:05:03 +0200, Jiri Pirko wrote:
> Thu, Sep 07, 2017 at 03:44:12PM CEST, kubak...@wp.pl wrote:
> >On Thu, 7 Sep 2017 11:10:33 +0200, Jiri Pirko wrote:
> >> Hi Kuba.
> >>
> >> I'm looking into cls_bpf code and nfp_net_bpf_offload function in your
> >> driver. Why do you need
chain_create function directly. The
> chain is created with refcnt == 1, which is not correct in this case and
> causes the memleak. So move the refcnt increment into tcf_chain_get
> function even for the case when chain needs to be created.
>
> Reported-by: Jakub Kicinski <kuba
On Tue, 26 Sep 2017 15:24:06 -0700, Alexei Starovoitov wrote:
> On Tue, Sep 26, 2017 at 08:35:22AM -0700, Jakub Kicinski wrote:
> > Add a simple tool for querying and updating BPF objects on the system.
> >
> > Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com
On Tue, 26 Sep 2017 17:32:31 -0600, David Ahern wrote:
> On 9/26/17 9:35 AM, Jakub Kicinski wrote:
> > I'm looking for a home for bpftool, Daniel suggested that
> > tools/net could be a good place, since there are only BPF
> > utilities there already.
> >
>
separate data sets
> to be supplied.
...
Acked-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Add a simple tool for querying and updating BPF objects on the system.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
tools/bpf/Makefile | 18 +-
tools/bpf/bpftool/Makefile | 80 +
tools
directly using LLVM library
and JSON output are high on the priority list.
The first patch renames tools/net to tools/bpf, while the
second one adds the new code.
Jakub Kicinski (2):
tools: rename tools/net directory to tools/bpf
tools: bpf: add bpftool
MAINTAINERS | 3
We currently only have BPF tools in the tools/net directory.
We are about to add more BPF tools there, not necessarily
networking related, rename the directory and related Makefile
targets to bpf.
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Jakub Kicinski <ja
On Fri, 29 Sep 2017 19:35:18 -0700, Martin KaFai Lau wrote:
> On Sat, Sep 30, 2017 at 02:07:46AM +0000, Jakub Kicinski wrote:
> > Hi Martin!
> >
> > On Wed, 27 Sep 2017 14:37:53 -0700, Martin KaFai Lau wrote:
> > > diff --git a/include/linux/bpf.h b/include/linux/
Hi Martin!
On Wed, 27 Sep 2017 14:37:53 -0700, Martin KaFai Lau wrote:
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index 33ccc474fb04..252f4bc9eb25 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -56,6 +56,7 @@ struct bpf_map {
> struct work_struct work;
>
On Fri, 29 Sep 2017 18:34:12 +0200, Jesper Dangaard Brouer wrote:
> The 'cpumap' is primary used as a backend map for XDP BPF helper
> call bpf_redirect_map() and XDP_REDIRECT action, like 'devmap'.
>
> This patch implement the main part of the map. It is not connected to
> the XDP redirect
On Tue, 26 Sep 2017 08:35:22 -0700, Jakub Kicinski wrote:
> Add a simple tool for querying and updating BPF objects on the system.
>
> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
> Reviewed-by: Simon Horman <simon.hor...@netronome.com>
Dave, I got s
>
> Signed-off-by: Daniel Borkmann <dan...@iogearbox.net>
> Acked-by: Alexei Starovoitov <a...@kernel.org>
> Acked-by: John Fastabend <john.fastab...@gmail.com>
Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Thanks!
TX completion may happen any time after HW queue was kicked.
We can't access the skb afterwards. Move the time stamping
before ringing the doorbell.
Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.
On Mon, 21 Aug 2017 14:34:30 -0700, Jakub Kicinski wrote:
> On Mon, 21 Aug 2017 22:59:56 +0200, Christophe JAILLET wrote:
> > Check memory allocation failure and return -ENOMEM in such a case, as
> > already done a few lines below
> >
> > Signed-off-by: Christop
y.
>
> Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
Acked-by: Jakub Kicinski <kubak...@wp.pl>
On Mon, 21 Aug 2017 22:59:56 +0200, Christophe JAILLET wrote:
> Check memory allocation failure and return -ENOMEM in such a case, as
> already done a few lines below
>
> Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
Acked-by: Jakub Kicinski <kubak...@wp.pl>
Thanks!
retrieving
the image dumps.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
tools/testing/selftests/bpf/test_progs.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_progs.c
b/tools/testing/selftests/bpf/te
On Sun, 27 Aug 2017 14:06:15 +0300, Saeed Mahameed wrote:
> From: Mohamad Haj Yahia
>
> VGT+ is a security feature that gives the administrator the ability of
> controlling the allowed vlan-ids list that can be transmitted/received
> from/to the VF.
> The allowed vlan-ids
On Sun, 27 Aug 2017 14:06:17 +0300, Saeed Mahameed wrote:
> From: Eugenia Emantayev
>
> Add receive and transmit violation counters to be
> displayed in iproute2 VF statistics.
>
> Signed-off-by: Eugenia Emantayev
> Signed-off-by: Saeed Mahameed
m>
Signed-off-by: Jimmy Kizito <jimmy.kiz...@netronome.com>
Signed-off-by: Rami Tomer <rami.to...@netronome.com>
Signed-off-by: Simon Horman <simon.hor...@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/
Hi!
This set adds basic SR-IOV including setting/getting VF MAC addresses,
VLANs, link state and spoofcheck settings. It is wired up for both
vNICs and representors (note: ip link will not report VF settings on
VF/PF representors because they are not linked to the PF PCI device).
Pablo and team
From: Simon Horman <simon.hor...@netronome.com>
Add basic ndo_set/get_vf to support SR-IOV on all types
of port representors.
Signed-off-by: Simon Horman <simon.hor...@netronome.com>
Signed-off-by: Dirk van der Merwe <dirk.vanderme...@netronome.com>
Reviewed-by: Jakub Kic
On Fri, 25 Aug 2017 08:24:49 -0700, Jacob Keller wrote:
> Under some circumstances, such as with many stacked devices, it is
> possible that dev_hard_start_xmit will bundle many packets together, and
> mark them all with xmit_more.
Excuse my ignorance but what are those stacked devices? Could
the default Kconfig selection of flower offload. Patch 6 fixes
locking around representor updates which got lost in net-next.
Jakub Kicinski (6):
nfp: separate app vNIC init/clean from alloc/free
nfp: flower: base lifetime of representors on existence of lower vNIC
nfp: move the start/stop
Create representors after lower vNIC is registered and destroy
them before it is destroyed. Move the code out of start/stop
callbacks directly into vnic_init/clean callbacks. Make sure
SR-IOV callbacks don't try to create representors when lower
device does not exist.
Signed-off-by: Jakub
Use dev_consume_skb_any() in place of dev_kfree_skb_any()
when control frame has been successfully processed in flower
and on the driver's main TX completion path.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
the netdev pointer.
RTNL is needed for the dev_set_mtu() call.
Fixes: 2dff19622421 ("nfp: process MTU updates from firmware flower app")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/etherne
It's reasonable to assume that if user selects to build the NFP
driver all offload capabilities will be enabled by default.
Change the CONFIG_NFP_APP_FLOWER to default to enabled.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netr
and add proper init/clean. Apps using representors
will be able to use new callbacks to manage lifetime of
upper devices.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf/mai
Since representors are now created with a separate callback
start/stop app callbacks can be moved again to their original
location. They are intended to app-specific init/clean up
over the control channel.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon
Jiri, FWIW I also just noticed these, but they seem related to the
earlier TC chain work?
unreferenced object 0x8807466f70c8 (size 64):
comm "tc", pid 1812, jiffies 4294932641 (age 1537.192s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 a0 83 e1 31 07 88 ff ff ...1
xxx modules to use IDR")
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
net/sched/act_api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
inde
On Tue, 5 Sep 2017 14:52:21 +0200, Jiri Pirko wrote:
> Tue, Sep 05, 2017 at 12:59:48PM CEST, kubak...@wp.pl wrote:
> >Jiri, FWIW I also just noticed these, but they seem related to the
> >earlier TC chain work?
>
> What do you do to trigger this?
Sorry, I wasted a bit of time there because
On Sun, 8 Oct 2017 20:47:10 -0700, Eric Dumazet wrote:
> This was discussed/reported earlier today by Ido.
>
> https://patchwork.ozlabs.org/patch/823011/
>
> We will submit an official fix shortly.
Ah, sorry, I missed that!
On Sun, 8 Oct 2017 01:19:17 +0300, Alexey Dobriyan wrote:
> Buffer length passed into this hook is always IFNAMSIZ which is 16.
>
> Code savings on x86_64:
>
> add/remove: 0/0 grow/shrink: 1/9 up/down: 2/-45 (-43)
> function old new delta
>
Hi!
This appeared in net-next over the weekend - looks likely related to
this set...
[ 164.456668] BUG: using smp_processor_id() in preemptible [] code:
sshd/1255
[ 164.472259] caller is ip6_pol_route+0xe88/0x4a80
[ 164.477571] CPU: 10 PID: 1255 Comm: sshd Not tainted
(PoC had ECC protection
on instruction store disabled). There is also a minor ld_field
fix and all 64 bit shifts can now be encoded.
Jakub Kicinski (15):
nfp: output control messages to trace_devlink_hwmsg()
nfp: bpf: lift the single-port limitation
nfp: bpf: use the power of sparse
the BPF closer
with FW app datapath anyway, and the target datapath itself runs in
4 context mode.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 46 ++-
Most instructions have special fields which allow switching
between base and extended Local Memory pointers. Introduce
those to register encoding, we will use the extra LM pointers
to access high addresses of the stack.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Re
so we have
to extract it into one of the scratch registers, OTOH since
LMEM can be used in restricted operands we don't have to
extract packet pointer.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethe
We need to add longer OP_* defines, move the values away.
Purely whitespace commit.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/nfp_asm.h | 156 +--
Define a new __bitwise type for software representation of registers.
This will allow us to catch incorrect parameter types using sparse.
Accessors we define also allow us to return correct enum type and
therefore ensure all switches handle all register types.
Signed-off-by: Jakub Kicinski
Temporarily drop support for skb->mark. We are primarily focusing
on XDP offload, and implementing skb->mark on the new datapath has
lower priority.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
dr
ld_field instruction is a bit special because the encoding uses
two source registers and one of them becomes the output. We do
need to pass the dst register to our encoding helpers though,
otherwise the "write both banks" flag will not be observed.
Signed-off-by: Jakub Kicinski &l
NFP LMEM is a large, indirectly accessed register file. There
are two basic indirect access registers. Each access operation
may either use offset (up to 8 or 16 words) or perform post
decrement/increment.
Add encodings of LMEM indexes as instruction operands.
Signed-off-by: Jakub Kicinski
Limiting the eBPF offload to a single port was a workaround
required for the PoC application FW which has not been
released externally. It's not necessary any more.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
Add encodings of all 64bit shift operations.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 48 +---
1 file changed, 36 insertions(+),
Move the software reg helpers and some static data to nfp_asm.c.
They are related to the previous patch, but move is done in a separate
commit for ease of review.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
We need to append up to 8 nops after last instruction to make
sure the CPU will not fetch garbage instructions with invalid
ECC if the code store was not initialized.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
In the initial PoC firmware I simply disabled ECC on the instruction
store. Do the ECC calculation for generated instructions in the driver.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/n
Use standard devlink trace point to allow tracing of control
messages.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/nfp_app.h | 8
1 file changed, 8 insertions(+)
Device expects the instructions in little endian. Make sure we
byte swap on big endian hosts.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 6 --
1 fil
On Wed, 4 Oct 2017 10:42:42 -0700, Manoj Gupta wrote:
> Hi Jakub,
>
> I had discussed about supporting this code with some clang developers.
> However, the consensus was this code relies on a specific GCC optimizer
> behavior and Clang does not share the same behavior by design.
Hm. I find
On Wed, 04 Oct 2017 21:13:47 +0200, Daniel Borkmann wrote:
> On 10/04/2017 05:43 AM, Alexei Starovoitov wrote:
> > On Tue, Oct 03, 2017 at 08:24:06PM -0700, Eric Dumazet wrote:
> >> On Tue, 2017-10-03 at 19:52 -0700, Alexei Starovoitov wrote:
> >>
> >>> yep. looks great.
> >>> Please test it
On Wed, 4 Oct 2017 11:49:57 -0700, Matthias Kaehlcke wrote:
> Hi Joe,
>
> El Wed, Oct 04, 2017 at 11:07:19AM -0700 Joe Perches ha dit:
>
> > On Tue, 2017-10-03 at 13:05 -0700, Matthias Kaehlcke wrote:
> > > nfp_eth_set_bit_config() is marked as __always_inline to allow gcc to
> > > identify
On Thu, 05 Oct 2017 23:10:03 +0200, Daniel Borkmann wrote:
> > include/linux/bpf_verifier.h | 7 +++--
> > kernel/bpf/verifier.c| 64
> > +++-
> > 2 files changed, 50 insertions(+), 21 deletions(-)
> >
> > diff --git
On Wed, 4 Oct 2017 20:36:42 +0200, Jesper Dangaard Brouer wrote:
> On Wed, 4 Oct 2017 08:40:32 -0700
> Jakub Kicinski <jakub.kicin...@netronome.com> wrote:
>
> > Add documentation for bpftool. Separate files for each subcommand.
> > Use rst format. Documentation
On Tue, 3 Oct 2017 17:19:42 -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Oct 02, 2017 at 04:11:27PM -0700, Jakub Kicinski escreveu:
> > Hi!
> >
> > This set adds bpftool to the tools/ directory. The first
> > patch renames tools/net to tools/bpf, the second one ad
The only global state protected by the verifier lock is
the verifier log. Move that log to struct bpf_verifier_env
and allow verification of multiple programs in parallel.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
---
Like this? :)
Compile-tested, I'm rebasing
On Wed, 4 Oct 2017 16:16:49 -0700, Matthias Kaehlcke wrote:
> > > Thanks for the suggestion. This seems a viable alternative if David
> > > and the NFP owners can live without the extra checking provided by
> > > __BF_FIELD_CHECK.
> >
> > The reason the __BF_FIELD_CHECK refuses to compile
On Wed, 27 Sep 2017 12:45:11 +0200, Jesper Dangaard Brouer wrote:
> On Wed, 27 Sep 2017 00:02:08 +0100
> Jakub Kicinski <jakub.kicin...@netronome.com> wrote:
>
> > On Tue, 26 Sep 2017 15:24:06 -0700, Alexei Starovoitov wrote:
> > > On Tue, Sep 26, 2017 at 08:35:22
We optimize comparisons to immediate 0 as if (reg.lo | reg.hi).
The early return statement was missing, however, which means we
would generate two comparisons - optimized one followed by a
normal 2x 32 bit compare.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by:
ld_field instruction has the following format in NFP assembler:
ld_field[dst, 1000, src, <<24]
reoder parameters to emit_ld_field_any() to make it closer to
the familiar assembler order.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horma
Add support for direct packet access in TC, note that because
writing the packet will cause the verifier to generate a csum
fixup prologue we won't be able to offload packet writes from
TC, just yet, only the reads will work.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Re
This patch adds ability to write packet contents using pre-validated
packet pointers (direct packet access).
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf
to little endian hosts only.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/netronome/nfp/b
Sizes of fields in struct xdp_md/xdp_buff and some in sk_buff depend
on target architecture. Take that into account and use struct xdp_buff,
not struct xdp_md.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
Implement byte swaps with rotations, shifts and byte loads.
Remember to clear upper parts of the 64 bit registers.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bp
or STACK, so we can add the check already.
Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 85 +--
drivers/net/ethernet/netronome/nfp/bpf/mai
with unreleased
PoC FW (ABI version 1) and therefore nobody outside of Netronome
can exercise it anyway.
Jakub Kicinski (12):
bpf: verifier: set reg_type on context accesses in second pass
nfp: bpf: reorder arguments to emit_ld_field_any()
nfp: bpf: add missing return in jne_imm optimization
Now that we have BPF assemebler support in LLVM 6 we can easily
test all compare instructions (LLVM 4 didn't generate most of them
from C). Fix the compare to immediates and refactor the order
of compare to regs to make sure they both follow the same pattern.
Signed-off-by: Jakub Kicinski
901 - 1000 of 2598 matches
Mail list logo