Re: [PATCH iproute2-rc 1/8] rdma: Update uapi headers to add statistic counter support

2019-07-15 Thread Leon Romanovsky
On Mon, Jul 15, 2019 at 01:52:38PM -0700, Stephen Hemminger wrote: > On Wed, 10 Jul 2019 10:24:48 +0300 > Leon Romanovsky wrote: > > > From: Mark Zhang > > > > Update rdma_netlink.h to kernel commit 6e7be47a5345 ("RDMA/nldev: > > Allow get default counter statistics through RDMA netlink"). > > >

[PATCH] net: ethernet: mediatek: mtk_eth_soc: Add of_node_put() before goto

2019-07-15 Thread Nishka Dasgupta
Each iteration of for_each_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the goto. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/net/ethernet/medi

[PATCH] net: ethernet: mscc: ocelot_board: Add of_node_put() before return

2019-07-15 Thread Nishka Dasgupta
Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return in two places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --

[PATCH] net: ethernet: ti: cpsw: Add of_node_put() before return and break

2019-07-15 Thread Nishka Dasgupta
Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a return or break from the middle of the loop, there is no put, thus causing a memory leak. Hence, for function cpsw_probe_dt, create an extra label err_node_put that puts the last used node and returns re

Re: [PATCH bpf] bpf: net: Set sk_bpf_storage back to NULL for cloned sk

2019-07-15 Thread Martin Lau
On Tue, Jul 09, 2019 at 09:33:21AM -0700, Stanislav Fomichev wrote: > On 06/11, Martin KaFai Lau wrote: > > The cloned sk should not carry its parent-listener's sk_bpf_storage. > > This patch fixes it by setting it back to NULL. > Have you thought about some kind of inheritance for listener sockets

[PATCH bpf] libbpf: fix another GCC8 warning for strncpy

2019-07-15 Thread Andrii Nakryiko
Similar issue was fixed in cdfc7f888c2a ("libbpf: fix GCC8 warning for strncpy") already. This one was missed. Fixing now. Cc: Magnus Karlsson Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/xsk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/xsk.c b/tools

[PATCH] qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/

2019-07-15 Thread Benjamin Poirier
The hardware has been declared EOL by the vendor more than 5 years ago. What's more relevant to the Linux kernel is that the quality of this driver is not on par with many other mainline drivers. Cc: Manish Chopra Message-id: <20190617074858.32467-1-bpoir...@suse.com> Signed-off-by: Benjamin Poir

Re: [PATCH net-next v2 0/7] net/rds: RDMA fixes

2019-07-15 Thread Gerd Rausch
Hi David, This was a followup to the patch-series that I had already sent. I'll re-write the Subject-prefix and re-submit it for "net". Sorry for the noise, Gerd On 15/07/2019 19.05, David Miller wrote: > > net-next is closed, and why are you submitting bug fixes for net-next > when 'net' is

Re: [PATCH net-next v2 0/7] net/rds: RDMA fixes

2019-07-15 Thread David Miller
net-next is closed, and why are you submitting bug fixes for net-next when 'net' is the appropriate tree to target for that purpose?

Re: [PATCH iproute2 net-next v3 3/5] taprio: add support for setting txtime_delay.

2019-07-15 Thread Patel, Vedang
> On Jul 15, 2019, at 4:38 PM, Stephen Hemminger > wrote: > > On Mon, 15 Jul 2019 15:51:42 -0700 > Vedang Patel wrote: > >> +if (get_s32(&txtime_delay, *argv, 0)) { > > Is txtime_delay of a negative value meaningful? No, txtime-delay should always be a positive value.

Re: [PATCH iproute2 net-next v3 2/5] taprio: Add support for setting flags

2019-07-15 Thread Patel, Vedang
Hi Stephen, > On Jul 15, 2019, at 4:37 PM, Stephen Hemminger > wrote: > > On Mon, 15 Jul 2019 15:51:41 -0700 > Vedang Patel wrote: > >> @@ -405,6 +420,7 @@ static int taprio_print_opt(struct qdisc_util *qu, FILE >> *f, struct rtattr *opt) >> struct rtattr *tb[TCA_TAPRIO_ATTR_MAX + 1]; >

[PATCH net-next v2 0/7] net/rds: RDMA fixes

2019-07-15 Thread Gerd Rausch
A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. Gerd Rausch (7): net/rds: Give fr_state a chance to transition to FRMR_IS_FREE net/rds: Get rid of "wait_clean_list_grace" and add locking net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) tr

Re: [PATCH iproute2 net-next v3 2/5] taprio: Add support for setting flags

2019-07-15 Thread Jakub Kicinski
On Mon, 15 Jul 2019 17:24:22 -0700, Stephen Hemminger wrote: > On Mon, 15 Jul 2019 17:15:15 -0700 > Jakub Kicinski wrote: > > On Mon, 15 Jul 2019 16:37:43 -0700, Stephen Hemminger wrote: > > > On Mon, 15 Jul 2019 15:51:41 -0700 > > > Vedang Patel wrote: > > > > @@ -442,6 +458,11 @@ static i

[bpf-next RFC 1/6] tcp: tcp_syn_flood_action read port from socket

2019-07-15 Thread Petar Penkov
From: Petar Penkov This allows us to call this function before an SKB has been allocated. Signed-off-by: Petar Penkov --- net/ipv4/tcp_input.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c21e8a22fb3b..8892df6de1d

[bpf-next RFC 2/6] tcp: add skb-less helpers to retrieve SYN cookie

2019-07-15 Thread Petar Penkov
From: Petar Penkov This patch allows generation of a SYN cookie before an SKB has been allocated, as is the case at XDP. Signed-off-by: Petar Penkov --- include/net/tcp.h| 11 ++ net/ipv4/tcp_input.c | 79 net/ipv4/tcp_ipv4.c | 8 + ne

[bpf-next RFC 4/6] bpf: sync bpf.h to tools/

2019-07-15 Thread Petar Penkov
From: Petar Penkov Sync updated documentation for bpf_redirect_map. Sync the bpf_tcp_gen_syncookie helper function definition with the one in tools/uapi. Signed-off-by: Petar Penkov --- tools/include/uapi/linux/bpf.h | 37 +++--- 1 file changed, 34 insertions(+), 3

[bpf-next RFC 0/6] Introduce a BPF helper to generate SYN cookies

2019-07-15 Thread Petar Penkov
From: Petar Penkov This patch series introduces a BPF helper function that allows generating SYN cookies from BPF. The first two patches in the series modify several TCP helper functions to allow for SKB-less operation, as is the case with XDP. The third patch introduces the bpf_tcp_gen_syncook

[bpf-next RFC 6/6] selftests/bpf: add test for bpf_tcp_gen_syncookie

2019-07-15 Thread Petar Penkov
From: Petar Penkov Modify the existing bpf_tcp_check_syncookie test to also generate a SYN cookie, pass the packet to the kernel, and verify that the two cookies are the same (and both valid). Since cloned SKBs are skipped during generic XDP, this test does not issue a SYN cookie when run in XDP

[bpf-next RFC 5/6] selftests/bpf: bpf_tcp_gen_syncookie->bpf_helpers

2019-07-15 Thread Petar Penkov
From: Petar Penkov Expose bpf_tcp_gen_syncookie to selftests. Signed-off-by: Petar Penkov --- tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h index 5a3d92c8be

[bpf-next RFC 3/6] bpf: add bpf_tcp_gen_syncookie helper

2019-07-15 Thread Petar Penkov
From: Petar Penkov This helper function allows BPF programs to try to generate SYN cookies, given a reference to a listener socket. The function works from XDP and with an skb context since bpf_skc_lookup_tcp can lookup a socket in both cases. Signed-off-by: Petar Penkov Suggested-by: Eric Duma

Re: [PATCH iproute2 net-next v3 2/5] taprio: Add support for setting flags

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 17:15:15 -0700 Jakub Kicinski wrote: > On Mon, 15 Jul 2019 16:37:43 -0700, Stephen Hemminger wrote: > > On Mon, 15 Jul 2019 15:51:41 -0700 > > Vedang Patel wrote: > > > @@ -442,6 +458,11 @@ static int taprio_print_opt(struct qdisc_util *qu, > > > FILE *f, struct rtattr *op

Re: [pull request][net 0/3] Mellanox, mlx5 fixes 2019-07-15

2019-07-15 Thread David Miller
From: Saeed Mahameed Date: Mon, 15 Jul 2019 20:09:53 + > This pull request provides mlx5 TC flower and tunnel fixes for > kernel 5.2 from Eli and Vlad. > > Please pull and let me know if there is any problem. Pulled, thanks Saeed.

Re: [PATCH iproute2 net-next v3 2/5] taprio: Add support for setting flags

2019-07-15 Thread Jakub Kicinski
On Mon, 15 Jul 2019 16:37:43 -0700, Stephen Hemminger wrote: > On Mon, 15 Jul 2019 15:51:41 -0700 > Vedang Patel wrote: > > @@ -442,6 +458,11 @@ static int taprio_print_opt(struct qdisc_util *qu, > > FILE *f, struct rtattr *opt) > > > > print_string(PRINT_ANY, "clockid", "clockid %s", > >

Re: [PATCH iproute2 net-next v3 3/5] taprio: add support for setting txtime_delay.

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 15:51:42 -0700 Vedang Patel wrote: > + if (get_s32(&txtime_delay, *argv, 0)) { Is txtime_delay of a negative value meaningful?

Re: [PATCH iproute2 net-next v3 2/5] taprio: Add support for setting flags

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 15:51:41 -0700 Vedang Patel wrote: > @@ -405,6 +420,7 @@ static int taprio_print_opt(struct qdisc_util *qu, FILE > *f, struct rtattr *opt) > struct rtattr *tb[TCA_TAPRIO_ATTR_MAX + 1]; > struct tc_mqprio_qopt *qopt = 0; > __s32 clockid = CLOCKID_INVALID; > +

Re: [PATCH v2 bpf-next] selftests/bpf: remove logic duplication in test_verifier.c

2019-07-15 Thread Daniel Borkmann
On 7/12/19 7:44 PM, Andrii Nakryiko wrote: > test_verifier tests can specify single- and multi-runs tests. Internally > logic of handling them is duplicated. Get rid of it by making single run > retval/data specification to be a first run spec. > > Cc: Krzesimir Nowak > Signed-off-by: Andrii Nakr

Re: [RFC bpf-next 0/8] bpf: accelerate insn patching speed

2019-07-15 Thread Andrii Nakryiko
On Mon, Jul 15, 2019 at 3:55 PM Andrii Nakryiko wrote: > > On Mon, Jul 15, 2019 at 2:21 AM Jiong Wang wrote: > > > > > > Andrii Nakryiko writes: > > > > > On Thu, Jul 11, 2019 at 4:22 AM Jiong Wang > > > wrote: > > >> > > >> > > >> Andrii Nakryiko writes: > > >> > > >> > On Thu, Jul 4, 2019 at

Re: [RFC bpf-next 0/8] bpf: accelerate insn patching speed

2019-07-15 Thread Andrii Nakryiko
On Mon, Jul 15, 2019 at 2:21 AM Jiong Wang wrote: > > > Andrii Nakryiko writes: > > > On Thu, Jul 11, 2019 at 4:22 AM Jiong Wang wrote: > >> > >> > >> Andrii Nakryiko writes: > >> > >> > On Thu, Jul 4, 2019 at 2:31 PM Jiong Wang > >> > wrote: > >> >> > >> >> This is an RFC based on latest bpf-n

[PATCH iproute2 net-next v3 5/5] tc: taprio: Update documentation

2019-07-15 Thread Vedang Patel
Add documentation for the latest options, flags and txtime-delay, to the taprio manpage. This also adds an example to run tc in txtime offload mode. Signed-off-by: Vedang Patel --- man/man8/tc-taprio.8 | 40 1 file changed, 40 insertions(+) diff --git a

[PATCH iproute2 net-next v3 3/5] taprio: add support for setting txtime_delay.

2019-07-15 Thread Vedang Patel
This adds support for setting the txtime_delay parameter which is useful for the txtime offload mode of taprio. Signed-off-by: Vedang Patel --- tc/q_taprio.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tc/q_taprio.c b/tc/q_taprio.c index 930ecb9d1e

[PATCH iproute2 net-next v3 4/5] tc: etf: Add documentation for skip-skb-check.

2019-07-15 Thread Vedang Patel
Document the newly added option (skip-skb-check) on the etf man-page. Signed-off-by: Vedang Patel --- man/man8/tc-etf.8 | 10 ++ 1 file changed, 10 insertions(+) diff --git a/man/man8/tc-etf.8 b/man/man8/tc-etf.8 index 30a12de7d2c7..2e01a591dbaa 100644 --- a/man/man8/tc-etf.8 +++ b/man/

[PATCH iproute2 net-next v3 2/5] taprio: Add support for setting flags

2019-07-15 Thread Vedang Patel
From: Vinicius Costa Gomes This allows a new parameter, flags, to be passed to taprio. Currently, it only supports enabling the txtime-assist mode. But, we plan to add different modes for taprio (e.g. hardware offloading) and this parameter will be useful in enabling those modes. Signed-off-by:

[PATCH iproute2 net-next v3 1/5] etf: Add skip_sock_check

2019-07-15 Thread Vedang Patel
ETF Qdisc currently checks for a socket with SO_TXTIME socket option. If either is not present, the packet is dropped. In the future commits, we want other Qdiscs to add packet with launchtime to the ETF Qdisc. Also, there are some packets (e.g. ICMP packets) which may not have a socket associated

Re: [PATCH iproute2 net-next v2 1/6] Kernel header update for hardware offloading changes.

2019-07-15 Thread Patel, Vedang
Ok I will send out the patches again. Thanks, Vedang > On Jul 15, 2019, at 1:16 PM, David Ahern wrote: > > On 7/15/19 1:50 PM, Stephen Hemminger wrote: >> On Mon, 15 Jul 2019 19:40:19 + >> "Patel, Vedang" wrote: >> >>> Hi Stephen, >>> >>> The kernel patches corresponding to this series

Re: [PATCH bpf] selftests/bpf: put test_stub.o into $(OUTPUT)

2019-07-15 Thread Daniel Borkmann
On 7/12/19 3:59 PM, Ilya Leoshkevich wrote: > Add a rule to put test_stub.o in $(OUTPUT) and change the references to > it accordingly. This prevents test_stub.o from being created in the > source directory. > > Signed-off-by: Ilya Leoshkevich Applied, thanks!

Re: [PATCH bpf] samples/bpf: build with -D__TARGET_ARCH_$(SRCARCH)

2019-07-15 Thread Daniel Borkmann
On 7/15/19 11:11 AM, Ilya Leoshkevich wrote: > While $ARCH can be relatively flexible (see Makefile and > tools/scripts/Makefile.arch), $SRCARCH always corresponds to a directory > name under arch/. > > Therefore, build samples with -D__TARGET_ARCH_$(SRCARCH), since that > matches the expectations

Re: [PATCH bpf 0/5] bpf: allow wide (u64) aligned loads for some fields of bpf_sock_addr

2019-07-15 Thread Daniel Borkmann
On 7/15/19 6:39 PM, Stanislav Fomichev wrote: > When fixing selftests by adding support for wide stores, Yonghong > reported that he had seen some examples where clang generates > single u64 loads for two adjacent u32s as well: > http://lore.kernel.org/netdev/a66c937f-94c0-eaf8-5b37-8587d66c0...@fb

Re: [oss-drivers] Re: [RFC bpf-next 2/8] bpf: extend list based insn patching infra to verification layer

2019-07-15 Thread Andrii Nakryiko
On Mon, Jul 15, 2019 at 3:02 AM Jiong Wang wrote: > > > Andrii Nakryiko writes: > > > On Thu, Jul 11, 2019 at 5:20 AM Jiong Wang wrote: > >> > >> > >> Jiong Wang writes: > >> > >> > Andrii Nakryiko writes: > >> > > >> >> On Thu, Jul 4, 2019 at 2:32 PM Jiong Wang > >> >> wrote: > >> >>> > >> >>>

Re: [PATCH bpf] selftests/bpf: make directory prerequisites order-only

2019-07-15 Thread Daniel Borkmann
On 7/12/19 3:56 PM, Ilya Leoshkevich wrote: > When directories are used as prerequisites in Makefiles, they can cause > a lot of unnecessary rebuilds, because a directory is considered changed > whenever a file in this directory is added, removed or modified. > > If the only thing a target is inte

Re: [PATCH bpf] selftests/bpf: fix attach_probe on s390

2019-07-15 Thread Daniel Borkmann
On 7/12/19 3:41 PM, Ilya Leoshkevich wrote: > attach_probe test fails, because it cannot install a kprobe on a > non-existent sys_nanosleep symbol. > > Use the correct symbol name for the nanosleep syscall on 64-bit s390. > Don't bother adding one for 31-bit mode, since tests are compiled only > i

Re: [PATCH v3 bpf 0/3] fix BTF verification size resolution

2019-07-15 Thread Daniel Borkmann
On 7/12/19 7:25 PM, Andrii Nakryiko wrote: > BTF size resolution logic isn't always resolving type size correctly, leading > to erroneous map creation failures due to value size mismatch. > > This patch set: > 1. fixes the issue (patch #1); > 2. adds tests for trickier cases (patch #2); > 3. and c

Re: [PATCH v2 bpf-next] selftests/bpf: fix "alu with different scalars 1" on s390

2019-07-15 Thread Daniel Borkmann
On 7/16/19 12:13 AM, Alexei Starovoitov wrote: > On Thu, Jul 4, 2019 at 1:53 AM Ilya Leoshkevich wrote: >> >> BPF_LDX_MEM is used to load the least significant byte of the retrieved >> test_val.index, however, on big-endian machines it ends up retrieving >> the most significant byte. >> >> Use the

Re: [PATCH v2 bpf-next] selftests/bpf: fix "alu with different scalars 1" on s390

2019-07-15 Thread Alexei Starovoitov
On Thu, Jul 4, 2019 at 1:53 AM Ilya Leoshkevich wrote: > > BPF_LDX_MEM is used to load the least significant byte of the retrieved > test_val.index, however, on big-endian machines it ends up retrieving > the most significant byte. > > Use the correct least significant byte offset on big-endian ma

Re: [PATCH 8/9] acpi: Use built-in RCU list checking for acpi_ioremaps list (v1)

2019-07-15 Thread Rafael J. Wysocki
On Mon, Jul 15, 2019 at 4:43 PM Joel Fernandes (Google) wrote: > > list_for_each_entry_rcu has built-in RCU and lock checking. Make use of > it for acpi_ioremaps list traversal. > > Signed-off-by: Joel Fernandes (Google) Acked-by: Rafael J. Wysocki > --- > drivers/acpi/osl.c | 6 -- > 1 f

[PATCH] bnx2x: Prevent load reordering in tx completion processing

2019-07-15 Thread Brian King
This patch fixes an issue seen on Power systems with bnx2x which results in the skb is NULL WARN_ON in bnx2x_free_tx_pkt firing due to the skb pointer getting loaded in bnx2x_free_tx_pkt prior to the hw_cons load in bnx2x_tx_int. Adding a read memory barrier resolves the issue. Signed-off-by: Bria

[PATCH v1] net: fec: optionally reset PHY via a reset-controller

2019-07-15 Thread Sven Van Asbroeck
The current fec driver allows the PHY to be reset via a gpio, specified in the devicetree. However, some PHYs need to be reset in a more complex way. To accommodate such PHYs, allow an optional reset controller in the fec devicetree. If no reset controller is found, the fec will fall back to the l

Re: [PATCH ghak90 V6 02/10] audit: add container id

2019-07-15 Thread Paul Moore
On Mon, Jul 8, 2019 at 2:06 PM Richard Guy Briggs wrote: > On 2019-05-30 15:29, Paul Moore wrote: ... > > [REMINDER: It is an "*audit* container ID" and not a general > > "container ID" ;) Smiley aside, I'm not kidding about that part.] > > > > I'm not interested in supporting/merging something

Re: [bpf PATCH v2 2/6] bpf: tls fix transition through disconnect with close

2019-07-15 Thread John Fastabend
Jakub Kicinski wrote: > On Thu, 11 Jul 2019 14:25:54 -0700, John Fastabend wrote: > > Jakub Kicinski wrote: > > > On Thu, 11 Jul 2019 09:47:16 -0700, John Fastabend wrote: > > > > Jakub Kicinski wrote: > > > > > On Wed, 10 Jul 2019 12:34:17 -0700, Jakub Kicinski wrote: > > > > > > > > > +

Re: [PATCH iproute2-rc 1/8] rdma: Update uapi headers to add statistic counter support

2019-07-15 Thread Stephen Hemminger
On Wed, 10 Jul 2019 10:24:48 +0300 Leon Romanovsky wrote: > From: Mark Zhang > > Update rdma_netlink.h to kernel commit 6e7be47a5345 ("RDMA/nldev: > Allow get default counter statistics through RDMA netlink"). > > Signed-off-by: Mark Zhang > Signed-off-by: Leon Romanovsky I am waiting on th

Re: [PATCH iproute2 master 0/3] devlink dumpit fixes

2019-07-15 Thread Stephen Hemminger
On Wed, 10 Jul 2019 14:03:18 +0300 Tariq Toukan wrote: > Hi, > > This series from Aya contains several fixes for devlink health > dump show command with binary data. > > In patch 1 we replace the usage of doit with a dumpit, which > is non-blocking and allows transferring larger amount of data.

[bpf PATCH v3 8/8] bpf: sockmap/tls, close can race with map free

2019-07-15 Thread John Fastabend
When a map free is called and in parallel a socket is closed we have two paths that can potentially reset the socket prot ops, the bpf close() path and the map free path. This creates a problem with which prot ops should be used from the socket closed side. If the map_free side completes first the

Re: [PATCH iproute2 v2] utils: don't match empty strings as prefixes

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 20:04:30 +0200 Matteo Croce wrote: > iproute has an utility function which checks if a string is a prefix for > another one, to allow use of abbreviated commands, e.g. 'addr' or 'a' > instead of 'address'. > > This routine unfortunately considers an empty string as prefix > o

[bpf PATCH v3 2/8] tls: remove close callback sock unlock/lock around TX work flush

2019-07-15 Thread John Fastabend
The tls close() callback currently drops the sock lock, makes a cancel_delayed_work_sync() call, and then relocks the sock. By restructuring the code we can avoid droping lock and then reclaiming it. To simplify this we do the following, tls_sk_proto_close set_bit(CLOSING) set_bit(SCHEDULE) c

[bpf PATCH v3 6/8] bpf: sockmap, synchronize_rcu before free'ing map

2019-07-15 Thread John Fastabend
We need to have a synchronize_rcu before free'ing the sockmap because any outstanding psock references will have a pointer to the map and when they use this could trigger a use after free. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend ---

[bpf PATCH v3 7/8] bpf: sockmap, only create entry if ulp is not already enabled

2019-07-15 Thread John Fastabend
Sockmap does not currently support adding sockets after TLS has been enabled. There never was a real use case for this so it was never added. But, we lost the test for ULP at some point so add it here and fail the socket insert if TLS is enabled. Future work could make sockmap support this use case

[bpf PATCH v3 1/8] net/tls: don't arm strparser immediately in tls_set_sw_offload()

2019-07-15 Thread John Fastabend
From: Jakub Kicinski In tls_set_device_offload_rx() we prepare the software context for RX fallback and proceed to add the connection to the device. Unfortunately, software context prep includes arming strparser so in case of a later error we have to release the socket lock to call strp_done().

[bpf PATCH v3 4/8] bpf: tls fix transition through disconnect with close

2019-07-15 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE state via tcp_dosconnect() without actually calling tcp_close which would then call the tls close callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions about so

[bpf PATCH v3 3/8] tls: remove sock unlock/lock around strp_done()

2019-07-15 Thread John Fastabend
The tls close() callback currently drops the sock lock to call strp_done(). Split up the RX cleanup into stopping the strparser and releasing most resources, syncing strparser and finally freeing the context. To avoid the need for a strp_done() call on the cleanup path of device offload make sure

[bpf PATCH v3 0/8] sockmap/tls fixes

2019-07-15 Thread John Fastabend
Resolve a series of splats discovered by syzbot and an unhash TLS issue noted by Eric Dumazet. The main issues revolved around interaction between TLS and sockmap tear down. TLS and sockmap could both reset sk->prot ops creating a condition where a close or unhash op could be called forever. A rar

[bpf PATCH v3 5/8] bpf: sockmap, sock_map_delete needs to use xchg

2019-07-15 Thread John Fastabend
__sock_map_delete() may be called from a tcp event such as unhash or close from the following trace, tcp_bpf_close() tcp_bpf_remove() sk_psock_unlink() sock_map_delete_from_link() __sock_map_delete() In this case the sock lock is held but this only protects against d

Re: [PATCH iproute2] tc: util: constrain percentage in 0-100 interval

2019-07-15 Thread Stephen Hemminger
On Sat, 13 Jul 2019 11:44:07 +0200 Andrea Claudi wrote: > parse_percent() currently allows to specify negative percentages > or value above 100%. However this does not seems to make sense, > as the function is used for probabilities or bandiwidth rates. > > Moreover, using negative values leads

Re: [PATCH iproute2 net-next v2 1/6] Kernel header update for hardware offloading changes.

2019-07-15 Thread David Ahern
On 7/15/19 1:50 PM, Stephen Hemminger wrote: > On Mon, 15 Jul 2019 19:40:19 + > "Patel, Vedang" wrote: > >> Hi Stephen, >> >> The kernel patches corresponding to this series have been merged. I just >> wanted to check whether these iproute2 related patches are on your TODO list. >> >> Let m

[net 3/3] net/mlx5e: Allow dissector meta key in tc flower

2019-07-15 Thread Saeed Mahameed
From: Vlad Buslov Recently, fl_flow_key->indev_ifindex int field was refactored into flow_dissector_key_meta field. With this, flower classifier also sets FLOW_DISSECTOR_KEY_META flow dissector key. However, mlx5 flower dissector validation code rejects filters that use flow dissector keys that a

[net 1/3] net/mlx5e: Verify encapsulation is supported

2019-07-15 Thread Saeed Mahameed
From: Eli Cohen When mlx5e_attach_encap() calls mlx5e_get_tc_tun() to get the tunnel info data struct, check that returned value is not NULL, as would be in the case of unsupported encapsulation. Fixes: d386939a327d2 ("net/mlx5e: Rearrange tc tunnel code in a modular way") Signed-off-by: Eli Coh

[pull request][net 0/3] Mellanox, mlx5 fixes 2019-07-15

2019-07-15 Thread Saeed Mahameed
Hi Dave, This pull request provides mlx5 TC flower and tunnel fixes for kernel 5.2 from Eli and Vlad. Please pull and let me know if there is any problem. Thanks, Saeed. --- The following changes since commit f384e62a82ba5d85408405fdd6aeff89354deaa9: ISDN: hfcsusb: checking idx of ep configu

[net 2/3] net/mlx5e: Rely on filter_dev instead of dissector keys for tunnels

2019-07-15 Thread Saeed Mahameed
From: Vlad Buslov Currently, tunnel attributes are parsed and inner header matching is used only when flow dissector specifies match on some of the supported encapsulation fields. When user tries to offload tc filter that doesn't match any encapsulation fields on tunnel device, mlx5 tc layer inco

Re: [PATCH bpf 0/5] bpf: allow wide (u64) aligned loads for some fields of bpf_sock_addr

2019-07-15 Thread Yonghong Song
On 7/15/19 9:39 AM, Stanislav Fomichev wrote: > When fixing selftests by adding support for wide stores, Yonghong > reported that he had seen some examples where clang generates > single u64 loads for two adjacent u32s as well: > http://lore.kernel.org/netdev/a66c937f-94c0-eaf8-5b37-8587d66c0...@

Re: [PATCH iproute2 net-next v2 1/6] Kernel header update for hardware offloading changes.

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 19:40:19 + "Patel, Vedang" wrote: > Hi Stephen, > > The kernel patches corresponding to this series have been merged. I just > wanted to check whether these iproute2 related patches are on your TODO list. > > Let me know if you need any information from me on these pat

Re: [PATCH iproute2 net-next v2 1/6] Kernel header update for hardware offloading changes.

2019-07-15 Thread Patel, Vedang
Hi Stephen, The kernel patches corresponding to this series have been merged. I just wanted to check whether these iproute2 related patches are on your TODO list. Let me know if you need any information from me on these patches. Thanks, Vedang Patel > On Jun 6, 2019, at 3:22 PM, Patel, Vedang

Re: [PATCH v2] ethtool: igb: dump RR2DCDELAY register

2019-07-15 Thread Michal Kubecek
On Mon, Jul 15, 2019 at 01:59:33PM +0300, Artem Bityutskiy wrote: > From: Artem Bityutskiy > > Decode 'RR2DCDELAY' register which Linux kernel provides starting from version > 5.3. The corresponding commit in the Linux kernel is: > cd502a7f7c9c igb: add RR2DCDELAY to ethtool registers dump >

Re: IPv6 L2TP issues related to 93531c67

2019-07-15 Thread David Ahern
Hi Paul: As an FYI, gmail thinks your emails are spam. On 7/15/19 10:18 AM, Paul Donohue wrote: > I have a system that establishes four L2TP over IPv6 tunnels using site-local > addresses via the following: ... > > These tunnels worked fine on kernel 4.4. On kernel 4.15, there was a bug > th

[PATCH] can: flexcan: free error skb if enqueueing failed

2019-07-15 Thread Martin Hundebøll
If the call to can_rx_offload_queue_sorted() fails, the passed skb isn't consumed, so the caller must do so. Fixes: 30164759db1b ("can: flexcan: make use of rx-offload's irq_offload_fifo") Signed-off-by: Martin Hundebøll --- drivers/net/can/flexcan.c | 6 -- 1 file changed, 4 insertions(+),

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

2019-07-15 Thread Pravin Shelar
On Fri, Jul 5, 2019 at 9:08 AM Taehee Yoo wrote: > > 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 rou

[PATCH iproute2 v2] utils: don't match empty strings as prefixes

2019-07-15 Thread Matteo Croce
iproute has an utility function which checks if a string is a prefix for another one, to allow use of abbreviated commands, e.g. 'addr' or 'a' instead of 'address'. This routine unfortunately considers an empty string as prefix of any pattern, leading to undefined behaviour when an empty argument

Re: [PATCH net v3] net: neigh: fix multiple neigh timer scheduling

2019-07-15 Thread David Miller
From: Lorenzo Bianconi Date: Sun, 14 Jul 2019 23:36:11 +0200 > Neigh timer can be scheduled multiple times from userspace adding > multiple neigh entries and forcing the neigh timer scheduling passing > NTF_USE in the netlink requests. > This will result in a refcount leak and in the following du

Re: Request for backport of 96125bf9985a75db00496dd2bc9249b777d2b19b

2019-07-15 Thread Loganaden Velvindron
On Fri, Jul 5, 2019 at 6:15 PM Loganaden Velvindron wrote: > > Hi folks, > > I read the guidelines for LTS/stable. > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > > Although this is not a bugfix, I am humbly submitting a request so > that commit id > -- 96125bf9985a75

Re: [RFC] virtio-net: share receive_*() and add_recvbuf_*() with virtio-vsock

2019-07-15 Thread Michael S. Tsirkin
On Mon, Jul 15, 2019 at 09:44:16AM +0200, Stefano Garzarella wrote: > On Fri, Jul 12, 2019 at 06:14:39PM +0800, Jason Wang wrote: > > > > On 2019/7/12 下午6:00, Stefano Garzarella wrote: > > > On Thu, Jul 11, 2019 at 03:52:21PM -0400, Michael S. Tsirkin wrote: > > > > On Thu, Jul 11, 2019 at 01:41:3

Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-15 Thread Stephen Hemminger
On Sun, 14 Jul 2019 16:57:54 +0200 Matteo Croce wrote: > On Wed, Jul 10, 2019 at 1:18 AM Matteo Croce wrote: > > > > On Tue, Jul 9, 2019 at 11:38 PM Stephen Hemminger > > wrote: > > > > > > On Tue, 9 Jul 2019 22:40:40 +0200 > > > Matteo Croce wrote: > > > > > > > iproute has an utility fu

Re: [PATCH bpf 0/5] bpf: allow wide (u64) aligned loads for some fields of bpf_sock_addr

2019-07-15 Thread Andrii Nakryiko
On Mon, Jul 15, 2019 at 9:40 AM Stanislav Fomichev wrote: > > When fixing selftests by adding support for wide stores, Yonghong > reported that he had seen some examples where clang generates > single u64 loads for two adjacent u32s as well: > http://lore.kernel.org/netdev/a66c937f-94c0-eaf8-5b37-

[PATCH bpf 0/5] bpf: allow wide (u64) aligned loads for some fields of bpf_sock_addr

2019-07-15 Thread Stanislav Fomichev
When fixing selftests by adding support for wide stores, Yonghong reported that he had seen some examples where clang generates single u64 loads for two adjacent u32s as well: http://lore.kernel.org/netdev/a66c937f-94c0-eaf8-5b37-8587d66c0...@fb.com Let's support aligned u64 reads for some bpf_soc

[PATCH bpf 2/5] bpf: allow wide aligned loads for bpf_sock_addr user_ip6 and msg_src_ip6

2019-07-15 Thread Stanislav Fomichev
Add explicit check for u64 loads of user_ip6 and msg_src_ip6 and update the comment. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev --- include/uapi/linux/bpf.h | 4 ++-- net/core/filter.c| 12 +++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/ua

[PATCH bpf 5/5] bpf: sync bpf.h to tools/

2019-07-15 Thread Stanislav Fomichev
Update bpf_sock_addr comments to indicate support for 8-byte reads from user_ip6 and msg_src_ip6. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools

[PATCH bpf 4/5] selftests/bpf: add selftests for wide loads

2019-07-15 Thread Stanislav Fomichev
Mirror existing wide store tests with wide loads. The only significant difference is expected error string. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/verifier/wide_access.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/tools/testin

[PATCH bpf 3/5] selftests/bpf: rename verifier/wide_store.c to verifier/wide_access.c

2019-07-15 Thread Stanislav Fomichev
Move the file and rename internal BPF_SOCK_ADDR define to BPF_SOCK_ADDR_STORE. This selftest will be extended in the next commit with the wide loads. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/verifier/wide_access.c | 36 +++ .../selftests/bpf

[PATCH bpf 1/5] bpf: rename bpf_ctx_wide_store_ok to bpf_ctx_wide_access_ok

2019-07-15 Thread Stanislav Fomichev
Rename bpf_ctx_wide_store_ok to bpf_ctx_wide_access_ok to indicate that it can be used for both loads and stores. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev --- include/linux/filter.h | 2 +- net/core/filter.c | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) d

Re: [PATCH net v3] net: neigh: fix multiple neigh timer scheduling

2019-07-15 Thread David Ahern
On 7/14/19 3:36 PM, Lorenzo Bianconi wrote: > Neigh timer can be scheduled multiple times from userspace adding > multiple neigh entries and forcing the neigh timer scheduling passing > NTF_USE in the netlink requests. > This will result in a refcount leak and in the following dump stack: > ...

IPv6 L2TP issues related to 93531c67

2019-07-15 Thread Paul Donohue
I have a system that establishes four L2TP over IPv6 tunnels using site-local addresses via the following: ip l2tp add tunnel tunnel_id 1233 peer_tunnel_id 1233 encap ip local fd23:2355:accd::2:4 remote fd23:2355:accd::2:3 ip l2tp add session name net_l2tp1 tunnel_id 1233 session_id 1233 peer_se

Re: [PATCH bpf] samples/bpf: build with -D__TARGET_ARCH_$(SRCARCH)

2019-07-15 Thread Andrii Nakryiko
On Mon, Jul 15, 2019 at 2:11 AM Ilya Leoshkevich wrote: > > While $ARCH can be relatively flexible (see Makefile and > tools/scripts/Makefile.arch), $SRCARCH always corresponds to a directory > name under arch/. > > Therefore, build samples with -D__TARGET_ARCH_$(SRCARCH), since that > matches the

[PATCH AUTOSEL 5.2 104/249] qed: iWARP - Fix tc for MPA ll2 connection

2019-07-15 Thread Sasha Levin
From: Michal Kalderon [ Upstream commit cb94d52b93c74fe1f2595734fabeda9f8ae891ee ] The driver needs to assign a lossless traffic class for the MPA ll2 connection to ensure no packets are dropped when returning from the driver as they will never be re-transmitted by the peer. Fixes: ae3488ff37dc

[PATCH net] ipvs: Improve robustness to the ipvs sysctl

2019-07-15 Thread hujunwei
From: Junwei Hu The ipvs module parse the user buffer and save it to sysctl, then check if the value is valid. invalid value occurs over a period of time. Here, I add a variable, struct ctl_table tmp, used to read the value from the user buffer, and save only when it is valid. Fixes: f73181c8288

Re: [PATCH] ethtool: igb: dump RR2DCDELAY register

2019-07-15 Thread Artem Bityutskiy
On Mon, 2019-07-15 at 11:13 +0200, Michal Kubecek wrote: > > + /* > > +* Starting from kernel version 5.3 the registers dump buffer grew from > > +* 739 4-byte words to 740 words, and word 740 contains the RR2DCDLAY > > nit: "E" missing here:

[PATCH v2] ethtool: igb: dump RR2DCDELAY register

2019-07-15 Thread Artem Bityutskiy
From: Artem Bityutskiy Decode 'RR2DCDELAY' register which Linux kernel provides starting from version 5.3. The corresponding commit in the Linux kernel is: cd502a7f7c9c igb: add RR2DCDELAY to ethtool registers dump The RR2DCDELAY register is present in I210 and I211 Intel Gigabit Ethernet ch

Re: [RFC] virtio-net: share receive_*() and add_recvbuf_*() with virtio-vsock

2019-07-15 Thread Stefano Garzarella
On Mon, Jul 15, 2019 at 05:16:09PM +0800, Jason Wang wrote: > > > > > > > > >struct sk_buff *virtskb_receive_small(struct virtskb > > > > > > > > *vs, ...); > > > > > > > >struct sk_buff *virtskb_receive_big(struct virtskb *vs, > > > > > > > > ...); > > > > > > > >struct

Re: [oss-drivers] Re: [RFC bpf-next 2/8] bpf: extend list based insn patching infra to verification layer

2019-07-15 Thread Jiong Wang
Andrii Nakryiko writes: > On Thu, Jul 11, 2019 at 5:20 AM Jiong Wang wrote: >> >> >> Jiong Wang writes: >> >> > Andrii Nakryiko writes: >> > >> >> On Thu, Jul 4, 2019 at 2:32 PM Jiong Wang >> >> wrote: >> >>> >> >>> Verification layer also needs to handle auxiliar info as well as >> >>> adju

[PATCH ipsec v2 1/4] xfrm interface: avoid corruption on changelink

2019-07-15 Thread Nicolas Dichtel
The new parameters must not be stored in the netdev_priv() before validation, it may corrupt the interface. Note also that if data is NULL, only a memset() is done. $ ip link add xfrm1 type xfrm dev lo if_id 1 $ ip link add xfrm2 type xfrm dev lo if_id 2 $ ip link set xfrm1 type xfrm dev lo if_id

[PATCH ipsec v2 3/4] xfrm interface: fix list corruption for x-netns

2019-07-15 Thread Nicolas Dichtel
dev_net(dev) is the netns of the device and xi->net is the link netns, where the device has been linked. changelink() must operate in the link netns to avoid a corruption of the xfrm lists. Note that xi->net and dev_net(xi->physdev) are always the same. Before the patch, the xfrmi lists may be co

[PATCH ipsec v2 2/4] xfrm interface: ifname may be wrong in logs

2019-07-15 Thread Nicolas Dichtel
The ifname is copied when the interface is created, but is never updated later. In fact, this property is used only in one error message, where the netdevice pointer is available, thus let's use it. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Nicolas Dichtel --- incl

[PATCH ipsec v2 4/4] xfrm interface: fix management of phydev

2019-07-15 Thread Nicolas Dichtel
With the current implementation, phydev cannot be removed: $ ip link add dummy type dummy $ ip link add xfrm1 type xfrm dev dummy if_id 1 $ ip l d dummy kernel:[77938.465445] unregister_netdevice: waiting for dummy to become free. Usage count = 1 Manage it like in ip tunnels, ie just keep the i

[PATCH ipsec v2 0/4] xfrm interface: bugs fixes

2019-07-15 Thread Nicolas Dichtel
Here is a bunch of bugs fixes. Some have been seen by code review and some when playing with x-netns. The details are in each patch. v1 -> v2: - add patch #3 and #4 include/net/xfrm.h| 2 -- net/xfrm/xfrm_interface.c | 56 +-- 2 files chang

Re: [RFC bpf-next 1/8] bpf: introducing list based insn patching infra to core layer

2019-07-15 Thread Jiong Wang
Andrii Nakryiko writes: > On Thu, Jul 11, 2019 at 4:53 AM Jiong Wang wrote: >> >> >> Andrii Nakryiko writes: >> >> > On Thu, Jul 4, 2019 at 2:32 PM Jiong Wang wrote: >> >> >> >> This patch introduces list based bpf insn patching infra to bpf core layer >> >> which is lower than verification la

  1   2   >