Re: [PATCH net-next] tipc: use rcu dereference functions properly

2019-07-05 Thread Xin Long
On Wed, Jul 3, 2019 at 4:33 PM Xin Long wrote: > > On Wed, Jul 3, 2019 at 6:08 AM David Miller wrote: > > > > From: Xin Long > > Date: Tue, 2 Jul 2019 00:54:55 +0800 > > > > > For these places are protected by rcu_read_lock, we change from > > > rcu_dereference_rtnl to rcu_dereference, as there

Re: [PATCH net-next v3 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-05 Thread Jiri Pirko
Sat, Jul 06, 2019 at 08:16:24AM CEST, pa...@mellanox.com wrote: >In an eswitch, PCI PF may have port which is normally represented >using a representor netdevice. >To have better visibility of eswitch port, its association with >PF and a representor netdevice, introduce a PCI PF port >flavour and p

[PATCH net-next v3 2/3] devlink: Introduce PCI VF port flavour and port attribute

2019-07-05 Thread Parav Pandit
In an eswitch, PCI VF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with VF, and its representor netdevice, introduce a PCI VF port flavour. When devlink port flavour is PCI VF, fill up PCI VF attributes of the

[PATCH net-next v3 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-05 Thread Parav Pandit
In an eswitch, PCI PF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with PF and a representor netdevice, introduce a PCI PF port flavour and port attriute. When devlink port flavour is PCI PF, fill up PCI PF at

[PATCH net-next v3 3/3] net/mlx5e: Register devlink ports for physical link, PCI PF, VFs

2019-07-05 Thread Parav Pandit
Register devlink port of physical port, PCI PF and PCI VF flavour for each PF, VF when a given devlink instance is in switchdev mode. Implement ndo_get_devlink_port callback API to make use of registered devlink ports. This eliminates ndo_get_phys_port_name() and ndo_get_port_parent_id() callbacks

[PATCH net-next v3 0/3] devlink: Introduce PCI PF, VF ports and attributes

2019-07-05 Thread Parav Pandit
This patchset carry forwards the work initiated in [1] and discussion futher concluded at [2]. To improve visibility of representor netdevice, its association with PF or VF, physical port, two new devlink port flavours are added as PCI PF and PCI VF ports. A sample eswitch view can be seen below,

RE: [PATCH net-next v2 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-05 Thread Parav Pandit
> -Original Message- > From: Jakub Kicinski > Sent: Saturday, July 6, 2019 12:47 AM > To: Parav Pandit > Cc: netdev@vger.kernel.org; Jiri Pirko ; Saeed Mahameed > > Subject: Re: [PATCH net-next v2 1/3] devlink: Introduce PCI PF port flavour > and > port attribute > > On Fri, 5 Jul

[PATCH v6 bpf-next 5/5] libbpf: add perf_buffer_ prefix to README

2019-07-05 Thread Andrii Nakryiko
perf_buffer "object" is part of libbpf API now, add it to the list of libbpf function prefixes. Suggested-by: Daniel Borkman Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/README.rst b/tools/lib/bpf

[PATCH v6 bpf-next 3/5] selftests/bpf: test perf buffer API

2019-07-05 Thread Andrii Nakryiko
Add test verifying perf buffer API functionality. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/perf_buffer.c| 94 +++ .../selftests/bpf/progs/test_perf_buffer.c| 25 + 2 files changed, 119 insertions(+) create mode 100644 tools/

[PATCH v6 bpf-next 0/5] libbpf: add perf buffer abstraction and API

2019-07-05 Thread Andrii Nakryiko
This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit. Patch #1 adds a set of APIs to set up and work with perf buffer. Patch #2 enhances libbpf to support auto-setting PE

[PATCH v6 bpf-next 1/5] libbpf: add perf buffer API

2019-07-05 Thread Andrii Nakryiko
BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program to user space for additional processing. libbpf already has very low-level API to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to use and requires a lot of code to set everything up. This patch

[PATCH v6 bpf-next 4/5] tools/bpftool: switch map event_pipe to libbpf's perf_buffer

2019-07-05 Thread Andrii Nakryiko
Switch event_pipe implementation to rely on new libbpf perf buffer API (it's raw low-level variant). Signed-off-by: Andrii Nakryiko Acked-by: Jakub Kicinski --- tools/bpf/bpftool/map_perf_ring.c | 201 ++ 1 file changed, 64 insertions(+), 137 deletions(-) diff --git

[PATCH v6 bpf-next 2/5] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-07-05 Thread Andrii Nakryiko
For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for

Re: [PATCH v5 bpf-next 1/5] libbpf: add perf buffer API

2019-07-05 Thread Andrii Nakryiko
On Fri, Jul 5, 2019 at 10:42 PM Yonghong Song wrote: > > > > On 7/5/19 9:35 PM, Andrii Nakryiko wrote: > > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF > > program > > to user space for additional processing. libbpf already has very low-level > > API > > to read single C

Re: [PATCH v5 bpf-next 1/5] libbpf: add perf buffer API

2019-07-05 Thread Yonghong Song
On 7/5/19 9:35 PM, Andrii Nakryiko wrote: > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program > to user space for additional processing. libbpf already has very low-level API > to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to > use and req

Re: [PATCH bpf-next] selftests/bpf: fix test_attach_probe map definition

2019-07-05 Thread Yonghong Song
On 7/5/19 9:44 PM, Andrii Nakryiko wrote: > ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map > defs") changed BTF-defined maps syntax, while independently merged > 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") added new > test using outdated syntax of maps.

[PATCH bpf-next] selftests/bpf: fix test_attach_probe map definition

2019-07-05 Thread Andrii Nakryiko
ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map defs") changed BTF-defined maps syntax, while independently merged 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") added new test using outdated syntax of maps. This patch fixes this test after corresponding patch

[PATCH v5 bpf-next 1/5] libbpf: add perf buffer API

2019-07-05 Thread Andrii Nakryiko
BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program to user space for additional processing. libbpf already has very low-level API to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to use and requires a lot of code to set everything up. This patch

[PATCH v5 bpf-next 5/5] libbpf: add perf_buffer_ prefix to README

2019-07-05 Thread Andrii Nakryiko
perf_buffer "object" is part of libbpf API now, add it to the list of libbpf function prefixes. Suggested-by: Daniel Borkman Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/README.rst b/tools/lib/bpf

[PATCH v5 bpf-next 4/5] tools/bpftool: switch map event_pipe to libbpf's perf_buffer

2019-07-05 Thread Andrii Nakryiko
Switch event_pipe implementation to rely on new libbpf perf buffer API (it's raw low-level variant). Signed-off-by: Andrii Nakryiko Acked-by: Jakub Kicinski --- tools/bpf/bpftool/map_perf_ring.c | 201 ++ 1 file changed, 64 insertions(+), 137 deletions(-) diff --git

[PATCH v5 bpf-next 0/5] libbpf: add perf buffer abstraction and API

2019-07-05 Thread Andrii Nakryiko
This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit. Patch #1 adds a set of APIs to set up and work with perf buffer. Patch #2 enhances libbpf to support auto-setting PE

[PATCH v5 bpf-next 2/5] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-07-05 Thread Andrii Nakryiko
For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for

[PATCH v5 bpf-next 3/5] selftests/bpf: test perf buffer API

2019-07-05 Thread Andrii Nakryiko
Add test verifying perf buffer API functionality. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/perf_buffer.c| 94 +++ .../selftests/bpf/progs/test_perf_buffer.c| 25 + 2 files changed, 119 insertions(+) create mode 100644 tools/

Re: [PATCH 1/2] forcedeth: add recv cache make nic work steadily

2019-07-05 Thread Zhu Yanjun
Add Nan He is interested this commit. 在 2019/7/5 14:19, Zhu Yanjun 写道: A recv cache is added. The size of recv cache is 1000Mb / skb_length. When the system memory is not enough, this recv cache can make nic work steadily. When nic is up, this recv cache and work queue are created. When nic is

Re: [PATCH v5 bpf-next 0/4] capture integers in BTF type info for map defs

2019-07-05 Thread Andrii Nakryiko
On Fri, Jul 5, 2019 at 2:15 PM Daniel Borkmann wrote: > > On 07/05/2019 05:50 PM, Andrii Nakryiko wrote: > > This patch set implements an update to how BTF-defined maps are specified. > > The > > change is in how integer attributes, e.g., type, max_entries, map_flags, are > > specified: now they

Re: [PATCH v5 bpf-next 4/9] libbpf: add kprobe/uprobe attach API

2019-07-05 Thread Andrii Nakryiko
On Fri, Jul 5, 2019 at 1:46 PM Daniel Borkmann wrote: > > On 07/04/2019 02:57 AM, Andrii Nakryiko wrote: > > On Wed, Jul 3, 2019 at 9:47 AM Andrii Nakryiko > > wrote: > [...] > >> [1] > >> https://lore.kernel.org/bpf/2019062104.4152743-4-andr...@fb.com/T/#m6cfc141e7b57970bc948134bf671a4697

epoll_wait() (and epoll_pwait) stall for 206 ms per call on sockets with a small-ish snd/rcv buffer.

2019-07-05 Thread Carlo Wood
Hi all, hopefully I'm reporting this in the right place. While working on my C++ networking library, I ran into a problem that I have traced back to the kernel itself. The problem is related to setting a socket buffer size (snd/rcv). At first I noticed the problem while trying to test the threa

Re: bonded active-backup ethernet-wifi drops packets

2019-07-05 Thread Jay Vosburgh
Brian J. Murrell wrote: >On Tue, 2019-06-18 at 14:57 -0400, Brian J. Murrell wrote: >> Hi. >> >> I have an active-backup bonded connection on a 5.1.6 kernel where the >> slaves are an Ethernet interface and a wifi interface. The goal is >> to >> have network transparent (i.e. same and IP addres

Re: [PATCH net-next 00/12] mlx5 TLS TX HW offload support

2019-07-05 Thread David Miller
From: Tariq Toukan Date: Fri, 5 Jul 2019 18:30:10 +0300 > This series from Eran and me, adds TLS TX HW offload support to > the mlx5 driver. Series applied, please deal with any further feedback you get from Jakub et al. Thanks.

Re: [PATCH 06/15 net-next,v2] net: sched: add tcf_setup_block_offload()

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 01:48:34 +0200, Pablo Neira Ayuso wrote: > Most drivers do the same thing to set up the block, add a helper > function to do this. > > Signed-off-by: Pablo Neira Ayuso > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 534a545ea51e..003f24a1323f 100644 > --- a/n

Re: [PATCH 12/15 net-next,v2] net: flow_offload: make flow block callback list per-driver

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 01:48:40 +0200, Pablo Neira Ayuso wrote: > Remove the global flow_block_cb_list, replace it by per-driver list > of flow block objects. This will make it easier later on to support > for policy hardware offload of multiple subsystems. > > Suggested-by: Jiri Pirko > Signed-off-

Re: [pull request][net-next V2 0/2] Mellanox, mlx5 updates 2019-07-04

2019-07-05 Thread David Miller
From: Saeed Mahameed Date: Thu, 4 Jul 2019 20:51:22 + > This series adds the support for devlink fw query in mlx5 > > Please pull and let me know if there is any problem. > > Please note that the series starts with a merge of mlx5-next branch, > to resolve and avoid dependency with rdma tre

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-05 Thread David Miller
From: Ido Schimmel Date: Thu, 4 Jul 2019 19:26:38 +0300 > From: Ido Schimmel > > Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer > or an error pointer, but the code currently checks that the pointer is > not NULL. > > Fix this by checking that the pointer is not an er

Re: [PATCH 04/15 net-next,v2] net: sched: add tcf_block_setup()

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 01:48:32 +0200, Pablo Neira Ayuso wrote: > @@ -1052,12 +1145,19 @@ static int tcf_block_offload_cmd(struct tcf_block > *block, >struct netlink_ext_ack *extack) > { > struct tc_block_offload bo = {}; > + int err; > > bo.command

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-05 Thread David Miller
From: Ilias Apalodimas Date: Thu, 4 Jul 2019 17:46:09 +0300 > Quoting Arnd, > > We have to do a sync_single_for_device /somewhere/ before the > buffer is given to the device. On a non-cache-coherent machine with > a write-back cache, there may be dirty cache lines that get written back > after

Re: [PATCH 12/15 net-next,v2] net: flow_offload: make flow block callback list per-driver

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 01:48:40 +0200, Pablo Neira Ayuso wrote: > diff --git a/drivers/net/ethernet/netronome/nfp/abm/cls.c > b/drivers/net/ethernet/netronome/nfp/abm/cls.c > index 96b89a7c468b..a42f92318b7a 100644 > --- a/drivers/net/ethernet/netronome/nfp/abm/cls.c > +++ b/drivers/net/ethernet/netr

Re: [PATCH] net: netsec: Sync dma for device on buffer allocation

2019-07-05 Thread David Miller
From: Ilias Apalodimas Date: Thu, 4 Jul 2019 17:11:09 +0300 > Quoting Arnd, > > We have to do a sync_single_for_device /somewhere/ before the > buffer is given to the device. On a non-cache-coherent machine with > a write-back cache, there may be dirty cache lines that get written back > after

Re: [PATCH 04/15 net-next,v2] net: sched: add tcf_block_setup()

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 01:48:32 +0200, Pablo Neira Ayuso wrote: > +static int tcf_block_bind(struct tcf_block *block, struct tc_block_offload > *bo) > +{ > + struct tcf_block_cb *block_cb, *next; > + int err, i = 0; > + > + list_for_each_entry(block_cb, &bo->cb_list, global_list) { > +

Re: [PATCH][net-next] net: remove unused parameter from skb_checksum_try_convert

2019-07-05 Thread David Miller
From: Li RongQing Date: Thu, 4 Jul 2019 17:03:26 +0800 > the check parameter is never used > > Signed-off-by: Li RongQing Applied.

Re: [PATCH net-next 0/8] mlxsw: Enable/disable PTP shapers

2019-07-05 Thread David Miller
From: Ido Schimmel Date: Thu, 4 Jul 2019 10:07:32 +0300 > From: Ido Schimmel > > Shalom says: > > In order to get more accurate hardware time stamping in Spectrum-1, the > driver needs to apply a shaper on the port for speeds lower than 40Gbps. > This shaper is called a PTP shaper and it is a

Re: [PATCH v3 net-next] net: socionext: remove set but not used variable 'pkts'

2019-07-05 Thread David Miller
From: YueHaibing Date: Thu, 4 Jul 2019 03:37:45 + > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/socionext/netsec.c: In function 'netsec_clean_tx_dring': > drivers/net/ethernet/socionext/netsec.c:637:15: warning: > variable 'pkts' set but not used [-Wunused-but-se

Re: [PATCH bpf-next] selftests/bpf: add test_tcp_rtt to .gitignore

2019-07-05 Thread Daniel Borkmann
On 07/03/2019 10:09 PM, Stanislav Fomichev wrote: > Forgot to add it in the original patch. > > Fixes: b55873984dab ("selftests/bpf: test BPF_SOCK_OPS_RTT_CB") > Reported-by: Andrii Nakryiko > Signed-off-by: Stanislav Fomichev Applied, thanks!

Re: [Patch net 0/3] hsr: a few bug fixes

2019-07-05 Thread David Miller
From: Cong Wang Date: Wed, 3 Jul 2019 17:21:11 -0700 > This patchset contains 3 bug fixes for hsr triggered by a syzbot > reproducer, please check each patch for details. > > Cc: Arvid Brodin > Signed-off-by: Cong Wang Series applied, thanks.

Re: [PATCH bpf-next] selftests/bpf: fix test_align liveliness expectations

2019-07-05 Thread Daniel Borkmann
On 07/03/2019 11:29 PM, Stanislav Fomichev wrote: > Commit 2589726d12a1 ("bpf: introduce bounded loops") caused a change > in the way some registers liveliness is reported in the test_align. > Add missing "_w" to a couple of tests. Note, there are no offset > changes! > > Fixes: 2589726d12a1 ("bpf

Re: [PATCH net-next 1/3] ipv4: Multipath hashing on inner L3 needs to consider inner IPv6 pkts

2019-07-05 Thread David Miller
From: Stephen Suryaputra Date: Wed, 3 Jul 2019 11:19:32 -0400 > Commit 363887a2cdfe ("ipv4: Support multipath hashing on inner IP pkts > for GRE tunnel") supports multipath policy value of 2, Layer 3 or inner > Layer 3 if present, but it only considers inner IPv4. There is a use > case of IPv6 o

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 21:52:13 +0200, Antoine Tenart wrote: > This patch adds support for PTP Hardware Clock (PHC) to the Ocelot > switch for both PTP 1-step and 2-step modes. > > Signed-off-by: Antoine Tenart > @@ -596,11 +606,50 @@ static int ocelot_port_xmit(struct sk_buff *skb, struct > net_d

Re: [PATCH bpf-next 3/3] xdp: Add devmap_hash map type for looking up devices by hashed index

2019-07-05 Thread Y Song
On Fri, Jul 5, 2019 at 11:14 AM Toke Høiland-Jørgensen wrote: > > From: Toke Høiland-Jørgensen > > A common pattern when using xdp_redirect_map() is to create a device map > where the lookup key is simply ifindex. Because device maps are arrays, > this leaves holes in the map, and the map has to

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Richard Cochran
On Fri, Jul 05, 2019 at 09:52:13PM +0200, Antoine Tenart wrote: > +static irqreturn_t ocelot_ptp_rdy_irq_handler(int irq, void *arg) > +{ > + struct ocelot *ocelot = arg; > + > + do { > + /* Check if a timestamp can be retrieved */ > + if (!(val & SYS_PTP_STATUS_PTP

Re: pull request (net-next): ipsec-next 2019-07-05

2019-07-05 Thread David Miller
From: Steffen Klassert Date: Fri, 5 Jul 2019 10:46:01 +0200 > 1) A lot of work to remove indirections from the xfrm code. >From Florian Westphal. > > 2) Fix a WARN_ON with ipv6 that triggered because of a >forgotten break statement. From Florian Westphal. > > 3) Remove xfrmi_init_net,

Re: [PATCHv2] tools bpftool: Fix json dump crash on powerpc

2019-07-05 Thread Daniel Borkmann
On 07/05/2019 07:26 PM, Quentin Monnet wrote: > 2019-07-05 10:24 UTC-0700 ~ Jakub Kicinski >> On Fri, 5 Jul 2019 14:10:31 +0200, Jiri Olsa wrote: >>> Michael reported crash with by bpf program in json mode on powerpc: >>> >>> # bpftool prog -p dump jited id 14 >>> [{ >>> "name": "0xd00

Re: pull request (net): ipsec 2019-07-05

2019-07-05 Thread David Miller
From: Steffen Klassert Date: Fri, 5 Jul 2019 10:26:53 +0200 > 1) Fix xfrm selector prefix length validation for > inter address family tunneling. > From Anirudh Gupta. > > 2) Fix a memleak in pfkey. >From Jeremy Sowden. > > 3) Fix SA selector validation to allow empty selectors aga

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Richard Cochran
On Mon, Jul 01, 2019 at 12:03:27PM +0200, Antoine Tenart wrote: > +static irqreturn_t ocelot_ptp_rdy_irq_handler(int irq, void *arg) > +{ > + struct ocelot *ocelot = arg; > + > + do { > + struct skb_shared_hwtstamps shhwtstamps; > + struct list_head *pos, *tmp; > +

Re: [PATCH bpf-next v2] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Daniel Borkmann
On 07/05/2019 07:54 PM, Quentin Monnet wrote: > Add a new "bpftool prog run" subcommand to run a loaded program on input > data (and possibly with input context) passed by the user. > > Print output data (and output context if relevant) into a file or into > the console. Print return value and dur

Re: [PATCH v5 bpf-next 0/4] capture integers in BTF type info for map defs

2019-07-05 Thread Daniel Borkmann
On 07/05/2019 05:50 PM, Andrii Nakryiko wrote: > This patch set implements an update to how BTF-defined maps are specified. The > change is in how integer attributes, e.g., type, max_entries, map_flags, are > specified: now they are captured as part of map definition struct's BTF type > information

[PATCH net-next v2 0/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
Hello, This series introduces the PTP Hardware Clock (PHC) support to the Mscc Ocelot switch driver. In order to make use of this, a new register bank is added and described in the device tree, as well as a new interrupt. The use this bank and interrupt was made optional in the driver for dt compa

Re: [PATCH v5 bpf-next 4/9] libbpf: add kprobe/uprobe attach API

2019-07-05 Thread Daniel Borkmann
On 07/04/2019 02:57 AM, Andrii Nakryiko wrote: > On Wed, Jul 3, 2019 at 9:47 AM Andrii Nakryiko > wrote: [...] >> [1] >> https://lore.kernel.org/bpf/2019062104.4152743-4-andr...@fb.com/T/#m6cfc141e7b57970bc948134bf671a46972b95134 >> >>> with bpf_link with destructor looks good to me, but my

Re: [PATCH net-next 00/12] mlx5 TLS TX HW offload support

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 18:30:10 +0300, Tariq Toukan wrote: > Hi Dave, > > This series from Eran and me, adds TLS TX HW offload support to > the mlx5 driver. > > This offloads the kTLS encryption process from kernel to the > Mellanox NIC, saving CPU cycles and improving utilization. > > Upon a new

Re: [PATCH net-next 12/12] net/mlx5e: Add kTLS TX HW offload support

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 18:30:22 +0300, Tariq Toukan wrote: > Add support for transmit side kernel-TLS acceleration. > Offload the crypto encryption to HW. > > Per TLS connection: > - Use a separate TIS to maintain the HW context. > - Use a separate encryption key. > - Maintain static and progress HW

Re: [PATCH] selftests: txring_overwrite: fix incorrect test of mmap() return value

2019-07-05 Thread Willem de Bruijn
On Fri, Jul 5, 2019 at 7:44 AM Frank de Brabander wrote: > > If mmap() fails it returns MAP_FAILED, which is defined as ((void *) -1). > The current if-statement incorrectly tests if *ring is NULL. > > Signed-off-by: Frank de Brabander Acked-by: Willem de Bruijn Fixes: 358be656406d ("selftests

[PATCH net-next v2 7/8] net: mscc: remove the frame_info cpuq member

2019-07-05 Thread Antoine Tenart
In struct frame_info, the cpuq member is never used. This cosmetic patch removes it from the structure, and from the parsing of the frame header as it's only set but never used. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.h | 1 - drivers/net/ethernet/mscc/ocelot_boa

[PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot switch for both PTP 1-step and 2-step modes. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.c | 393 ++- drivers/net/ethernet/mscc/ocelot.h | 37 +++ drivers/net/ethernet/mscc/

[PATCH net-next v2 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-05 Thread Antoine Tenart
One additional register range needs to be described within the Ocelot device tree node: the PTP. This patch documents the binding needed to do so. Signed-off-by: Antoine Tenart --- Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-

[PATCH net-next v2 4/8] MIPS: dts: mscc: describe the PTP ready interrupt

2019-07-05 Thread Antoine Tenart
This patch adds a description of the PTP ready interrupt, which can be triggered when a PTP timestamp is available on an hardware FIFO. Signed-off-by: Antoine Tenart --- arch/mips/boot/dts/mscc/ocelot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/boot/dts

[PATCH net-next v2 5/8] net: mscc: describe the PTP register range

2019-07-05 Thread Antoine Tenart
This patch adds support for using the PTP register range, and adds a description of its registers. This bank is used when configuring PTP. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.h | 9 ++ drivers/net/ethernet/mscc/ocelot_board.c | 10 +- drivers/net/eth

[PATCH net-next v2 3/8] Documentation/bindings: net: ocelot: document the PTP ready IRQ

2019-07-05 Thread Antoine Tenart
One additional interrupt needs to be described within the Ocelot device tree node: the PTP ready one. This patch documents the binding needed to do so. Signed-off-by: Antoine Tenart --- Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++- 1 file changed, 6 insertions(+), 5 del

[PATCH net-next v2 6/8] net: mscc: improve the frame header parsing readability

2019-07-05 Thread Antoine Tenart
This cosmetic patch improves the frame header parsing readability by introducing a new macro to access and mask its fields. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot_board.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dr

[PATCH net-next v2 2/8] MIPS: dts: mscc: describe the PTP register range

2019-07-05 Thread Antoine Tenart
This patch adds one register range within the mscc,vsc7514-switch node, to describe the PTP registers. Signed-off-by: Antoine Tenart --- arch/mips/boot/dts/mscc/ocelot.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot

Re: [net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 14:31:29 +, Tariq Toukan wrote: > On 7/4/2019 11:12 PM, Jakub Kicinski wrote: > > On Thu, 4 Jul 2019 18:16:15 +, Saeed Mahameed wrote: > >> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > >> b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > >> in

Re: [EXT] Re: [PATCH net-next v2 4/4] qed*: Add devlink support for configuration attributes.

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 08:22:41 +, Sudarsana Reddy Kalluru wrote: > > On Thu, 4 Jul 2019 06:20:11 -0700, Sudarsana Reddy Kalluru wrote: > > > This patch adds implementation for devlink callbacks for reading and > > > configuring the device attributes. > > > > > > Signed-off-by: Sudarsana Reddy Ka

Re: [PATCH net-next v2 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 02:37:09 -0500, Parav Pandit wrote: > @@ -38,14 +38,24 @@ struct devlink { > char priv[0] __aligned(NETDEV_ALIGN); > }; > > +struct devlink_port_pci_pf_attrs { > + u16 pf; /* Associated PCI PF for this port. */ > +}; > + > struct devlink_port_attrs { > u8 set

[PATCH] coallocate socket_wq with socket itself

2019-07-05 Thread Al Viro
socket->wq is assign-once, set when we are initializing both struct socket it's in and struct socket_wq it points to. As the matter of fact, the only reason for separate allocation was the ability to RCU-delay freeing of socket_wq. RCU-delaying the freeing of socket itself gets rid of that need,

[PATCH] sockfs: switch to ->free_inode()

2019-07-05 Thread Al Viro
we do have an RCU-delayed part there already (freeing the wq), so it's not like the pipe situation; moreover, it might be worth considering coallocating wq with the rest of struct sock_alloc. ->sk_wq in struct sock would remain a pointer as it is, but the object it normally points to would be coall

[net-next] net: fib_rules: do not flow dissect local packets

2019-07-05 Thread Petar Penkov
Rules matching on loopback iif do not need early flow dissection as the packet originates from the host. Stop counting such rules in fib_rule_requires_fldissect Signed-off-by: Petar Penkov --- include/net/fib_rules.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include

Re: [PATCH bpf-next v2] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Y Song
On Fri, Jul 5, 2019 at 10:54 AM Quentin Monnet wrote: > > Add a new "bpftool prog run" subcommand to run a loaded program on input > data (and possibly with input context) passed by the user. > > Print output data (and output context if relevant) into a file or into > the console. Print return val

[PATCH bpf-next 3/3] xdp: Add devmap_hash map type for looking up devices by hashed index

2019-07-05 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen A common pattern when using xdp_redirect_map() is to create a device map where the lookup key is simply ifindex. Because device maps are arrays, this leaves holes in the map, and the map has to be sized to fit the largest ifindex, regardless of how many devices actual

[PATCH bpf-next 1/3] include/bpf.h: Remove map_insert_ctx() stubs

2019-07-05 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen When we changed the device and CPU maps to use linked lists instead of bitmaps, we also removed the need for the map_insert_ctx() helpers to keep track of the bitmaps inside each map. However, it seems I forgot to remove the function definitions stubs, so remove those

[PATCH bpf-next 2/3] xdp: Refactor devmap allocation code for reuse

2019-07-05 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The subsequent patch to add a new devmap sub-type can re-use much of the initialisation and allocation code, so refactor it into separate functions. Signed-off-by: Toke Høiland-Jørgensen --- kernel/bpf/devmap.c | 137 +++

[PATCH bpf-next 0/3] xdp: Add devmap_hash map type

2019-07-05 Thread Toke Høiland-Jørgensen
This series adds a new map type, devmap_hash, that works like the existing devmap type, but using a hash-based indexing scheme. This is useful for the use case where a devmap is indexed by ifindex (for instance for use with the routing table lookup helper). For this use case, the regular devmap nee

[PATCH bpf-next v2] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
Add a new "bpftool prog run" subcommand to run a loaded program on input data (and possibly with input context) passed by the user. Print output data (and output context if relevant) into a file or into the console. Print return value and duration for the test run into the console. A "repeat" arg

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
2019-07-05 10:08 UTC-0700 ~ Y Song > On Fri, Jul 5, 2019 at 9:03 AM Quentin Monnet > wrote: >> >> 2019-07-05 08:42 UTC-0700 ~ Y Song >>> On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet >>> wrote: 2019-07-04 22:49 UTC-0700 ~ Y Song > On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet >>>

Re: [PATCH rdma-next 0/2] DEVX VHCA tunnel support

2019-07-05 Thread Jason Gunthorpe
On Mon, Jul 01, 2019 at 09:14:00PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > Those two patches introduce VHCA tunnel mechanism to DEVX interface > needed for Bluefield SOC. See extensive commit messages for more > information. > > Thanks > > Max Gurtovoy (2): > net/ml

Re: loss of connectivity after enabling vlan_filtering

2019-07-05 Thread Vivien Didelot
On Sun, 30 Jun 2019 01:23:02 +0200, vto...@googlemail.com wrote: > A simple soul might infer that mv88e6xxx includes MV88E6060, at least > that happened to me apparently (being said simpleton). I agree that is confusing, that is why I don't like the 'xxx' naming convention in general, found in man

Re: NEIGH: BUG, double timer add, state is 8

2019-07-05 Thread Lorenzo Bianconi
On Jul 05, David Ahern wrote: > On 7/4/19 3:59 PM, Marek Majkowski wrote: > > I found a way to hit an obscure BUG in the > > net/core/neighbour.c:neigh_add_timer(), by piping two carefully > > crafted messages into AF_NETLINK socket. > > > > https://github.com/torvalds/linux/blob/v5.2-rc7/net/core

Re: [PATCHv2] tools bpftool: Fix json dump crash on powerpc

2019-07-05 Thread Quentin Monnet
2019-07-05 10:24 UTC-0700 ~ Jakub Kicinski > On Fri, 5 Jul 2019 14:10:31 +0200, Jiri Olsa wrote: >> Michael reported crash with by bpf program in json mode on powerpc: >> >> # bpftool prog -p dump jited id 14 >> [{ >> "name": "0xda9aa760", >> "insns": [{ >>

Re: [PATCHv2] tools bpftool: Fix json dump crash on powerpc

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 14:10:31 +0200, Jiri Olsa wrote: > Michael reported crash with by bpf program in json mode on powerpc: > > # bpftool prog -p dump jited id 14 > [{ > "name": "0xda9aa760", > "insns": [{ > "pc": "0x0", > "operation": "nop

Re: [rdma 14/16] RDMA/irdma: Add ABI definitions

2019-07-05 Thread Jason Gunthorpe
On Fri, Jul 05, 2019 at 04:42:19PM +, Saleem, Shiraz wrote: > > Subject: Re: [rdma 14/16] RDMA/irdma: Add ABI definitions > > > > On Thu, Jul 04, 2019 at 10:40:21AM +0300, Leon Romanovsky wrote: > > > On Wed, Jul 03, 2019 at 07:12:57PM -0700, Jeff Kirsher wrote: > > > > From: Mustafa Ismail >

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
Hello Richard, On Fri, Jul 05, 2019 at 09:47:36AM -0700, Richard Cochran wrote: > On Mon, Jul 01, 2019 at 12:03:27PM +0200, Antoine Tenart wrote: > > > +void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64 *ts) > > +{ > > + /* Read current PTP time to get seconds */ > > + u32

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Y Song
On Fri, Jul 5, 2019 at 9:03 AM Quentin Monnet wrote: > > 2019-07-05 08:42 UTC-0700 ~ Y Song > > On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet > > wrote: > >> > >> 2019-07-04 22:49 UTC-0700 ~ Y Song > >>> On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet > >>> wrote: > > Add a new "bpftoo

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Richard Cochran
On Mon, Jul 01, 2019 at 12:03:27PM +0200, Antoine Tenart wrote: > +void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64 *ts) > +{ > + /* Read current PTP time to get seconds */ > + u32 val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN); This register is protected by o

RE: [rdma 14/16] RDMA/irdma: Add ABI definitions

2019-07-05 Thread Saleem, Shiraz
> Subject: Re: [rdma 14/16] RDMA/irdma: Add ABI definitions > > On Thu, Jul 04, 2019 at 10:40:21AM +0300, Leon Romanovsky wrote: > > On Wed, Jul 03, 2019 at 07:12:57PM -0700, Jeff Kirsher wrote: > > > From: Mustafa Ismail > > > > > > Add ABI definitions for irdma. > > > > > > Signed-off-by: Musta

Re: [PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-05 Thread Antoine Tenart
Hi Andrew, On Fri, Jul 05, 2019 at 04:45:17PM +0200, Andrew Lunn wrote: > On Fri, Jul 05, 2019 at 03:30:16PM +0200, Antoine Tenart wrote: > > > > I'm not sure about this: optional properties means some parts of the h/w > > can be missing or not wired. It's not the case here, it's "optional" in >

RE: [net-next 1/3] ice: Initialize and register platform device to provide RDMA

2019-07-05 Thread Saleem, Shiraz
> Subject: Re: [net-next 1/3] ice: Initialize and register platform device to > provide > RDMA > > On Thu, Jul 04, 2019 at 12:48:29PM +, Jason Gunthorpe wrote: > > On Thu, Jul 04, 2019 at 02:42:47PM +0200, Greg KH wrote: > > > On Thu, Jul 04, 2019 at 12:37:33PM +, Jason Gunthorpe wrote: >

Re: [PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add()

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 08:26:25 +, Wei Yongjun wrote: > Fix to return negative error code -EINVAL from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections") > Signed-off-by: Wei Yongjun Acked-by: Jakub Kici

[PATCH net-next] net: openvswitch: do not update max_headroom if new headroom is equal to old headroom

2019-07-05 Thread Taehee Yoo
When a vport is deleted, the maximum headroom size would be changed. If the vport which has the largest headroom is deleted, the new max_headroom would be set. But, if the new headroom size is equal to the old headroom size, updating routine is unnecessary. Signed-off-by: Taehee Yoo --- net/open

[PATCH net-next] net: openvswitch: use netif_ovs_is_port() instead of opencode

2019-07-05 Thread Taehee Yoo
Use netif_ovs_is_port() function instead of open code. This patch doesn't change logic. Signed-off-by: Taehee Yoo --- net/openvswitch/dp_notify.c| 2 +- net/openvswitch/vport-netdev.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/openvswitch/dp_notify.c b/net

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
2019-07-05 08:42 UTC-0700 ~ Y Song > On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet > wrote: >> >> 2019-07-04 22:49 UTC-0700 ~ Y Song >>> On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet >>> wrote: Add a new "bpftool prog run" subcommand to run a loaded program on input data (and pos

Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-07-05 Thread Vivien Didelot
Hi Ido, On Sun, 23 Jun 2019 07:09:52 +, Ido Schimmel wrote: > > Russell, Ido, Florian, so far I understand that a multicast-unaware > > bridge must flood unknown traffic everywhere (CPU included); > > and a multicast-aware bridge must only flood its ports if their > > mcast_flood is on, and k

[PATCH v5 bpf-next 2/4] selftests/bpf: add __uint and __type macro for BTF-defined maps

2019-07-05 Thread Andrii Nakryiko
Add simple __uint and __type macro that hide details of how type and integer values are captured in BTF-defined maps. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t

[PATCH v5 bpf-next 4/4] selftests/bpf: convert legacy BPF maps to BTF-defined ones

2019-07-05 Thread Andrii Nakryiko
Convert selftests that were originally left out and new ones added recently to consistently use BTF-defined maps. Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- .../selftests/bpf/progs/get_cgroup_id_kern.c | 26 ++--- tools/testi

[PATCH v5 bpf-next 3/4] selftests/bpf: convert selftests using BTF-defined maps to new syntax

2019-07-05 Thread Andrii Nakryiko
Convert all the existing selftests that are already using BTF-defined maps to use new syntax (with no static data initialization). Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- tools/testing/selftests/bpf/progs/bpf_flow.c | 28 +++ .../testing/selftests/bpf

  1   2   >