Re: pull-request: bpf 2019-04-25

2019-04-25 Thread David Miller
From: Alexei Starovoitov Date: Thu, 25 Apr 2019 17:27:39 -0700 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) the bpf verifier fix to properly mark registers in all stack frames, from > Paul. > > 2) preempt_enable_no_resched->preempt_en

Re: [patch net-next v4 00/16] netdevsim: implement proper device model

2019-04-25 Thread David Miller
From: Jakub Kicinski Date: Thu, 25 Apr 2019 15:11:17 -0700 > On Thu, 25 Apr 2019 15:59:40 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Currently the model of netdevsim is a bit odd in multiple ways. >> 1) devlink instance is not in any way related with actual netdevsim >>netdevices. I

Re: pull request: bluetooth-next 2019-04-25

2019-04-25 Thread David Miller
From: Johan Hedberg Date: Thu, 25 Apr 2019 06:38:10 -0700 > Here's the main bluetooth-next pull request for the 5.2 kernel. > > - Added support for Mediatek SDIO controllers > - Added support for Broadcom BCM2076B1 UART controller > - Added support for Marvel SD8987 chipset > - Fix buffer ov

Re: [PATCH v4 bpf-next 0/4] add btf dumping to bpftool

2019-04-25 Thread Alexei Starovoitov
On Thu, Apr 25, 2019 at 4:08 PM Andrii Nakryiko wrote: > > This patch set adds a new `bpftool btf dump` sub-command, which allows to dump > BTF contents (only types for now). Currently it only outputs low-level > content, almost 1:1 with binary BTF format, but follow up patches will add > ability

Re: [net-next][PATCH 1/2] rds: handle unsupported rdma request to fs dax memory

2019-04-25 Thread Yanjun Zhu
On 2019/4/26 8:44, Santosh Shilimkar wrote: From: Hans Westgaard Ry RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. User applications can try to use RDS to perform RDMA over such memories and since it doesn't report any failure, it can

Re: [net-next][PATCH 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-04-25 Thread Yanjun Zhu
On 2019/4/26 8:44, Santosh Shilimkar wrote: RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. A sysctl is added to indicate whether RDMA requiring ODP is supported. Reviewed-by: Håkon Bugge Reviewed-tested-by: Zhu Yanjun Thanks, Santos

[PATCH net 5/6] bnxt_en: Fix statistics context reservation logic.

2019-04-25 Thread Michael Chan
In an earlier commit that fixes the number of stats contexts to reserve for the RDMA driver, we added a function parameter to pass in the number of stats contexts to all the relevant functions. The passed in parameter should have been used to set the enables field of the firmware message. Fixes:

[PATCH net 4/6] bnxt_en: Pass correct extended TX port statistics size to firmware.

2019-04-25 Thread Michael Chan
If driver determines that extended TX port statistics are not supported or allocation of the data structure fails, make sure to pass 0 TX stats size to firmware to disable it. The firmware returned TX stats size should also be set to 0 for consistency. This will prevent bnxt_get_ethtool_stats() f

[PATCH net 2/6] bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one()

2019-04-25 Thread Michael Chan
From: Vasundhara Volam In the bnxt_init_one() error path, short FW command request memory is not freed. This patch fixes it. Fixes: e605db801bde ("bnxt_en: Support for Short Firmware Message") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/b

[PATCH net 3/6] bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions.

2019-04-25 Thread Michael Chan
If we encounter errors during open and proceed to clean up, bnxt_hwrm_ring_free() may crash if the rings we try to free have never been allocated. bnxt_cp_ring_for_rx() or bnxt_cp_ring_for_tx() may reference pointers that have not been allocated. Fix it by checking for valid fw_ring_id first befo

[PATCH net 1/6] bnxt_en: Improve multicast address setup logic.

2019-04-25 Thread Michael Chan
The driver builds a list of multicast addresses and sends it to the firmware when the driver's ndo_set_rx_mode() is called. In rare cases, the firmware can fail this call if internal resources to add multicast addresses are exhausted. In that case, we should try the call again by setting the ALL_

[PATCH net 0/6] bnxt_en: Misc. bug fixes.

2019-04-25 Thread Michael Chan
6 miscellaneous bug fixes covering several issues in error code paths, a setup issue for statistics DMA, and an improvement for setting up multicast address filters. Please queue these for stable as well. Patch #5 (bnxt_en: Fix statistics context reservation logic) is for the most recent 5.0 stabl

[PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().

2019-04-25 Thread Michael Chan
In bnxt_rx_pkt(), if the driver encounters BD errors, it will recycle the buffers and jump to the end where the uninitailized variable "len" is referenced. Fix it by adding a new jump label that will skip the length update. This is the most correct fix since the length may not be valid when we ge

[net-next][PATCH 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-04-25 Thread Santosh Shilimkar
RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. A sysctl is added to indicate whether RDMA requiring ODP is supported. Reviewed-by: Håkon Bugge Reviewed-tested-by: Zhu Yanjun Signed-off-by: Hans Westgaard Ry Signed-off-by: Santosh Shilimk

[net-next][PATCH 0/2] rds: handle unsupported rdma request to fs dax memory

2019-04-25 Thread Santosh Shilimkar
RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. User applications can try to use RDS to perform RDMA over such memories and since it doesn't report any failure, it can lead to unexpected issues like memory corruption when a couple of out of s

[net-next][PATCH 1/2] rds: handle unsupported rdma request to fs dax memory

2019-04-25 Thread Santosh Shilimkar
From: Hans Westgaard Ry RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. User applications can try to use RDS to perform RDMA over such memories and since it doesn't report any failure, it can lead to unexpected issues like memory corruption

[PATCH net 1/2] net/tls: don't copy negative amounts of data in reencrypt

2019-04-25 Thread Jakub Kicinski
There is no guarantee the record starts before the skb frags. If we don't check for this condition copy amount will get negative, leading to reads and writes to random memory locations. Familiar hilarity ensues. Fixes: 4799ac81e52a ("tls: Add rx inline crypto offload") Signed-off-by: Jakub Kicinsk

[PATCH net 0/2] net/tls: fix data copies in tls_device_reencrypt()

2019-04-25 Thread Jakub Kicinski
Hi! This series fixes the tls_device_reencrypt() which is broken if record starts in the frags of the message skb. --- These will not conflict with net-next fixes, or Johns patches. Jakub Kicinski (2): net/tls: don't copy negative amounts of data in reencrypt net/tls: fix copy to fragments in

[PATCH net 2/2] net/tls: fix copy to fragments in reencrypt

2019-04-25 Thread Jakub Kicinski
Fragments may contain data from other records so we have to account for that when we calculate the destination and max length of copy we can perform. Note that 'offset' is the offset within the message, so it can't be passed as offset within the frag.. Here skb_store_bits() would have realised th

Re: [PATCH bpf] bpftool: Fix errno variable usage

2019-04-25 Thread Alexei Starovoitov
On Thu, Apr 11, 2019 at 12:56 PM Daniel Borkmann wrote: > > On 04/11/2019 10:03 AM, Benjamin Poirier wrote: > > The test meant to use the saved value of errno. Given the current code, it > > makes no practical difference however. > > > > Fixes: bf598a8f0f77 ("bpftool: Improve handling of ENOENT on

pull-request: bpf 2019-04-25

2019-04-25 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) the bpf verifier fix to properly mark registers in all stack frames, from Paul. 2) preempt_enable_no_resched->preempt_enable fix, from Peter. 3) other misc fixes. Please consider pulling t

[PATCH v2 bpf-next 3/6] bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing

2019-04-25 Thread Martin KaFai Lau
This patch supports probing for the new BPF_MAP_TYPE_SK_STORAGE. BPF_MAP_TYPE_SK_STORAGE enforces BTF usage, so the new probe requires to create and load a BTF also. Signed-off-by: Martin KaFai Lau --- tools/bpf/bpftool/map.c | 1 + tools/lib/bpf/libbpf_probes.c | 74 +

[PATCH v2 bpf-next 2/6] bpf: Sync bpf.h to tools

2019-04-25 Thread Martin KaFai Lau
This patch sync the bpf.h to tools/. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 44 +- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 704bb69514a2..be08e

[PATCH v2 bpf-next 1/6] bpf: Introduce bpf sk local storage

2019-04-25 Thread Martin KaFai Lau
After allowing a bpf prog to - directly read the skb->sk ptr - get the fullsock bpf_sock by "bpf_sk_fullsock()" - get the bpf_tcp_sock by "bpf_tcp_sock()" - get the listener sock by "bpf_get_listener_sock()" - avoid duplicating the fields of "(bpf_)sock" and "(bpf_)tcp_sock" into different bpf ru

[PATCH v2 bpf-next 4/6] bpf: Add verifier tests for the bpf_sk_storage

2019-04-25 Thread Martin KaFai Lau
This patch adds verifier tests for the bpf_sk_storage: 1. ARG_PTR_TO_MAP_VALUE_OR_NULL 2. Map and helper compatibility (e.g. disallow bpf_map_loookup_elem) It also takes this chance to remove the unused struct btf_raw_data. Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/test_ve

[PATCH v2 bpf-next 6/6] bpf: Add ene-to-end test for bpf_sk_storage_* helpers

2019-04-25 Thread Martin KaFai Lau
This patch rides on an existing BPF_PROG_TYPE_CGROUP_SKB test (test_sock_fields.c) to do a TCP end-to-end test on the new bpf_sk_storage_* helpers. Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/bpf_helpers.h | 5 + .../bpf/progs/test_sock_fields_kern.c | 49 +

[PATCH v2 bpf-next 5/6] bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps

2019-04-25 Thread Martin KaFai Lau
This patch adds BPF_MAP_TYPE_SK_STORAGE test to test_maps. The src file is rather long, so it is put into another dir map_tests/ and compile like the current prog_tests/ does. Other existing tests in test_maps can also be re-factored into map_tests/ in the future. Signed-off-by: Martin KaFai Lau

[PATCH v2 bpf-next 0/6] BPF sk local storage

2019-04-25 Thread Martin KaFai Lau
v2: - Add the "test_maps.h" file in patch 5 This series introduces the BPF sk local storage. The details is in the patch 1 commit message. Martin KaFai Lau (6): bpf: Introduce bpf sk local storage bpf: Sync bpf.h to tools bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing bpf: Add v

Re: [PATCH iproute2-next] ss: add option to print socket information on one line

2019-04-25 Thread Eric Dumazet
On 4/25/19 3:59 PM, Stephen Hemminger wrote: > I agree with this, but probably time to give ss a json output as well. Yes, this might be quite nice. (Although I am not sure of what extra cpu costs would be involved, when dealing with million of sockets per dump)

Re: [PATCH iproute2-next] ss: add option to print socket information on one line

2019-04-25 Thread Josh Hunt
On 4/25/19 3:59 PM, Stephen Hemminger wrote: On Thu, 25 Apr 2019 17:21:48 -0400 Josh Hunt wrote: Multi-line output in ss makes it difficult to search for things with grep. This new option will make it easier to find sockets matching certain criteria with simple grep commands. Example without

Re: [PATCH iproute2-next] ss: add option to print socket information on one line

2019-04-25 Thread Stephen Hemminger
On Thu, 25 Apr 2019 17:21:48 -0400 Josh Hunt wrote: > Multi-line output in ss makes it difficult to search for things with > grep. This new option will make it easier to find sockets matching > certain criteria with simple grep commands. > > Example without option: > $ ss -emoitn > State Re

[RFC] ifa_list needs proper rcu protection

2019-04-25 Thread Eric Dumazet
It looks that unless RTNL is held, accessing ifa_list needs proper RCU protection ? indev->ifa_list can be changed under us by another cpu (which owns RTNL) Lets took an example. (A proper rcu_dereference() with an happy sparse support would require adding __rcu attribute, I put a READ_ONCE()

Re: TC stats / hw offload question

2019-04-25 Thread Pablo Neira Ayuso
On Thu, Apr 25, 2019 at 02:23:08PM +0100, Edward Cree wrote: > On 24/04/2019 16:03, Edward Cree wrote: > > static int efx_tc_flower_replace(struct efx_nic *efx, > >                 struct net_device *net_dev, > >                             struct tc_cls_flower_offload *tc) >

[PATCH v4 bpf-next 4/4] bpftool: fix indendation in bash-completion/bpftool

2019-04-25 Thread Andrii Nakryiko
Fix misaligned default case branch for `prog dump` sub-command. Reported-by: Quentin Monnet Cc: Yonghong Song Reviewed-by: Quentin Monnet Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/bash-completion/bpftool | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-)

[PATCH v4 bpf-next 3/4] bpftool: add bash completions for btf command

2019-04-25 Thread Andrii Nakryiko
Add full support for btf command in bash-completion script. Cc: Quentin Monnet Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Daniel Borkmann Reviewed-by: Quentin Monnet Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/bash-completion/bpftool | 46 +++ 1 file changed,

[PATCH v4 bpf-next 0/4] add btf dumping to bpftool

2019-04-25 Thread Andrii Nakryiko
This patch set adds a new `bpftool btf dump` sub-command, which allows to dump BTF contents (only types for now). Currently it only outputs low-level content, almost 1:1 with binary BTF format, but follow up patches will add ability to dump BTF types as a compilable C header file. JSON output is su

[PATCH v4 bpf-next 2/4] bpftool/docs: add btf sub-command documentation

2019-04-25 Thread Andrii Nakryiko
Document usage and sample output format for `btf dump` sub-command. Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: Yonghong Song Cc: Martin KaFai Lau Cc: Song Liu Cc: Arnaldo Carvalho de Melo Acked-by: Yonghong Song Signed-off-by: Andrii Nakryiko --- .../bpf/bpftool/Documentation/bpftool-

[PATCH v4 bpf-next 1/4] bpftool: add ability to dump BTF types

2019-04-25 Thread Andrii Nakryiko
Add new `btf dump` sub-command to bpftool. It allows to dump human-readable low-level BTF types representation of BTF types. BTF can be retrieved from few different sources: - from BTF object by ID; - from PROG, if it has associated BTF; - from MAP, if it has associated BTF data; it's possibl

Re: [PATCH v3 bpf-next 2/4] bpftool/docs: add btf sub-command documentation

2019-04-25 Thread Andrii Nakryiko
On Thu, Apr 25, 2019 at 12:20 PM Quentin Monnet wrote: > > 2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko > > Document usage and sample output format for `btf dump` sub-command. > > > > Cc: Daniel Borkmann > > Cc: Alexei Starovoitov > > Cc: Yonghong Song > > Cc: Martin KaFai Lau > > Cc: Song Liu

Re: [patch net-next v4 00/16] netdevsim: implement proper device model

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 15:59:40 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently the model of netdevsim is a bit odd in multiple ways. > 1) devlink instance is not in any way related with actual netdevsim >netdevices. Instead, it is created per-namespace. > 2) multi-port netdevsim devic

Re: 32-bit zext time complexity (Was Re: [PATCH bpf-next] selftests/bpf: two scale tests)

2019-04-25 Thread Alexei Starovoitov
On Thu, Apr 25, 2019 at 08:25:44AM +0100, Jiong Wang wrote: > > Alexei Starovoitov writes: > > > On Thu, Apr 25, 2019 at 12:07:06AM +0100, Jiong Wang wrote: > >> > >> Alexei Starovoitov writes: > >> > >> > Add two tests to check that sequence of 1024 jumps is verifiable. > >> > > >> > Signed-of

Re: [PATCH v3 bpf-next 1/4] bpftool: add ability to dump BTF types

2019-04-25 Thread Andrii Nakryiko
On Thu, Apr 25, 2019 at 12:20 PM Quentin Monnet wrote: > > 2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko > > Add new `btf dump` sub-command to bpftool. It allows to dump > > human-readable low-level BTF types representation of BTF types. BTF can > > be retrieved from few different sources: > >-

Re: [PATCH v3 bpf-next 0/4] add btf dumping to bpftool

2019-04-25 Thread Andrii Nakryiko
On Thu, Apr 25, 2019 at 12:20 PM Quentin Monnet wrote: > > 2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko > > This patch set adds a new `bpftool btf dump` sub-command, which allows to > > dump > > BTF contents (only types for now). Currently it only outputs low-level > > content, almost 1:1 with bi

Re: [PATCH bpf-next v5 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-25 Thread Daniel Borkmann
On 04/25/2019 11:37 PM, Stanislav Fomichev wrote: > target_fd is target namespace. If there is a flow dissector BPF program > attached to that namespace, its (single) id is returned. > > v5: > * drop net ref right after rcu unlock (Daniel Borkmann) > > v4: > * add missing put_net (Jann Horn) > >

Re: [PATCH] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX

2019-04-25 Thread Daniel Borkmann
On 04/23/2019 10:24 PM, Daniel T. Lee wrote: > Currently, building bpf samples will cause the following error. > > ./tools/lib/bpf/bpf.h:132:27: error: 'UINT32_MAX' undeclared here (not in > a function) .. > #define BPF_LOG_BUF_SIZE (UINT32_MAX >> 8) /* verifier maximum in > kernels <=

Re: [PATCH] samples: bpf: add hbm sample to .gitignore

2019-04-25 Thread Daniel Borkmann
On 04/25/2019 11:02 AM, Daniel T. Lee wrote: > This commit adds hbm to .gitignore which is > currently ommited from the ignore file. > > Signed-off-by: Daniel T. Lee Applied, thanks.

[PATCH bpf-next v5 2/2] bpftool: show flow_dissector attachment status

2019-04-25 Thread Stanislav Fomichev
Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \ /sys/fs/bpf/flow type flow_dissector \

[PATCH bpf-next v5 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-25 Thread Stanislav Fomichev
target_fd is target namespace. If there is a flow dissector BPF program attached to that namespace, its (single) id is returned. v5: * drop net ref right after rcu unlock (Daniel Borkmann) v4: * add missing put_net (Jann Horn) v3: * add missing inline to skb_flow_dissector_prog_query static def

Re: [PATCH bpf-next v4 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-25 Thread Stanislav Fomichev
On Thu, Apr 25, 2019 at 2:21 PM Daniel Borkmann wrote: > > On 04/24/2019 11:31 PM, Stanislav Fomichev wrote: > > target_fd is target namespace. If there is a flow dissector BPF program > > attached to that namespace, its (single) id is returned. > > > > v4: > > * add missing put_net (Jann Horn) >

[PATCH iproute2-next] ss: add option to print socket information on one line

2019-04-25 Thread Josh Hunt
Multi-line output in ss makes it difficult to search for things with grep. This new option will make it easier to find sockets matching certain criteria with simple grep commands. Example without option: $ ss -emoitn State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB

Re: [PATCH bpf-next v4 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-25 Thread Daniel Borkmann
On 04/24/2019 11:31 PM, Stanislav Fomichev wrote: > target_fd is target namespace. If there is a flow dissector BPF program > attached to that namespace, its (single) id is returned. > > v4: > * add missing put_net (Jann Horn) > > v3: > * add missing inline to skb_flow_dissector_prog_query static

Re: [PATCH bpf v3 0/2] bpf: mark registers in all frames after pkt/null checks

2019-04-25 Thread Daniel Borkmann
On 04/25/2019 10:46 PM, Alexei Starovoitov wrote: > On Wed, Apr 24, 2019 at 09:49:58PM +0200, Paul Chaignon wrote: >> In case of a null check on a pointer inside a subprog, we should mark all >> registers with this pointer as either safe or unknown, in both the current >> and previous frames. Curr

Re: [PATCH bpf-next 0/2] Two libbpf fixes

2019-04-25 Thread Alexei Starovoitov
On Tue, Apr 23, 2019 at 3:46 PM Daniel Borkmann wrote: > > Two small fixes in relation to global data handling. Thanks! Applied. Thanks!

Re: [PATCH bpf v3 0/2] bpf: mark registers in all frames after pkt/null checks

2019-04-25 Thread Alexei Starovoitov
On Wed, Apr 24, 2019 at 09:49:58PM +0200, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the cu

Re: [PATCH 1/1] be2net: Detach interface for avoiding a system crash

2019-04-25 Thread Saeed Mahameed
On Wed, 2019-04-24 at 13:53 +0800, Firo wrote: > > On 4/20/19 6:31 AM, Saeed Mahameed wrote: > > On Fri, 2019-04-19 at 21:07 +0800, Firo wrote: > > > On 4/19/19 2:17 AM, Saeed Mahameed wrote: > > > > On Thu, 2019-04-18 at 15:05 +0800, Firo wrote: > > > > > On 4/2/19 12:25 AM, Saeed Mahameed wrote:

Re: [PATCH net-next v2 0/4] net/tls: small code cleanup

2019-04-25 Thread Saeed Mahameed
On Thu, 2019-04-25 at 12:32 -0700, Jakub Kicinski wrote: > Hi! > > This small patch set cleans up tls (mostly offload parts). > Other than avoiding unnecessary error messages - no functional > changes here. > > v2 (Saeed): > - fix up Review tags; > - remove the warning on failure completely. >

Re: [PATCH net-next 4/4] net/tls: byte swap device req TCP seq no upon setting

2019-04-25 Thread Saeed Mahameed
On Thu, 2019-04-25 at 12:38 -0700, Jakub Kicinski wrote: > On Thu, 25 Apr 2019 19:31:51 +, Saeed Mahameed wrote: > > > diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c > > > index cb368efe3567..6686013b4e9e 100644 > > > --- a/net/tls/tls_device.c > > > +++ b/net/tls/tls_device.c > > > @

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Jesper Dangaard Brouer
On Thu, 25 Apr 2019 20:54:11 +0200 Maciej Fijalkowski wrote: > On Thu, 25 Apr 2019 11:44:27 -0600 > David Ahern wrote: > > > On 4/25/19 11:41 AM, Jesper Dangaard Brouer wrote: > > > On Thu, 25 Apr 2019 13:03:39 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > >> On Thu, Apr 25, 2019 at

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread David Ahern
On 4/25/19 12:54 PM, Maciej Fijalkowski wrote: >> >> virtio_net hits this because of: >>xdp_prog = rcu_dereference(rq->xdp_prog); >> >> in its ndo_xdp_xmit. Scanning ndo_xdp_xmit for other nics does not show >> this same check. Is it really required? If so, why don't other drivers >> do it? >

Re: [bpf PATCH v2 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 12:35:58 -0700, John Fastabend wrote: > On 4/25/19 12:32 PM, John Fastabend wrote: > > On 4/25/19 12:29 PM, Jakub Kicinski wrote: > >> On Thu, 25 Apr 2019 09:03:08 -0700, John Fastabend wrote: > >>> +static void tls_sk_proto_unhash(struct sock *sk) > >>> +{ > >>> + struct tl

Re: [PATCH net-next 4/4] net/tls: byte swap device req TCP seq no upon setting

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 19:31:51 +, Saeed Mahameed wrote: > > diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c > > index cb368efe3567..6686013b4e9e 100644 > > --- a/net/tls/tls_device.c > > +++ b/net/tls/tls_device.c > > @@ -567,7 +567,7 @@ void (struct sock *sk, u32 > > seq, u64 rcd_sn) >

Re: [bpf PATCH v2 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-25 Thread John Fastabend
On 4/25/19 12:32 PM, John Fastabend wrote: > On 4/25/19 12:29 PM, Jakub Kicinski wrote: >> On Thu, 25 Apr 2019 09:03:08 -0700, John Fastabend wrote: >>> +static void tls_sk_proto_unhash(struct sock *sk) >>> +{ >>> + struct tls_context *ctx = tls_get_ctx(sk); >>> + void (*sk_proto_unhash)(struct

[PATCH net-next v2 3/4] net/tls: move definition of tls ops into net/tls.h

2019-04-25 Thread Jakub Kicinski
There seems to be no reason for tls_ops to be defined in netdevice.h which is included in a lot of places. Don't wrap the struct/enum declaration in ifdefs, it trickles down unnecessary ifdefs into driver code. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/netdevice

[PATCH net-next v2 0/4] net/tls: small code cleanup

2019-04-25 Thread Jakub Kicinski
Hi! This small patch set cleans up tls (mostly offload parts). Other than avoiding unnecessary error messages - no functional changes here. v2 (Saeed): - fix up Review tags; - remove the warning on failure completely. Jakub Kicinski (4): net/tls: don't log errors every time offload can't pro

Re: [bpf PATCH v2 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-25 Thread John Fastabend
On 4/25/19 12:29 PM, Jakub Kicinski wrote: > On Thu, 25 Apr 2019 09:03:08 -0700, John Fastabend wrote: >> +static void tls_sk_proto_unhash(struct sock *sk) >> +{ >> +struct tls_context *ctx = tls_get_ctx(sk); >> +void (*sk_proto_unhash)(struct sock *sk); >> +bool free_ctx; >> + >> +

[PATCH net-next v2 2/4] net/tls: remove old exports of sk_destruct functions

2019-04-25 Thread Jakub Kicinski
tls_device_sk_destruct being set on a socket used to indicate that socket is a kTLS device one. That is no longer true - now we use sk_validate_xmit_skb pointer for that purpose. Remove the export. tls_device_attach() needs to be moved. While at it, remove the dead declaration of tls_sk_destruct

[PATCH net-next v2 4/4] net/tls: byte swap device req TCP seq no upon setting

2019-04-25 Thread Jakub Kicinski
To avoid a sparse warning byteswap the be32 sequence number before it's stored in the atomic value. While at it drop unnecessary brackets and use kernel's u64 type. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/net/tls.h| 2 +- net/tls/tls_device.c | 2 +- 2 files cha

[PATCH net-next v2 1/4] net/tls: don't log errors every time offload can't proceed

2019-04-25 Thread Jakub Kicinski
Currently when CONFIG_TLS_DEVICE is set each time kTLS connection is opened and the offload is not successful (either because the underlying device doesn't support it or e.g. it's tables are full) a rate limited error will be printed to the logs. There is nothing wrong with failing TLS offload. S

Re: [PATCH net-next 4/4] net/tls: byte swap device req TCP seq no upon setting

2019-04-25 Thread Saeed Mahameed
On Thu, 2019-04-25 at 09:56 -0700, Jakub Kicinski wrote: > To avoid a sparse warning byteswap the be32 sequence number > before it's stored in the atomic value. While at it drop > unnecessary brackets and use kernel's u64 type. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Reviewed-by: Simon

Re: [bpf PATCH v2 1/3] bpf: tls, implement unhash to avoid transition out of ESTABLISHED

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 09:03:08 -0700, John Fastabend wrote: > +static void tls_sk_proto_unhash(struct sock *sk) > +{ > + struct tls_context *ctx = tls_get_ctx(sk); > + void (*sk_proto_unhash)(struct sock *sk); > + bool free_ctx; > + > + if (!ctx) > + return sk->sk_prot->un

Re: [PATCH net-next 3/4] net/tls: move definition of tls ops into net/tls.h

2019-04-25 Thread Saeed Mahameed
On Thu, 2019-04-25 at 09:56 -0700, Jakub Kicinski wrote: > There seems to be no reason for tls_ops to be defined in netdevice.h > which is included in a lot of places. Don't wrap the struct/enum > declaration in ifdefs, it trickles down unnecessary ifdefs into > driver code. > > Signed-off-by: Ja

Re: [PATCH v3 bpf-next 4/4] bpftool: fix indendation in bash-completion/bpftool

2019-04-25 Thread Quentin Monnet
2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko Fix misaligned default case branch for `prog dump` sub-command. Reported-by: Quentin Monnet Cc: Yonghong Song Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/bash-completion/bpftool | 22 +++--- 1 file changed, 11 insertions

Re: [PATCH v3 bpf-next 3/4] bpftool: add bash completions for btf command

2019-04-25 Thread Quentin Monnet
2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko Add full support for btf command in bash-completion script. Cc: Quentin Monnet Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: Andrii Nakryiko --- tools/bpf/bpftool/bash-completion/bpftool | 46 ++

Re: [PATCH v3 bpf-next 2/4] bpftool/docs: add btf sub-command documentation

2019-04-25 Thread Quentin Monnet
2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko Document usage and sample output format for `btf dump` sub-command. Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: Yonghong Song Cc: Martin KaFai Lau Cc: Song Liu Cc: Arnaldo Carvalho de Melo Acked-by: Yonghong Song Signed-off-by: Andrii Nakryi

Re: [PATCH v3 bpf-next 1/4] bpftool: add ability to dump BTF types

2019-04-25 Thread Quentin Monnet
2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko Add new `btf dump` sub-command to bpftool. It allows to dump human-readable low-level BTF types representation of BTF types. BTF can be retrieved from few different sources: - from BTF object by ID; - from PROG, if it has associated BTF; - fro

Re: [PATCH v3 bpf-next 0/4] add btf dumping to bpftool

2019-04-25 Thread Quentin Monnet
2019-04-25 09:55 UTC-0700 ~ Andrii Nakryiko This patch set adds a new `bpftool btf dump` sub-command, which allows to dump BTF contents (only types for now). Currently it only outputs low-level content, almost 1:1 with binary BTF format, but follow up patches will add ability to dump BTF types a

Re: [PATCH net-next 1/4] net/tls: don't log errors every time offload can't proceed

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 18:37:19 +, Saeed Mahameed wrote: > On Thu, 2019-04-25 at 09:56 -0700, Jakub Kicinski wrote: > > Currently when CONFIG_TLS_DEVICE is set each time kTLS > > connection is opened and the offload is not successful > > (either because the underlying device doesn't support > > it

Re: [bpf PATCH v2 0/3] sockmap/ktls fixes

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 11:49:18 -0700, John Fastabend wrote: > On 4/25/19 11:30 AM, Jakub Kicinski wrote: > > On Thu, 25 Apr 2019 09:02:50 -0700, John Fastabend wrote: > >> Series of fixes for sockmap and ktls, see patches for descriptions. > >> > >> v2: fix build issue for CONFIG_TLS_DEVICE and fix

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Maciej Fijalkowski
On Thu, 25 Apr 2019 11:44:27 -0600 David Ahern wrote: > On 4/25/19 11:41 AM, Jesper Dangaard Brouer wrote: > > On Thu, 25 Apr 2019 13:03:39 -0400 > > "Michael S. Tsirkin" wrote: > > > >> On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: > >>> On 2019/04/25 2:37, Michael S. Ts

Re: [bpf PATCH v2 0/3] sockmap/ktls fixes

2019-04-25 Thread John Fastabend
On 4/25/19 11:30 AM, Jakub Kicinski wrote: > On Thu, 25 Apr 2019 09:02:50 -0700, John Fastabend wrote: >> Series of fixes for sockmap and ktls, see patches for descriptions. >> >> v2: fix build issue for CONFIG_TLS_DEVICE and fixup couple comments from >> Jakub. > > Ah, right my comment about

Re: [PATCH net-next 1/4] net/tls: don't log errors every time offload can't proceed

2019-04-25 Thread Saeed Mahameed
On Thu, 2019-04-25 at 09:56 -0700, Jakub Kicinski wrote: > Currently when CONFIG_TLS_DEVICE is set each time kTLS > connection is opened and the offload is not successful > (either because the underlying device doesn't support > it or e.g. it's tables are full) a rate limited error > will be printe

Re: [bpf PATCH v2 0/3] sockmap/ktls fixes

2019-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2019 09:02:50 -0700, John Fastabend wrote: > Series of fixes for sockmap and ktls, see patches for descriptions. > > v2: fix build issue for CONFIG_TLS_DEVICE and fixup couple comments from > Jakub. Ah, right my comment about the rx side sleeping was fairly nonsensical, the loc

Re: [PATCH 1/2] spi: Micrel eth switch: declare missing of table

2019-04-25 Thread Mark Brown
On Tue, Apr 23, 2019 at 07:33:10PM +0200, Heiner Kallweit wrote: > Except having "switch" in the name this driver is solely a SPI driver > and it uses no network code at all. And it has no dependency on any > network driver. Therefore I wouldn't consider it a network driver. > Else any functionali

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread David Ahern
On 4/25/19 11:41 AM, Jesper Dangaard Brouer wrote: > On Thu, 25 Apr 2019 13:03:39 -0400 > "Michael S. Tsirkin" wrote: > >> On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: >>> On 2019/04/25 2:37, Michael S. Tsirkin wrote: On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Aher

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Jesper Dangaard Brouer
On Thu, 25 Apr 2019 13:03:39 -0400 "Michael S. Tsirkin" wrote: > On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: > > On 2019/04/25 2:37, Michael S. Tsirkin wrote: > > > On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: > > >> seeing an RCU warning testing xdp with

Re: [bpf-next PATCH] bpf: sockmap, test tool support to skip cgroup arg

2019-04-25 Thread Andrii Nakryiko
On Thu, Apr 25, 2019 at 12:19 AM John Fastabend wrote: > > Its handy to not have to setup a cgroup environment when running > test_sockmap with user specified options. This patch setups a cgroup > environment, similar to how it is done with the auto test suite, when > the user does not provide a c

Re: [PATCH net-next] net: phy: bcm87xx: improve feature configuration

2019-04-25 Thread Heiner Kallweit
On 19.04.2019 01:30, David Miller wrote: > From: Heiner Kallweit > Date: Wed, 17 Apr 2019 00:06:28 +0200 > >> This driver is the only user of PHY_10GBIT_FEC_FEATURES. So we may be >> able to remove this predefined feature constant later. Setting >> phydev->advertising to what is supported is done

Re: [PATCH 0/5] isdn: deprecate non-mISDN drivers

2019-04-25 Thread Paul Bolle
Arnd Bergmann schreef op do 25-04-2019 om 13:08 [+0200]: > The gigaset driver is similar here, you can use it for any kind of wireless > ISDN > communication, Nit: the wireless part is strictly DECT (for the M101 and M105 hardware). > but apparently there is little use for that without a physica

Re: [PATCH net-next] ibmvnic: Add device identification to requested IRQs

2019-04-25 Thread Thomas Falcon
On 4/25/19 9:02 AM, Murilo Fossa Vicentini wrote: The ibmvnic driver currently uses the same fixed name when using request_irq, this makes it hard to parse when multiple VNIC devices are available at the same time. This patch adds the unit_address as the device identification along with an id f

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: > On 2019/04/25 2:37, Michael S. Tsirkin wrote: > > On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: > >> seeing an RCU warning testing xdp with virtio net. net-next as of commit > >> b2f97f7de2f6a4df8e431330cf467576486651

[PATCH net-next 2/4] net/tls: remove old exports of sk_destruct functions

2019-04-25 Thread Jakub Kicinski
tls_device_sk_destruct being set on a socket used to indicate that socket is a kTLS device one. That is no longer true - now we use sk_validate_xmit_skb pointer for that purpose. Remove the export. tls_device_attach() needs to be moved. While at it, remove the dead declaration of tls_sk_destruct

[PATCH net-next 3/4] net/tls: move definition of tls ops into net/tls.h

2019-04-25 Thread Jakub Kicinski
There seems to be no reason for tls_ops to be defined in netdevice.h which is included in a lot of places. Don't wrap the struct/enum declaration in ifdefs, it trickles down unnecessary ifdefs into driver code. Signed-off-by: Jakub Kicinski Reviewed-by: Reviewed-by: Simon Horman --- include/li

[PATCH net-next 4/4] net/tls: byte swap device req TCP seq no upon setting

2019-04-25 Thread Jakub Kicinski
To avoid a sparse warning byteswap the be32 sequence number before it's stored in the atomic value. While at it drop unnecessary brackets and use kernel's u64 type. Signed-off-by: Jakub Kicinski Reviewed-by: Reviewed-by: Simon Horman --- include/net/tls.h| 2 +- net/tls/tls_device.c | 2 +-

[PATCH net-next 1/4] net/tls: don't log errors every time offload can't proceed

2019-04-25 Thread Jakub Kicinski
Currently when CONFIG_TLS_DEVICE is set each time kTLS connection is opened and the offload is not successful (either because the underlying device doesn't support it or e.g. it's tables are full) a rate limited error will be printed to the logs. There is nothing wrong with failing TLS offload. S

[PATCH net-next 0/4] net/tls: small code cleanup

2019-04-25 Thread Jakub Kicinski
Hi! This small patch set cleans up tls (mostly offload parts). Other than avoiding unnecessary error messages - no functional changes here. Jakub Kicinski (4): net/tls: don't log errors every time offload can't proceed net/tls: remove old exports of sk_destruct functions net/tls: move defin

Re: [PATCH net-next] ibmvnic: Add device identification to requested IRQs

2019-04-25 Thread Mauro Rodrigues
On Thu, Apr 25, 2019 at 11:02:33AM -0300, Murilo Fossa Vicentini wrote: > The ibmvnic driver currently uses the same fixed name when using > request_irq, this makes it hard to parse when multiple VNIC devices are > available at the same time. This patch adds the unit_address as the device > identif

Re: [PATCH v2 bpf-next 3/3] bpftool: add bash completions for btf command

2019-04-25 Thread Andrii Nakryiko
On Thu, Apr 25, 2019 at 9:33 AM Quentin Monnet wrote: > > 2019-04-25 09:14 UTC-0700 ~ Andrii Nakryiko > > On Thu, Apr 25, 2019 at 4:15 AM Quentin Monnet > > wrote: > >> > >> 2019-04-24 22:03 UTC-0700 ~ > >>> From: Andrii Nakryiko > >>> > >>> Add full support for btf command in bash-completion

Re: [PATCH v2 bpf-next 3/3] bpftool: add bash completions for btf command

2019-04-25 Thread Quentin Monnet
2019-04-25 09:14 UTC-0700 ~ Andrii Nakryiko > On Thu, Apr 25, 2019 at 4:15 AM Quentin Monnet > wrote: >> >> 2019-04-24 22:03 UTC-0700 ~ >>> From: Andrii Nakryiko >>> >>> Add full support for btf command in bash-completion script. >>> >>> Cc: Quentin Monnet >>> Cc: Yonghong Song >>> Cc: Daniel

[PATCH net-next 1/8] s390: qeth: address type mismatch warning

2019-04-25 Thread Julian Wiedmann
From: Arnd Bergmann clang produces a harmless warning for each use for the qeth_adp_supported macro: drivers/s390/net/qeth_l2_main.c:559:31: warning: implicit conversion from enumeration type 'enum qeth_ipa_setadp_cmd' to different enumeration type 'enum qeth_ipa_funcs' [-Wenum-conversion

[PATCH net-next 5/8] s390/qeth: don't clear Output buffers on every queue init

2019-04-25 Thread Julian Wiedmann
On the first initialization of a queue, its Output Buffers are in a clean state with no attached resources. On every subsequent initialization, qeth_l?_stop_card() has previously put them in a clean state via qeth_drain_output_queues(). So the call to qeth_clear_output_buffer() is redundant and can

  1   2   >