Re: [PATCH v2 net-next 0/8] Introduce bpf ID

2017-06-01 Thread Jakub Kicinski
On Thu, 1 Jun 2017 12:52:28 -0600, David Ahern wrote: > On 6/1/17 12:27 PM, Alexei Starovoitov wrote: > > 'I want to retrieve original instructions' is not a problem. It's a > > push for 'solution'. Explaining 'why' you want to see original > > instructions would describe the actual problem. >

Re: [PATCH net-next 00/16] nfp: ctrl vNIC

2017-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2017 08:16:10 +0200, Jiri Pirko wrote: > Tue, Jun 06, 2017 at 02:01:41AM CEST, jakub.kicin...@netronome.com wrote: > >Hi! > > > >This series adds the ability to use one vNIC as a control channel > >for passing messages to and from the application firmware. The > >implementation

Re: [PATCH net-next 00/16] nfp: ctrl vNIC

2017-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2017 10:23:36 +0200, Jiri Pirko wrote: > Tue, Jun 06, 2017 at 09:21:45AM CEST, kubak...@wp.pl wrote: > >On Tue, 6 Jun 2017 08:16:10 +0200, Jiri Pirko wrote: > >> Tue, Jun 06, 2017 at 02:01:41AM CEST, jakub.kicin...@netronome.com wrote: > >> >Hi! > >> > > >> >This series adds the

[PATCH net-next] nfp: add VLAN filtering support

2017-06-15 Thread Jakub Kicinski
From: Pablo Cascón <pablo.cas...@netronome.com> Add general use per-vNIC mailbox area and use it for VLAN filtering support. Initially proto is hardcoded to 802.1q. Signed-off-by: Pablo Cascón <pablo.cas...@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.co

Re: [PATCH net-next] nfp: add VLAN filtering support

2017-06-15 Thread Jakub Kicinski
On Thu, 15 Jun 2017 12:50:57 +, Mintz, Yuval wrote: > > From: Pablo Cascón > > > > Add general use per-vNIC mailbox area and use it for VLAN filtering support. > > Initially proto is hardcoded to 802.1q. > > > ... > > +static int > >

[RFC net-next 5/8] nfp: bpf: take a reference on offloaded programs

2017-06-16 Thread Jakub Kicinski
, not only a driver mode one. Only release our reference on adapter free instead of immediately after netdev unregister to allow offload to be disabled first. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.h| 2 ++ drive

[RFC net-next 4/8] nfp: bpf: don't offload XDP programs in DRV_MODE

2017-06-16 Thread Jakub Kicinski
. This should leave it open for us to implement simultaneous loading of two programs - one in the drv path and another to the NIC later. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.h| 3 +++ drivers/net/ethernet/netrono

[RFC net-next 3/8] nfp: xdp: move driver XDP setup into a separate function

2017-06-16 Thread Jakub Kicinski
handle that. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 23 +- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/et

[RFC net-next 1/8] xdp: pass XDP flags into install handlers

2017-06-16 Thread Jakub Kicinski
Pass XDP flags to the xdp ndo. This will allow drivers to look at the mode flags and make decisions about offload. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- include/linux/netdevice.h | 1 + net/core/dev.c| 5 +++-- 2 files changed, 4 insertions(+), 2 del

[RFC net-next 8/8] nfp: xdp: report if program is offloaded

2017-06-16 Thread Jakub Kicinski
Make use of just added XDP_ATTACHED_HW. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/net

[RFC net-next 7/8] xdp: add reporting of offload mode

2017-06-16 Thread Jakub Kicinski
drivers currently assign the mode with double negation: mode = !!xdp_prog; no drivers have to be modified. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- include/linux/netdevice.h| 7 --- include/uapi/linux/if_link.h | 1 + net/core/dev.c | 3 +-

[RFC net-next 0/8] xdp: offload mode

2017-06-16 Thread Jakub Kicinski
currently claims XDP offload support but lacks most basic features like direct packet access. Jakub Kicinski (8): xdp: pass XDP flags into install handlers xdp: add HW offload mode flag for installing programs nfp: xdp: move driver XDP setup into a separate function nfp: bpf: don't offload XDP

[RFC net-next 6/8] nfp: bpf: add support for XDP_FLAGS_HW_MODE

2017-06-16 Thread Jakub Kicinski
Respect the XDP_FLAGS_HW_MODE. When it's set install the program on the NIC and skip enabling XDP in the driver. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 10 +++--- 1 file changed, 7 insertions(+), 3 del

[RFC net-next 2/8] xdp: add HW offload mode flag for installing programs

2017-06-16 Thread Jakub Kicinski
Add an installation-time flag for requesting that the program be installed only if it can be offloaded to HW. Internally new command for ndo_xdp is added, this way we avoid putting checks into drivers since they all return -EINVAL on an unknown command. Signed-off-by: Jakub Kicinski <jakub.ki

Re: [PATCH v2 net-next 8/9] bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG

2017-06-13 Thread Jakub Kicinski
On Tue, 13 Jun 2017 17:37:50 -0700, Martin KaFai Lau wrote: > On Tue, Jun 13, 2017 at 04:52:32PM -0700, Jakub Kicinski wrote: > > On Tue, 13 Jun 2017 14:08:40 -0700, Martin KaFai Lau wrote: > > > - case XDP_QUERY_PROG: > > > - xdp->prog_attached = !

Re: [PATCH v2 net-next 8/9] bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG

2017-06-13 Thread Jakub Kicinski
On Tue, 13 Jun 2017 20:19:53 -0700, Martin KaFai Lau wrote: > On Tue, Jun 13, 2017 at 07:19:50PM -0700, Jakub Kicinski wrote: > > On Tue, 13 Jun 2017 17:37:50 -0700, Martin KaFai Lau wrote: > > > On Tue, Jun 13, 2017 at 04:52:32PM -0700, Jakub Kicinski wrote: > > >

Re: [PATCH v2 net-next 8/9] bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG

2017-06-13 Thread Jakub Kicinski
On Tue, 13 Jun 2017 14:08:40 -0700, Martin KaFai Lau wrote: > - case XDP_QUERY_PROG: > - xdp->prog_attached = !!nn->dp.xdp_prog; > + case XDP_QUERY_PROG: { > + const struct bpf_prog *xdp_prog; > + > + xdp_prog = nn->dp.xdp_prog; > + if

Re: [PATCH v3 net-next 8/9] bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG

2017-06-15 Thread Jakub Kicinski
On Thu, 15 Jun 2017 17:29:16 -0700, Martin KaFai Lau wrote: > Add support to nfp to report bpf_prog ID during XDP_QUERY_PROG. > > Signed-off-by: Martin KaFai Lau <ka...@fb.com> > Cc: Jakub Kicinski <jakub.kicin...@netronome.com> > Acked-by: Alexei Starovoitov <a

[PATCH net-next repost] nfp: add VLAN filtering support

2017-06-15 Thread Jakub Kicinski
From: Pablo Cascón <pablo.cas...@netronome.com> Add general use per-vNIC mailbox area and use it for VLAN filtering support. Initially proto is hardcoded to 802.1q. Signed-off-by: Pablo Cascón <pablo.cas...@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.co

Re: [PATCH net-next 00/10] bpf: xdp: Report bpf_prog ID in IFLA_XDP

2017-06-13 Thread Jakub Kicinski
On Mon, 12 Jun 2017 22:35:34 -0700, Martin KaFai Lau wrote: > On Mon, Jun 12, 2017 at 06:26:02PM -0700, Jakub Kicinski wrote: > > On Mon, 12 Jun 2017 18:00:15 -0700, Martin KaFai Lau wrote: > > > This is the first usage of the new bpf_prog ID. It is for > > > rep

[PATCH net-next 1/4] netlink: add NULL-friendly helper for setting extended ACK message

2017-04-30 Thread Jakub Kicinski
ethtool_ops. Add a new helper for setting the error message in such conditions. Existing helper is left as is to encourage propagating the ext act fully wherever possible. It also makes it clear in the code which messages may be lost due to ext ack being NULL. Signed-off-by: Jakub Kicinski

[PATCH net-next 0/4] xdp: use netlink extended ACK reporting

2017-04-30 Thread Jakub Kicinski
nvalid argument" message. v1/non-rfc: - add a separate macro in patch 1; - add KBUILD_MODNAME as part of the message (Daniel); - don't print the error to logs in patch 1. Jakub Kicinski (4): netlink: add NULL-friendly helper for setting extended ACK message xdp: propagate extended ack to X

[PATCH net-next 4/4] virtio_net: make use of extended ack message reporting

2017-04-30 Thread Jakub Kicinski
Try to carry error messages to the user via the netlink extended ack message attribute. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/virtio_net.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/drive

[PATCH net-next 2/4] xdp: propagate extended ack to XDP setup

2017-04-30 Thread Jakub Kicinski
ack mechanism to carry the message back to user space. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- include/linux/netdevice.h | 10 -- net/core/dev.c| 5 - net/core/rtnetlink.c | 13 - 3 files changed, 20 insertions(+), 8 del

[PATCH net-next 3/4] nfp: make use of extended ack message reporting

2017-04-30 Thread Jakub Kicinski
Try to carry error messages to the user via the netlink extended ack message attribute. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 ++- .../net/ethernet/netronome/nfp/nfp_net_common.c

Re: [PATCH net-next iproute2 0/3] ip: Initial support for extack errors

2017-05-01 Thread Jakub Kicinski
On Mon, 1 May 2017 20:18:22 -0700, David Ahern wrote: > Introduce a new function, rtnl_ack_extack, to allow commands to flip > to the new error reporting over time. > > Convert iplink_modify to use the new function to display error strings > returned from ip link set commands. T

[PATCH net-next] xdp: fix parameter kdoc for extack

2017-05-01 Thread Jakub Kicinski
Fix kdoc parameter spelling from extact to extack. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 35a06cebb282..0b2876e00834 100644 --- a/net/core

[PATCH net-next 03/13] nfp: rename netdev/port to vNIC

2017-05-19 Thread Jakub Kicinski
without a vNIC (using representors instead). Make sure code refers to vNICs as vNICs and not ports or netdevs. No functional changes. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- drivers/net/ethernet/n

[PATCH net-next 05/13] nfp: introduce very minimal nfp_app

2017-05-19 Thread Jakub Kicinski
Introduce a concept of an application. For now it's just grouping pointers and serving as a layer of indirection. It will help us weaken the dependency on nfp_net in ethtool code. Later series will flesh out support for different apps in the driver. Signed-off-by: Jakub Kicinski <jakub.ki

[PATCH net-next 06/13] nfp: disallow mixing vNICs with and without NSP port entry

2017-05-19 Thread Jakub Kicinski
file if FW app requires different firmwares per media config. While at it move some code to nfp_net_pf_alloc_vnic() to make it counter-match nfp_net_pf_free_vnic() better. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com>

[PATCH net-next 08/13] nfp: update port state in place

2017-05-19 Thread Jakub Kicinski
Always updating port state in place by overriding values in exiting pf->eth_tbl makes things easier to manage and allows us to have a common helper for both full and per-port refresh. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman &

[PATCH net-next 01/13] nfp: add nfp_cppcore_pcie_unit() helper

2017-05-19 Thread Jakub Kicinski
From: Simon Horman <simon.hor...@netronome.com> Add nfp_cppcore_pcie_unit() helper to retrieve the PCIE unit of a CPP handle and use the new helper as appropriate. Signed-off-by: Simon Horman <simon.hor...@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com>

[PATCH net-next 02/13] nfp: make nfp_net alloc/init/cleanup/free not depend on netdevs

2017-05-19 Thread Jakub Kicinski
struct nfp_net represents a vNIC, we will be moving away from the requirement for every vNIC to have a netdev associated with it. Remove "netdev" from some function names and prefer passing struct nfp_net pointer as argument instead of struct net_device *. Signed-off-by: Jaku

[PATCH net-next 07/13] nfp: introduce nfp_port

2017-05-19 Thread Jakub Kicinski
Encapsulate port information into struct nfp_port. nfp_port will soon be extended to contain devlink_port information. It also makes it easier to reuse port-related code between vNICs and representors. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon

[PATCH net-next 13/13] nfp: refresh port state before reporting autonegotiation

2017-05-19 Thread Jakub Kicinski
State of autonegotiation may have changed but is not yet refreshed. Make sure ethtool respects the NFP_PORT_CHANGED flag when looking at autoneg. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- drivers/net/ethern

[PATCH net-next 09/13] nfp: move refresh tracking into the port structure

2017-05-19 Thread Jakub Kicinski
Track whether physical port's state have changed since last refresh inside the nfp_port structure instead of the vNIC structure. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- drivers/net/ethernet/netronome/n

[PATCH net-next 10/13] nfp: provide linking on port structures

2017-05-19 Thread Jakub Kicinski
Add link to nfp_ports to make it possible to iterate over all ports. This will come in handy when some ports may be representors. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- drivers/net/ethernet/netronome/nf

[PATCH net-next 04/13] nfp: add nfp_net_pf_free_vnic() function

2017-05-19 Thread Jakub Kicinski
Soon a third place will need to free a struct nfp_net. Add a free counterpart to nfp_net_pf_alloc_vnic(). Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net

[PATCH net-next 11/13] nfp: mark port state as stale after reconfig

2017-05-19 Thread Jakub Kicinski
After port configuration is performed mark it as changed. This will close a window of time between configuration and async state refresh which runs from a workqueue where old port state would be reported. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon

[PATCH net-next 12/13] nfp: mark port state as stale if update failed

2017-05-19 Thread Jakub Kicinski
If reading new state of the port failed, mark the port back as CHANGED. This way next user state request will trigger refresh, which will hopefully succeed. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> ---

[PATCH net-next 00/13] nfp: introduce nfp_port and nfp_app

2017-05-19 Thread Jakub Kicinski
akes sense. Hopefully the separation of lower-level netdev code and application logic will help us limit interdependencies and accelerate parallel projects (e.g. TC flower offloads vs eBPF offload). Jakub Kicinski (12): nfp: make nfp_net alloc/init/cleanup/free not depend on netdevs nfp: rename n

[PATCH net-next 03/16] nfp: reuse ring free code on close

2017-06-05 Thread Jakub Kicinski
On the close path reuse the ring free helpers introduced for runtime reconfiguration. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/d

[PATCH net-next 10/16] nfp: make vNIC ctrl memory mapping function reusable

2017-06-05 Thread Jakub Kicinski
We will soon need to map control vNIC PCI memory as well as data vNIC memory. Make the function for mapping areas pointed to by an RTsym reusable. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 55

[PATCH net-next 14/16] nfp: allow non-equal distribution of IRQs

2017-06-05 Thread Jakub Kicinski
Thus far the code assumed all vNICs will request similar number of IRQs. This will be no longer true with control vNICs (where 1 IRQ will suffice). Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 3 ++- 1 file chan

[PATCH net-next 16/16] nfp: advertise support for NFD ABI 0.5

2017-06-05 Thread Jakub Kicinski
and capability exchange is left to app-specific code. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_netvf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH net-next 15/16] nfp: create control vNICs and wire up rx/tx

2017-06-05 Thread Jakub Kicinski
When driver encounters an nfp_app which has a control message handler defined, allocate a control vNIC. This control channel will be used to exchange data with the application FW such as flow table programming, statistics and global datapath control. Signed-off-by: Jakub Kicinski <jakub.ki

[PATCH net-next 09/16] nfp: add control vNIC datapath

2017-06-05 Thread Jakub Kicinski
Since control vNICs don't have a netdev, they can't use napi and queuing stack provides. Add simple tasklet-based data receive and send of control messages with queuing on a skb_list. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp

[PATCH net-next 04/16] nfp: move nfp_net_vecs_init()

2017-06-05 Thread Jakub Kicinski
Move nfp_net_vecs_init() after all datapath functions. We will need to init poll() callbacks from this function soon. No functional changes. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 54 +++---

[PATCH net-next 07/16] nfp: allow allocation and initialization of netdev-less vNICs

2017-06-05 Thread Jakub Kicinski
vNICs used for sending and receiving control messages shouldn't really have a netdev. Add the ability to initialize vNICs for netdev-less operation. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 +- .../net/et

[PATCH net-next 11/16] nfp: map all queue controllers at once

2017-06-05 Thread Jakub Kicinski
RX and TX queue controllers are interleaved. Instead of creating two mappings which map the same area at slightly different offset, create only one mapping. Always map all queue controllers to simplify the code and allow reusing the mapping for non-data vNICs. Signed-off-by: Jakub Kicinski

[PATCH net-next 13/16] nfp: slice the netdev spawning function

2017-06-05 Thread Jakub Kicinski
-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 62 ++- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netrono

[PATCH net-next 00/16] nfp: ctrl vNIC

2017-06-05 Thread Jakub Kicinski
that something is a control message. Our implementation can cater to both. First two users of this code will be eBPF maps and flower offloads. Jakub Kicinski (16): nfp: reorder open and close functions nfp: split out the allocation part of open nfp: reuse ring free code on close nfp: move

[PATCH net-next 12/16] nfp: don't clutter init code passing fw_ver around

2017-06-05 Thread Jakub Kicinski
of the first one. This should not result in user-visible changes, though. Capabilities of data vNICs of trival apps are identical. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 17 +++-- 1 file changed, 7 insertions(

[PATCH net-next 05/16] nfp: prepare print macros for use without netdev

2017-06-05 Thread Jakub Kicinski
To be able to reuse print macros easily with control vNICs make the macros check if netdev pointer is populated and use dev_* print functions otherwise. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.

[PATCH net-next 01/16] nfp: reorder open and close functions

2017-06-05 Thread Jakub Kicinski
We will soon reuse parts of .ndo_stop() for clean up after errors in .ndo_open(). Reorder the associated functions to make that possible. No functional changes. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCH net-next 06/16] nfp: make sure debug accesses don't depend on netdevs

2017-06-05 Thread Jakub Kicinski
We want to be able to inspect the state of descriptor rings of the control vNIC, so it will use the same interface as data vNICs. Make sure the code doesn't use netdevs to determine state of the rings and names things appropriately. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.

[PATCH net-next 02/16] nfp: split out the allocation part of open

2017-06-05 Thread Jakub Kicinski
to allocate resources for netdev-less vNICs. Because we want to reuse allocation code in netdev-less vNICs leave the netif_set_real_num_[rt]x_queues() calls inside open. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCH net-next 08/16] nfp: prepare config and enable for working without netdevs

2017-06-05 Thread Jakub Kicinski
Out of the three stages of ifup/ifdown (allocate, configure, start) - this commit prepares the configuration stage for working with control vNICs. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 +++-- 1 file chan

Re: [PATCH net-next 00/16] nfp: ctrl vNIC

2017-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2017 11:17:57 +0200, Jiri Pirko wrote: > >> >What were your plans with pre-netdev config? > >> > >> We need to pass come initial resource division. Generally the consensus > >> is to have these options exposed through devlink, let the user configure > >> them all and then to

Re: [PATCH net-next 1/3] net: ethtool: add support for forward error correction modes

2017-06-27 Thread Jakub Kicinski
On Sat, 24 Jun 2017 12:19:43 -0700, Roopa Prabhu wrote: > Encoding: Types of encoding > Off: Turning off any encoding > RS : enforcing RS-FEC encoding on supported speeds > BaseR : enforcing Base R encoding on supported speeds > Auto : IEEE defaults for the speed/medium combination

Re: [PATCH/RFC net-next 2/9] nfp: add phys_switch_id support

2017-06-27 Thread Jakub Kicinski
ation not supported > > In the above eth2 and eth3 and representor netdevs for the first and second > physical port. eth4 is the representor for the PF. And eth5 is the PF netdev. > > Signed-off-by: Simon Horman <simon.hor...@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com>

Re: [PATCH net-next 1/3] net: ethtool: add support for forward error correction modes

2017-06-28 Thread Jakub Kicinski
On Tue, 27 Jun 2017 23:27:34 -0700, Dustin Byford wrote: > On Tue Jun 27 03:22, Jakub Kicinski wrote: > > On Sat, 24 Jun 2017 12:19:43 -0700, Roopa Prabhu wrote: > > > Encoding: Types of encoding > > > Off: Turning off any encoding > > > RS : en

Re: [PATCH/RFC net-next 4/9] nfp: extend flower add flow offload

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 01:21:44 +0200, Simon Horman wrote: > diff --git a/drivers/net/ethernet/netronome/nfp/flower/offload.c > b/drivers/net/ethernet/netronome/nfp/flower/offload.c > index 9127c28ea9c3..8ad72f57493d 100644 > --- a/drivers/net/ethernet/netronome/nfp/flower/offload.c > +++

Re: [PATCH/RFC net-next 3/9] nfp: provide infrastructure for offloading flower based TC filters

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 01:21:43 +0200, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Adds a flower based TC offload handler for representor devices, this > is in addition to the bpf based offload handler. The changes in this > patch will be used in a

Re: [PATCH/RFC net-next 7/9] nfp: add metadata to each flow offload

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 01:21:47 +0200, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Adds metadata describing the mask id of each flow and keeps track of > flows installed in hardware. Previously a flow could not be removed > from hardware as there

Re: [PATCH/RFC net-next 8/9] nfp: add a stats handler for flower offloads

2017-06-28 Thread Jakub Kicinski
On Wed, 28 Jun 2017 01:21:48 +0200, Simon Horman wrote: > From: Pieter Jansen van Vuuren > > Previously there was no way of updating flow rule stats after they > have been offloaded to hardware. This is solved by keeping track of > stats received from

[PATCH net v2 3/3] nfp: wait for the NSP resource to appear on boot

2017-09-13 Thread Jakub Kicinski
the links as part of init. To wait for NSP initialization we should make sure its resource has already been added to the resource table. NSP adds itself there as last step of init. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_main.c

[PATCH net v2 0/3] nfp: wait more carefully for card init

2017-09-13 Thread Jakub Kicinski
and retest. Jakub Kicinski (2): nfp: wait for board state before talking to the NSP nfp: wait for the NSP resource to appear on boot Pieter Jansen van Vuuren (1): nfp: add whitelist of supported flow dissector .../net/ethernet/netronome/nfp/flower/offload.c| 13 ++ drivers/net

[PATCH net v2 1/3] nfp: add whitelist of supported flow dissector

2017-09-13 Thread Jakub Kicinski
dd metadata to each flow offload") Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuu...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/flower/of

[PATCH net 3/3] nfp: wait for the NSP resource to appear on boot

2017-09-13 Thread Jakub Kicinski
the links as part of init. To wait for NSP initialization we should make sure its resource has already been added to the resource table. NSP adds itself there as last step of init. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netr

[PATCH net 1/3] nfp: add whitelist of supported flow dissector

2017-09-13 Thread Jakub Kicinski
dd metadata to each flow offload") Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuu...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/flower/of

Re: [PATCH net 0/3] nfp: wait more carefully for card init

2017-09-13 Thread Jakub Kicinski
On Wed, 13 Sep 2017 09:39:02 -0700 (PDT), David Miller wrote: > From: Jakub Kicinski <jakub.kicin...@netronome.com> > Date: Wed, 13 Sep 2017 08:51:28 -0700 > > > The first patch is a small fix for flower offload, we need a whitelist > > of supported matches, oth

[PATCH net 0/3] nfp: wait more carefully for card init

2017-09-13 Thread Jakub Kicinski
process (NSP) on the card. Turns out the NSP will only announce its existence after it's fully initialized. Until now we assumed it will be reachable, just not processing commands (hence we wait for a NOOP command to execute successfully). Jakub Kicinski (2): nfp: wait for board state before

[PATCH net 2/3] nfp: wait for board state before talking to the NSP

2017-09-13 Thread Jakub Kicinski
Board state informs us which low-level initialization stages the card has completed. We should wait for the card to be fully initialized before trying to communicate with it, not only before we configure passing traffic. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Re

[PATCH net v2 2/3] nfp: wait for board state before talking to the NSP

2017-09-13 Thread Jakub Kicinski
Board state informs us which low-level initialization stages the card has completed. We should wait for the card to be fully initialized before trying to communicate with it, not only before we configure passing traffic. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- d

[PATCH net-next v4 1/3] tools: rename tools/net directory to tools/bpf

2017-10-04 Thread Jakub Kicinski
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

[PATCH net-next v4 2/3] tools: bpf: add bpftool

2017-10-04 Thread Jakub Kicinski
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> Acked-by: Daniel Borkmann <dan...@iogearbox.net> Acked-by: Alexei Starovoitov <a...@kerne

[PATCH net-next v4 3/3] tools: bpftool: add documentation

2017-10-04 Thread Jakub Kicinski
Add documentation for bpftool. Separate files for each subcommand. Use rst format. Documentation is compiled into man pages using rst2man. Signed-off-by: David Beckett <david.beck...@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Acked-by: Alexei

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-04 Thread Jakub Kicinski
On Wed, 4 Oct 2017 17:38:22 -0700, Manoj Gupta wrote: > On Wed, Oct 4, 2017 at 4:25 PM, Jakub Kicinski wrote: > > On Wed, 4 Oct 2017 16:16:49 -0700, Matthias Kaehlcke wrote: > >> > > Thanks for the suggestion. This seems a viable alternative if David > >> > &

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-04 Thread Jakub Kicinski
On Wed, 4 Oct 2017 18:50:04 -0700, Manoj Gupta wrote: > On Wed, Oct 4, 2017 at 5:56 PM, Jakub Kicinski wrote: > > On Wed, 4 Oct 2017 17:38:22 -0700, Manoj Gupta wrote: > >> On Wed, Oct 4, 2017 at 4:25 PM, Jakub Kicinski wrote: > >> > On Wed, 4 Oct 2017 16:16:49

[PATCH net-next v4 0/3] tools: add bpftool

2017-10-04 Thread Jakub Kicinski
ort names, map ids, load time, uid; - add docs/man pages; - general cleanups & fixes. Jakub Kicinski (3): tools: rename tools/net directory to tools/bpf tools: bpf: add bpftool tools: bpftool: add documentation MAINTAINERS | 3 +- tools/M

[PATCH net-next v2 2/3] tools: bpf: add bpftool

2017-10-02 Thread Jakub Kicinski
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> Acked-by: Daniel Borkmann <dan...@iogearbox.net> Acked-by: Alexei Starovoitov <a...@kerne

[PATCH net-next v2 0/3] tools: add bpftool

2017-10-02 Thread Jakub Kicinski
avid Beckett for help with docs and testing. Jakub Kicinski (3): tools: rename tools/net directory to tools/bpf tools: bpf: add bpftool tools: bpftool: add documentation MAINTAINERS | 3 +- tools/Makefile | 14 +- tools/

[PATCH net-next v2 3/3] tools: bpftool: add documentation

2017-10-02 Thread Jakub Kicinski
Add documentation for bpftool. Separate files for each subcommand. Use rst format. Documentation is compiled into man pages using rst2man. Signed-off-by: David Beckett <david.beck...@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- tools/bpf/bpftool/D

[PATCH net-next v2 1/3] tools: rename tools/net directory to tools/bpf

2017-10-02 Thread Jakub Kicinski
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

Re: [PATCH net-next v2 3/3] tools: bpftool: add documentation

2017-10-02 Thread Jakub Kicinski
On Mon, 2 Oct 2017 17:55:02 -0700, Alexei Starovoitov wrote: > > +EXAMPLES > > + > > +**# bpftool prog show** > > +:: > > + > > + 10: xdp name:some_prog tag 00:5a:3d:21:23:62:0c:8b > > could you please remove ':' in the output to match what > show_fdinfo and kallsyms do ? Ack. > >

[PATCH net-next v3 3/3] tools: bpftool: add documentation

2017-10-04 Thread Jakub Kicinski
Add documentation for bpftool. Separate files for each subcommand. Use rst format. Documentation is compiled into man pages using rst2man. Signed-off-by: David Beckett <david.beck...@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Acked-by: Alexei

[PATCH net-next v3 0/3] tools: add bpftool

2017-10-04 Thread Jakub Kicinski
to be an easy task. They may need some more review, I will post them separately. v3: - address Alexei's comments about output and docs. v2: - report names, map ids, load time, uid; - add docs/man pages; - general cleanups & fixes. Jakub Kicinski (3): tools: rename tools/net directory to tools

[PATCH net-next v3 2/3] tools: bpf: add bpftool

2017-10-04 Thread Jakub Kicinski
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> Acked-by: Daniel Borkmann <dan...@iogearbox.net> Acked-by: Alexei Starovoitov <a...@kerne

[PATCH net-next v3 1/3] tools: rename tools/net directory to tools/bpf

2017-10-04 Thread Jakub Kicinski
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

[RFC 1/2] bpf: move instruction printing into a separate file

2017-10-03 Thread Jakub Kicinski
Separate the instruction printing into a standalone source file. This way sneaky code from tools/ can use it directly. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- Like this? kernel/bpf/Makefile | 1 + kernel/bpf/disasm.c

[RFC 2/2] tools: bpftool: use the kernel's instruction printer

2017-10-03 Thread Jakub Kicinski
Compile the instruction printer from kernel/bpf and use it for disassembling "translated" eBPF code. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- tools/bpf/bpftool/Documentation/bpftool-prog.txt | 11 +++--- tools/bpf/bpftool/Makefile

Re: [PATCH] nfp: convert nfp_eth_set_bit_config() into a macro

2017-10-03 Thread Jakub Kicinski
On Tue, 3 Oct 2017 13:05:46 -0700, Matthias Kaehlcke wrote: > nfp_eth_set_bit_config() is marked as __always_inline to allow gcc to > identify the 'mask' parameter as known to be constant at compile time, > which is required to use the FIELD_GET() macro. > > The forced inlining does the trick

[PATCH net-next v2 2/7] bpf: encapsulate verifier log state into a structure

2017-10-09 Thread Jakub Kicinski
Put the loose log_* variables into a structure. This will make it simpler to remove the global verifier state in following patches. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> Acked-by: Alexei Starovoitov <

[PATCH net-next v2 0/7] bpf: get rid of global verifier state and reuse instruction printer

2017-10-09 Thread Jakub Kicinski
); - handle kernel log allocation failures (Daniel); - put the env log members into a struct (Daniel). Jakub Kicinski (7): selftests/bpf: add a test for verifier logs bpf: encapsulate verifier log state into a structure bpf: move global verifier log into verifier environment bpf: move

[PATCH net-next v2 3/7] bpf: move global verifier log into verifier environment

2017-10-09 Thread Jakub Kicinski
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

[PATCH net-next v2 7/7] bpf: write back the verifier log buffer as it gets filled

2017-10-09 Thread Jakub Kicinski
of allocating a smaller buffer (1024B) and writing it out into the user buffer after every print. While at it remove the old BUG_ON(). This is in preparation of the global verifier lock removal. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Simon Horman <

[PATCH net-next v2 6/7] bpf: don't rely on the verifier lock for metadata_dst allocation

2017-10-09 Thread Jakub Kicinski
bpf_skb_set_tunnel_*() functions require allocation of per-cpu metadata_dst. The allocation happens upon verification 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

[PATCH net-next v2 4/7] bpf: move instruction printing into a separate file

2017-10-09 Thread Jakub Kicinski
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> Acked-by: Alexei Starovoitov <a...@ke

[PATCH net-next v2 5/7] tools: bpftool: use the kernel's instruction printer

2017-10-09 Thread Jakub Kicinski
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> Acked-by: Alexei Starovoitov <a...@kernel.org> Ac

<    4   5   6   7   8   9   10   11   12   13   >