Help required in a part of transport layer

2019-07-11 Thread Rakesh Beck
Hi, I am looking for some help. I am trying to intercept packet using netfilter hooks (NF_IP_LOCAL_OUT) and using source port and destination port from SK_BUFF, to figure out which processes are using it but I am unable to do so. I am only concerned about packets which are sent and received local

Re: [PATCH v2 bpf-next 0/3] fix BTF verification size resolution

2019-07-11 Thread Yonghong Song
On 7/10/19 11:53 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. an

Re: [PATCH v2 bpf-next 1/3] bpf: fix BTF verifier size resolution logic

2019-07-11 Thread Yonghong Song
On 7/10/19 11:53 PM, Andrii Nakryiko wrote: > BTF verifier has a size resolution bug which in some circumstances leads to > invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have > [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer > context ARRAY si

[net-next 1/2] tipc: optimize link synching mechanism

2019-07-11 Thread Tuong Lien
This commit along with the next one are to resolve the issues with the link changeover mechanism. See that commit for details. Basically, for the link synching, from now on, we will send only one single ("dummy") SYNCH message to peer. The SYNCH message does not contain any data, just a header con

[net-next 0/2] tipc: link changeover issues

2019-07-11 Thread Tuong Lien
This patch series is to resolve some issues found with the current link changeover mechanism, it also includes an optimization for the link synching. Tuong Lien (2): tipc: optimize link synching mechanism tipc: fix changeover issues due to large packet net/tipc/link.c | 119 +

[net-next 2/2] tipc: fix changeover issues due to large packet

2019-07-11 Thread Tuong Lien
In conjunction with changing the interfaces' MTU (e.g. especially in the case of a bonding) where the TIPC links are brought up and down in a short time, a couple of issues were detected with the current link changeover mechanism: 1) When one link is up but immediately forced down again, the failo

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

2019-07-11 Thread Roopa Prabhu
On Mon, Jul 8, 2019 at 4:12 PM David Miller wrote: > > From: Petar Penkov > Date: Fri, 5 Jul 2019 11:46:43 -0700 > > > 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 > > > >

Re: [PATCH net-next 00/11] Add drop monitor for offloaded data paths

2019-07-11 Thread Florian Fainelli
On 7/11/2019 4:53 PM, Neil Horman wrote: >> I would like to emphasize that the configuration of whether these >> dropped packets are even sent to the CPU from the device still needs to >> reside in devlink given this is the go-to tool for device-specific >> configuration. In addition, these drop

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

2019-07-11 Thread Jakub Kicinski
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: > > > > > > > > + if (sk->sk_prot->unha

[PATCH] tools: bpftool: add raw_tracepoint_writable prog type to header

2019-07-11 Thread Daniel T. Lee
>From commit 9df1c28bb752 ("bpf: add writable context for raw tracepoints"), a new type of BPF_PROG, RAW_TRACEPOINT_WRITABLE has been added. Since this BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE is not listed at bpftool's header, it causes a segfault when executing 'bpftool feature'. This commit adds

Re: [PATCH v4 bpf-next 1/4] selftests/bpf: compile progs with -D__TARGET_ARCH_$(SRCARCH)

2019-07-11 Thread Andrii Nakryiko
On Thu, Jul 11, 2019 at 7:32 AM Ilya Leoshkevich wrote: > > This opens up the possibility of accessing registers in an > arch-independent way. > > Signed-off-by: Ilya Leoshkevich > --- > tools/testing/selftests/bpf/Makefile | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --gi

Re: [PATCH v4 bpf-next 2/4] selftests/bpf: fix s930 -> s390 typo

2019-07-11 Thread Andrii Nakryiko
On Thu, Jul 11, 2019 at 7:31 AM Ilya Leoshkevich wrote: > > Also check for __s390__ instead of __s390x__, just in case bpf_helpers.h > is ever used by 32-bit userspace. > > Signed-off-by: Ilya Leoshkevich > --- Acked-by: Andrii Nakryiko > tools/testing/selftests/bpf/bpf_helpers.h | 10 +--

Re: [PATCH v4 bpf-next 3/4] selftests/bpf: make PT_REGS_* work in userspace

2019-07-11 Thread Andrii Nakryiko
On Thu, Jul 11, 2019 at 7:31 AM Ilya Leoshkevich wrote: > > Right now, on certain architectures, these macros are usable only with > kernel headers. This patch makes it possible to use them with userspace > headers and, as a consequence, not only in BPF samples, but also in BPF > selftests. > > On

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

2019-07-11 Thread Gregory Rose
On 7/11/2019 2:07 PM, Pravin Shelar wrote: I was bit busy for last couple of days. I will finish review by EOD today. Thanks, Pravin. net-next is closed anyway so no rush, but thanks! - Greg On Mon, Jul 8, 2019 at 4:22 PM Gregory Rose wrote: On 7/8/2019 4:18 PM, Gregory Rose wrote:

Re: [PATCH net-next 00/11] Add drop monitor for offloaded data paths

2019-07-11 Thread Neil Horman
On Thu, Jul 11, 2019 at 03:39:09PM +0300, Ido Schimmel wrote: > On Sun, Jul 07, 2019 at 12:45:41PM -0700, David Miller wrote: > > From: Ido Schimmel > > Date: Sun, 7 Jul 2019 10:58:17 +0300 > > > > > Users have several ways to debug the kernel and understand why a packet > > > was dropped. For e

Copia de: Schöne Mädchen für Sex in deiner Stadt

2019-07-11 Thread Transquintero
Copia de: Esta es una consulta de correo electrónico http://transquintero.com/ a través de: Ismaelisore MГ¤dchen suchen Sex in Ihrer Stadt: http://merky.de/58lnxh?Q41Tj5b0wKjpAx

Re: [net][PATCH 0/5] rds fixes

2019-07-11 Thread David Miller
From: Santosh Shilimkar Date: Tue, 9 Jul 2019 22:32:39 -0700 > Few rds fixes which makes rds rdma transport reliably working on mainline > > First two fixes are applicable to v4.11+ stable versions and last > three patches applies to only v5.1 stable and current mainline. > > Patchset is re-ba

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

2019-07-11 Thread David Miller
From: Saeed Mahameed Date: Thu, 11 Jul 2019 18:54:08 + > This series introduces some fixes to mlx5 driver. > > Please pull and let me know if there is any problem. Pulled. > For -stable v4.15 > ('net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn') > > For -stable v5.1 > ('net/mlx5e:

Re: [PATCH net-next 0/3] Mellanox, mlx5 build fixes

2019-07-11 Thread David Miller
From: Saeed Mahameed Date: Thu, 11 Jul 2019 19:39:53 + > I know net-next is closed but these patches are fixing some compiler > build and warnings issues people have been complaining about. > > I hope it is not too late, but in case it is a lot of trouble for > you, I guess they can wait. N

Re: [PATCH net] ipv6: fix static key imbalance in fl_create()

2019-07-11 Thread David Miller
From: Eric Dumazet Date: Wed, 10 Jul 2019 06:40:11 -0700 > fl_create() should call static_branch_deferred_inc() only in > case of success. > > Also we should not call fl_free() in error path, as this could > cause a static key imbalance. ... > Fixes: 59c820b2317f ("ipv6: elide flowlabel check i

Re: [PATCH net] ipv6: fix potential crash in ip6_datagram_dst_update()

2019-07-11 Thread David Miller
From: Eric Dumazet Date: Wed, 10 Jul 2019 06:40:10 -0700 > Willem forgot to change one of the calls to fl6_sock_lookup(), > which can now return an error or NULL. > > syzbot reported : ... > Fixes: 59c820b2317f ("ipv6: elide flowlabel check if no exclusive leases > exist") > Signed-off-by: Eri

Re: [PATCH net] ipv6: tcp: fix flowlabels reflection for RST packets

2019-07-11 Thread David Miller
From: Eric Dumazet Date: Wed, 10 Jul 2019 06:40:09 -0700 > In 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets") > and 50a8accf1062 ("ipv6: tcp: send consistent flowlabel in TIME_WAIT state") > we took care of IPv6 flowlabel reflections for two cases. > > This patch take

Re: [Patch net] hsr: switch ->dellink() to ->ndo_uninit()

2019-07-11 Thread David Miller
From: Cong Wang Date: Tue, 9 Jul 2019 23:24:54 -0700 > Switching from ->priv_destructor to dellink() has an unexpected > consequence: existing RCU readers, that is, hsr_port_get_hsr() > callers, may still be able to read the port list. > > Instead of checking the return value of each hsr_port_g

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

2019-07-11 Thread John Fastabend
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: > > > > > > > + if (sk->sk_prot->unhash) > > > > > > > + sk->sk_prot->unhash(sk); > > > > > > > + } >

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

2019-07-11 Thread David Miller
From: Petar Penkov Date: Fri, 5 Jul 2019 11:46:43 -0700 > 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 Applied, thank you.

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

2019-07-11 Thread Pravin Shelar
I was bit busy for last couple of days. I will finish review by EOD today. Thanks, Pravin. On Mon, Jul 8, 2019 at 4:22 PM Gregory Rose wrote: > > > > On 7/8/2019 4:18 PM, Gregory Rose wrote: > > On 7/8/2019 4:08 PM, David Miller wrote: > >> From: Taehee Yoo > >> Date: Sat, 6 Jul 2019 01:08:09

Re: [PATCH v4 bpf-next 0/4] selftests/bpf: fix compiling loop{1,2,3}.c on s390

2019-07-11 Thread Stanislav Fomichev
On 07/11, Ilya Leoshkevich wrote: > Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390. > > This patch series consists of three preparatory commits, which make it > possible to use PT_REGS_RC in BPF selftests, followed by the actual fix. > > > > Will this also work for 32-bit x

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

2019-07-11 Thread Michael S. Tsirkin
On Thu, Jul 11, 2019 at 01:41:34PM +0200, Stefano Garzarella wrote: > On Thu, Jul 11, 2019 at 03:37:00PM +0800, Jason Wang wrote: > > > > On 2019/7/10 下午11:37, Stefano Garzarella wrote: > > > Hi, > > > as Jason suggested some months ago, I looked better at the virtio-net > > > driver to > > > und

[PATCH net-next 3/3] net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage

2019-07-11 Thread Saeed Mahameed
Fix the following compiler warning: In function ‘esw_vport_add_ingress_acl_modify_metadata’: the frame size of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=] Since the structure is never written to, we can statically allocate it to avoid the stack usage. Fixes: 7445cfb1169c ("net/mlx

[PATCH net-next 2/3] net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off

2019-07-11 Thread Saeed Mahameed
In mlx5e_setup_tc "priv" variable is not being used if CONFIG_MLX5_ESWITCH is off, one way to fix this is to actually use it. mlx5e_setup_tc_mqprio also needs the "priv" variable and it extracts it on its own. We can simply pass priv to mlx5e_setup_tc_mqprio instead of netdev and avoid extracting

[PATCH net-next 1/3] net/mlx5e: Fix compilation error in TLS code

2019-07-11 Thread Saeed Mahameed
From: Tariq Toukan In the cited patch below, the Kconfig flags combination of: CONFIG_MLX5_FPGA is not set CONFIG_MLX5_TLS=y CONFIG_MLX5_EN_TLS=y leads to the compilation error: ./include/linux/mlx5/device.h:61:39: error: invalid application of sizeof to incomplete type struct mlx5_ifc_tls_flow

[PATCH net-next 0/3] Mellanox, mlx5 build fixes

2019-07-11 Thread Saeed Mahameed
Hi Dave, I know net-next is closed but these patches are fixing some compiler build and warnings issues people have been complaining about. I hope it is not too late, but in case it is a lot of trouble for you, I guess they can wait. Thanks, Saeed. --- Saeed Mahameed (2): net/mlx5e: Fix unus

Re: [PATCH v3 net-next 13/19] ionic: Add initial ethtool support

2019-07-11 Thread Shannon Nelson
On 7/8/19 3:04 PM, Andrew Lunn wrote: + case XCVR_PID_SFP_10GBASE_ER: + ethtool_link_ksettings_add_link_mode(ks, supported, +1baseER_Full); + break; I don't know these link modes too well. But only setting

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Jonathan Lemon
On 11 Jul 2019, at 11:28, Eric Dumazet wrote: On 7/11/19 7:14 PM, Prout, Andrew - LLSC - MITLL wrote: In my opinion, if a small SO_SNDBUF below a certain value is no longer supported, then SOCK_MIN_SNDBUF should be adjusted to reflect this. The RCVBUF/SNDBUF sizes are supposed to be hints

Re: [PATCH net-next 00/11] Add drop monitor for offloaded data paths

2019-07-11 Thread David Miller
From: Ido Schimmel Date: Thu, 11 Jul 2019 15:39:09 +0300 > Before I start working on v2, I would like to get your feedback on the > high level plan. Also adding Neil who is the maintainer of drop_monitor > (and counterpart DropWatch tool [1]). I'll try to get back to this, but right now the merg

[net 6/6] net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn

2019-07-11 Thread Saeed Mahameed
From: Aya Levin Check return value from mlx5e_attach_netdev, add error path on failure. Fixes: 48935bbb7ae8 ("net/mlx5e: IPoIB, Add netdevice profile skeleton") Signed-off-by: Aya Levin Reviewed-by: Feras Daoud Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/ipoib/i

[net 5/6] net/mlx5e: Fix error flow in tx reporter diagnose

2019-07-11 Thread Saeed Mahameed
From: Aya Levin Fix tx reporter's diagnose callback. Propagate error when failing to gather diagnostics information or failing to print diagnostic data per queue. Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Acked-by: Jiri Pirko

[pull request][net 0/6] Mellanox, mlx5 fixes 2019-07-11

2019-07-11 Thread Saeed Mahameed
Hi Dave, This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.15 ('net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn') For -stable v5.1 ('net/mlx5e: Fix port tunnel GRE entropy control') ('net/mlx5e: Rx, Fix checksum calculat

[net 1/6] net/mlx5: E-Switch, Fix default encap mode

2019-07-11 Thread Saeed Mahameed
From: Maor Gottlieb Encap mode is related to switchdev mode only. Move the init of the encap mode to eswitch_offloads. Before this change, we reported that eswitch supports encap, even tough the device was in non SRIOV mode. Fixes: 7768d1971de67 ('net/mlx5: E-Switch, Add control for encapsulatio

[net 3/6] net/mlx5e: Rx, Fix checksum calculation for new hardware

2019-07-11 Thread Saeed Mahameed
CQE checksum full mode in new HW, provides a full checksum of rx frame. Covering bytes starting from eth protocol up to last byte in the received frame (frame_size - ETH_HLEN), as expected by the stack. Fixing up skb->csum by the driver is not required in such case. This fix is to avoid wrong chec

[net 4/6] net/mlx5e: Fix return value from timeout recover function

2019-07-11 Thread Saeed Mahameed
From: Aya Levin Fix timeout recover function to return a meaningful return value. When an interrupt was not sent by the FW, return IO error instead of 'true'. Fixes: c7981bea48fb ("net/mlx5e: Fix return status of TX reporter timeout recover") Signed-off-by: Aya Levin Acked-by: Jiri Pirko Revi

[net 2/6] net/mlx5e: Fix port tunnel GRE entropy control

2019-07-11 Thread Saeed Mahameed
From: Eli Britstein GRE entropy calculation is a single bit per card, and not per port. Force disable GRE entropy calculation upon the first GRE encap rule, and release the force at the last GRE encap rule removal. This is done per port. Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controllin

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Eric Dumazet
On 7/11/19 8:26 PM, Michal Kubecek wrote: > > I'm aware it's not a realistic test. It was written as quick and simple > check of the pre-4.19 patch, but it shows that even TLP may not get > through. Most of TLP probes send new data, not rtx. But yes, I get your point. SO_SNDBUF=15000 in yo

Re: [PATCH] MAINTAINERS: update BPF JIT S390 maintainers

2019-07-11 Thread David Miller
From: Vasily Gorbik Date: Wed, 10 Jul 2019 13:34:54 +0200 > Dave, Alexei, Daniel, > would you take it via one of your trees? Or should I take it via s390? I think it can go via the bpf tree.

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

2019-07-11 Thread Jakub Kicinski
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: > > > > > > + if (sk->sk_prot->unhash) > > > > > > + sk->sk_prot->unhash(sk); > > > > > > + } > > > > > > + > > > > > > +

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Eric Dumazet
On 7/11/19 7:14 PM, Prout, Andrew - LLSC - MITLL wrote: > > In my opinion, if a small SO_SNDBUF below a certain value is no longer > supported, then SOCK_MIN_SNDBUF should be adjusted to reflect this. The > RCVBUF/SNDBUF sizes are supposed to be hints, no error is returned if they > are not

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Michal Kubecek
On Thu, Jul 11, 2019 at 11:19:45AM +0200, Eric Dumazet wrote: > > > On 7/11/19 9:28 AM, Christoph Paasch wrote: > > > > > >> On Jul 10, 2019, at 9:26 PM, Eric Dumazet wrote: > >> > >> > >> > >> On 7/10/19 8:53 PM, Prout, Andrew - LLSC - MITLL wrote: > >>> > >>> Our initial rollout was v4.14.13

Re: [PATCH net-next iproute2 2/3] tc: Introduce tc ct action

2019-07-11 Thread Marcelo Ricardo Leitner
On Thu, Jul 11, 2019 at 07:21:51AM +, Paul Blakey wrote: > > On 7/9/2019 6:36 PM, Marcelo Ricardo Leitner wrote: > > On Tue, Jul 09, 2019 at 06:58:36AM +, Paul Blakey wrote: > >> On 7/8/2019 8:54 PM, Marcelo Ricardo Leitner wrote: > >>> On Sun, Jul 07, 2019 at 11:53:47AM +0300, Paul Blakey

RE: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Prout, Andrew - LLSC - MITLL
On 7/10/19 3:27 PM, Eric Dumazet wrote: > On 7/10/19 8:53 PM, Prout, Andrew - LLSC - MITLL wrote: >> >> Our initial rollout was v4.14.130, but I reproduced it with v4.14.132 as >> well, reliably for the samba test and once (not reliably) with synthetic >> test I was trying. A patched v4.14.132

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

2019-07-11 Thread John Fastabend
Jakub Kicinski wrote: > On Wed, 10 Jul 2019 12:34:17 -0700, Jakub Kicinski wrote: > > > > > + if (sk->sk_prot->unhash) > > > > > + sk->sk_prot->unhash(sk); > > > > > + } > > > > > + > > > > > + ctx = tls_get_ctx(sk); > > > > > + if (ctx->tx_conf == TLS_SW

Re: [bpf PATCH v2 6/6] bpf: sockmap/tls, close can race with map free

2019-07-11 Thread John Fastabend
Jakub Kicinski wrote: > On Tue, 09 Jul 2019 20:33:58 -0700, John Fastabend wrote: > > Jakub Kicinski wrote: > > > On Mon, 08 Jul 2019 19:15:18 +, John Fastabend wrote: > > > > @@ -352,15 +354,18 @@ static void tls_sk_proto_close(struct sock *sk, > > > > long timeout) > > > > if (ctx-

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

2019-07-11 Thread John Fastabend
Jakub Kicinski wrote: > On Tue, 09 Jul 2019 20:39:24 -0700, John Fastabend wrote: > > Jakub Kicinski wrote: > > > On Mon, 08 Jul 2019 19:14:05 +, John Fastabend wrote: > > > > @@ -287,6 +313,27 @@ static void tls_sk_proto_cleanup(struct sock *sk, > > > > #endif > > > > } > > > > > > > > +

[PATCH net-next 1/1] tc-tests: updated skbedit tests

2019-07-11 Thread Roman Mashak
- Added mask upper bound test case - Added mask validation test case - Added mask replacement case Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/skbedit.json | 117 + 1 file changed, 117 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc

Re: [PATCH] libertas: add terminating entry to fw_table

2019-07-11 Thread Sergei Shtylyov
Hello! On 07/11/2019 05:27 PM, Oliver Neukum wrote: > In case no firmware was found, the system would happily read > and try to load garbage. Terminate the table properly. > > Signed-off-by: Oliver Neukum > Fixes: ce84bb69f50e6 ("libertas USB: convert to asynchronous firmware > loading") T

Re: [PATCH v3 bpf] selftests/bpf: do not ignore clang failures

2019-07-11 Thread Ilya Leoshkevich
> Am 11.07.2019 um 16:55 schrieb Andrii Nakryiko : > > On Thu, Jul 11, 2019 at 2:14 AM Ilya Leoshkevich wrote: >> >> >> In addition, pull Kbuild.include in order to get .DELETE_ON_ERROR target, > > In your original patch you explicitly declared .DELETE_ON_ERROR, but > in this one you just incl

Re: [PATCH v3 bpf] selftests/bpf: do not ignore clang failures

2019-07-11 Thread Andrii Nakryiko
On Thu, Jul 11, 2019 at 2:14 AM Ilya Leoshkevich wrote: > > When compiling an eBPF prog fails, make still returns 0, because > failing clang command's output is piped to llc and therefore its > exit status is ignored. > > When clang fails, pipe the string "clang failed" to llc. This will make > ll

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

2019-07-11 Thread Andrii Nakryiko
On Thu, Jul 11, 2019 at 5:13 AM Krzesimir Nowak wrote: > > On Thu, Jul 11, 2019 at 3:08 AM 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 specification

[PATCH v4 bpf-next 4/4] selftests/bpf: fix compiling loop{1,2,3}.c on s390

2019-07-11 Thread Ilya Leoshkevich
Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390. Signed-off-by: Ilya Leoshkevich --- tools/testing/selftests/bpf/progs/loop1.c | 2 +- tools/testing/selftests/bpf/progs/loop2.c | 2 +- tools/testing/selftests/bpf/progs/loop3.c | 2 +- 3 files changed, 3 insertions(+), 3 del

[PATCH v4 bpf-next 3/4] selftests/bpf: make PT_REGS_* work in userspace

2019-07-11 Thread Ilya Leoshkevich
Right now, on certain architectures, these macros are usable only with kernel headers. This patch makes it possible to use them with userspace headers and, as a consequence, not only in BPF samples, but also in BPF selftests. On s390, provide the forward declaration of struct pt_regs and cast it t

[PATCH v4 bpf-next 2/4] selftests/bpf: fix s930 -> s390 typo

2019-07-11 Thread Ilya Leoshkevich
Also check for __s390__ instead of __s390x__, just in case bpf_helpers.h is ever used by 32-bit userspace. Signed-off-by: Ilya Leoshkevich --- tools/testing/selftests/bpf/bpf_helpers.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/bpf/bpf_

[PATCH v4 bpf-next 1/4] selftests/bpf: compile progs with -D__TARGET_ARCH_$(SRCARCH)

2019-07-11 Thread Ilya Leoshkevich
This opens up the possibility of accessing registers in an arch-independent way. Signed-off-by: Ilya Leoshkevich --- tools/testing/selftests/bpf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Mak

[PATCH v4 bpf-next 0/4] selftests/bpf: fix compiling loop{1,2,3}.c on s390

2019-07-11 Thread Ilya Leoshkevich
Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390. This patch series consists of three preparatory commits, which make it possible to use PT_REGS_RC in BPF selftests, followed by the actual fix. > > Will this also work for 32-bit x86? > Thanks, this is a good catch: this build

[PATCH] libertas: add terminating entry to fw_table

2019-07-11 Thread Oliver Neukum
In case no firmware was found, the system would happily read and try to load garbage. Terminate the table properly. Signed-off-by: Oliver Neukum Fixes: ce84bb69f50e6 ("libertas USB: convert to asynchronous firmware loading") Reported-by: syzbot+8a8f48672560c8ca5...@syzkaller.appspotmail.com ---

Re: [PATCH net-next,v2 3/3] net: flow_offload: add flow_block structure and use it

2019-07-11 Thread Jiri Pirko
Thu, Jul 11, 2019 at 03:09:23PM CEST, pa...@netfilter.org wrote: >This object stores the flow block callbacks that are attached to this >block. This patch restores block sharing. > >Fixes: da3eeb904ff4 ("net: flow_offload: add list handling functions") >Signed-off-by: Pablo Neira Ayuso >--- >v3: a

Re: [PATCH net-next 3/3] net: flow_offload: add flow_block structure and use it

2019-07-11 Thread Jiri Pirko
Thu, Jul 11, 2019 at 03:13:00PM CEST, pa...@netfilter.org wrote: >On Thu, Jul 11, 2019 at 10:06:09AM +0200, Jiri Pirko wrote: >> Thu, Jul 11, 2019 at 02:12:35AM CEST, pa...@netfilter.org wrote: >> >This object stores the flow block callbacks that are attached to this >> >block. This patch restores

Re: [PATCH net-next 3/3] net: flow_offload: add flow_block structure and use it

2019-07-11 Thread Pablo Neira Ayuso
On Thu, Jul 11, 2019 at 10:06:09AM +0200, Jiri Pirko wrote: > Thu, Jul 11, 2019 at 02:12:35AM CEST, pa...@netfilter.org wrote: > >This object stores the flow block callbacks that are attached to this > >block. This patch restores block sharing. > > > >Fixes: da3eeb904ff4 ("net: flow_offload: add li

[PATCH net-next,v2 2/3] net: flow_offload: rename tc_setup_cb_t to flow_setup_cb_t

2019-07-11 Thread Pablo Neira Ayuso
Rename this type definition and adapt users. Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- include/net/flow_offload.h | 16 ++-- include/ne

[PATCH net-next,v2 3/3] net: flow_offload: add flow_block structure and use it

2019-07-11 Thread Pablo Neira Ayuso
This object stores the flow block callbacks that are attached to this block. This patch restores block sharing. Fixes: da3eeb904ff4 ("net: flow_offload: add list handling functions") Signed-off-by: Pablo Neira Ayuso --- v3: add flow_block_init() - Jiri Pirko. include/net/flow_offload.h|

[PATCH net-next,v2 1/3] net: flow_offload: remove netns parameter from flow_block_cb_alloc()

2019-07-11 Thread Pablo Neira Ayuso
No need to annotate the netns on the flow block callback object, flow_block_cb_is_busy() already checks for used blocks. Fixes: d63db30c8537 ("net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()") Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko --- v2: no changes drive

Re: [PATCH net-next 00/11] Add drop monitor for offloaded data paths

2019-07-11 Thread Ido Schimmel
On Sun, Jul 07, 2019 at 12:45:41PM -0700, David Miller wrote: > From: Ido Schimmel > Date: Sun, 7 Jul 2019 10:58:17 +0300 > > > Users have several ways to debug the kernel and understand why a packet > > was dropped. For example, using "drop monitor" and "perf". Both > > utilities trace kfree_sk

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

2019-07-11 Thread Jiong Wang
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 adjusting >>> subprog start. >>> >>> At this layer, insns inside patch buffer could be jump, but they should >>> have been

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

2019-07-11 Thread Krzesimir Nowak
On Thu, Jul 11, 2019 at 3:08 AM 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 specification to be a first retvals spec. > > Cc: Krzesimir Nowak > Signed-off-by

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

2019-07-11 Thread Jiong Wang
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 adjusting >> subprog start. >> >> At this layer, insns inside patch buffer could be jump, but they should >> have been resolved, meaning they shouldn

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

2019-07-11 Thread Jiong Wang
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 layer. >> >> This layer has bpf insn sequence as the solo input, therefore the tasks >> to be finished

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

2019-07-11 Thread Stefano Garzarella
On Thu, Jul 11, 2019 at 03:37:00PM +0800, Jason Wang wrote: > > On 2019/7/10 下午11:37, Stefano Garzarella wrote: > > Hi, > > as Jason suggested some months ago, I looked better at the virtio-net > > driver to > > understand if we can reuse some parts also in the virtio-vsock driver, > > since we

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

2019-07-11 Thread Jiong Wang
Andrii Nakryiko writes: > On Thu, Jul 4, 2019 at 2:31 PM Jiong Wang wrote: >> >> This is an RFC based on latest bpf-next about acclerating insn patching >> speed, it is now near the shape of final PATCH set, and we could see the >> changes migrating to list patching would brings, so send out fo

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Eric Dumazet
On 7/11/19 9:28 AM, Christoph Paasch wrote: > > Would it make sense to always allow the alloc in tcp_fragment when coming > from __tcp_retransmit_skb() through the retransmit-timer ? > > AFAICS, the crasher was when an attacker sends "fake" SACK-blocks. Thus, we > would still be protected f

Re: general protection fault in inet_accept

2019-07-11 Thread Karsten Graul
#syz fix: net/smc: propagate file from SMC to TCP socket On 11/07/2018 21:57, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:    0026129c8629 rhashtable: add restart routine in rhashtable.. > git tree:   net > console output: https://syzkaller.appspot.com/x/l

Re: [PATCH bpf-next v3 1/6] xsk: replace ndo_xsk_async_xmit with ndo_xsk_wakeup

2019-07-11 Thread Magnus Karlsson
On Tue, Jul 9, 2019 at 1:50 AM Daniel Borkmann wrote: > > On 07/04/2019 02:42 PM, Magnus Karlsson wrote: > > This commit replaces ndo_xsk_async_xmit with ndo_xsk_wakeup. This new > > ndo provides the same functionality as before but with the addition of > > a new flags field that is used to specif

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Eric Dumazet
On 7/11/19 9:28 AM, Christoph Paasch wrote: > > >> On Jul 10, 2019, at 9:26 PM, Eric Dumazet wrote: >> >> >> >> On 7/10/19 8:53 PM, Prout, Andrew - LLSC - MITLL wrote: >>> >>> Our initial rollout was v4.14.130, but I reproduced it with v4.14.132 as >>> well, reliably for the samba test and o

Re: [PATCH net-next] net/mlx5e: Provide cb_list pointer when setting up tc block on rep

2019-07-11 Thread Vlad Buslov
On Thu 11 Jul 2019 at 03:35, wenxu wrote: > 在 2019/7/11 2:25, Vlad Buslov 写道: >> Recent refactoring of tc block offloads infrastructure introduced new >> flow_block_cb_setup_simple() method intended to be used as unified way for >> all drivers to register offload callbacks. However, commit that a

[PATCH v3 bpf] selftests/bpf: do not ignore clang failures

2019-07-11 Thread Ilya Leoshkevich
When compiling an eBPF prog fails, make still returns 0, because failing clang command's output is piped to llc and therefore its exit status is ignored. When clang fails, pipe the string "clang failed" to llc. This will make llc fail with an informative error message. This solution was chosen ove

[PATCH net-next iproute2 v2 1/3] tc: add NLA_F_NESTED flag to all actions options nested block

2019-07-11 Thread Paul Blakey
Strict netlink validation now requires this flag on all nested attributes, add it for action options. Signed-off-by: Paul Blakey --- tc/m_action.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_action.c b/tc/m_action.c index ab6bc0a..2d36a69 100644 --- a/tc/m_action.c

[PATCH net-next iproute2 v2 2/3] tc: Introduce tc ct action

2019-07-11 Thread Paul Blakey
New tc action to send packets to conntrack module, commit them, and set a zone, labels, mark, and nat on the connection. It can also clear the packet's conntrack state by using clear. Usage: ct clear ct commit [force] [zone] [mark] [label] [nat] ct [nat] [zone] Signed-off-by: Paul Blake

[PATCH net-next iproute2 v2 3/3] tc: flower: Add matching on conntrack info

2019-07-11 Thread Paul Blakey
Matches on conntrack state, zone, mark, and label. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko Acked-by: Roi Dayan --- man/man8/tc-flower.8 | 35 +++ tc/f_flower.c| 276 +

[PATCH net-next iproute2 v2 0/3] net/sched: Introduce tc connection tracking

2019-07-11 Thread Paul Blakey
Hi, This patch series add connection tracking capabilities in tc. It does so via a new tc action, called act_ct, and new tc flower classifier matching. Act ct and relevant flower matches, are still under review in net-next mailing list. Usage is as follows: $ tc qdisc add dev ens1f0_0 ingress $

Re: [PATCH net-next 1/3] net: flow_offload: remove netns parameter from flow_block_cb_alloc()

2019-07-11 Thread Jiri Pirko
Thu, Jul 11, 2019 at 02:12:33AM CEST, pa...@netfilter.org wrote: >No need to annotate the netns on the flow block callback object, >flow_block_cb_is_busy() already checks for used blocks. > >Fixes: d63db30c8537 ("net: flow_offload: add flow_block_cb_alloc() and >flow_block_cb_free()") >Signed-off-

Re: [PATCH net-next 2/3] net: flow_offload: rename tc_setup_cb_t to flow_setup_cb_t

2019-07-11 Thread Jiri Pirko
Thu, Jul 11, 2019 at 02:12:34AM CEST, pa...@netfilter.org wrote: >Rename this type definition and adapt users. > >Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko

Re: [PATCH net-next 3/3] net: flow_offload: add flow_block structure and use it

2019-07-11 Thread Jiri Pirko
Thu, Jul 11, 2019 at 02:12:35AM CEST, pa...@netfilter.org wrote: >This object stores the flow block callbacks that are attached to this >block. This patch restores block sharing. > >Fixes: da3eeb904ff4 ("net: flow_offload: add list handling functions") >Signed-off-by: Pablo Neira Ayuso >--- > incl

[PATCH net-next] netfilter: nf_table_offload: Fix zero prio of flow_cls_common_offload

2019-07-11 Thread wenxu
From: wenxu The flow_cls_common_offload prio should be not zero It leads the invalid table prio in hw. # nft add table netdev firewall # nft add chain netdev firewall acl { type filter hook ingress device mlx_pf0vf0 priority - 300 \; } # nft add rule netdev firewall acl ip daddr 1.1.1.7 drop E

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

2019-07-11 Thread Lorenzo Bianconi
> On 7/5/19 11:30 AM, Lorenzo Bianconi wrote: > > looking at the reproducer it seems to me the issue is due to the use of > > 'NTF_USE' from userspace. > > Should we unschedule the neigh timer if we are in IN_TIMER receiving this > > flag from userspace? (taking appropriate locking) > > I think yo

RE: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"

2019-07-11 Thread Jan Szewczyk
Hi guys! Yes, that's exactly it! Thank you very much, so now I know what is happening 😊. Thanks again for your help! BR, Jan Szewczyk -Original Message- From: David Ahern Sent: Wednesday, July 10, 2019 21:13 To: Stefano Brivio ; Jan Szewczyk Cc: da...@davemloft.net; netdev@vger.kern

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

2019-07-11 Thread Jason Wang
On 2019/7/10 下午11:37, Stefano Garzarella wrote: Hi, as Jason suggested some months ago, I looked better at the virtio-net driver to understand if we can reuse some parts also in the virtio-vsock driver, since we have similar challenges (mergeable buffers, page allocation, small packets, etc.).

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

2019-07-11 Thread Christoph Paasch
> On Jul 10, 2019, at 9:26 PM, Eric Dumazet wrote: > > > > On 7/10/19 8:53 PM, Prout, Andrew - LLSC - MITLL wrote: >> >> Our initial rollout was v4.14.130, but I reproduced it with v4.14.132 as >> well, reliably for the samba test and once (not reliably) with synthetic >> test I was tryin

RE: [PATCH v6 rdma-next 0/6] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA

2019-07-11 Thread Michal Kalderon
> From: linux-rdma-ow...@vger.kernel.org ow...@vger.kernel.org> On Behalf Of Gal Pressman > > On 09/07/2019 17:17, Michal Kalderon wrote: > > This patch series uses the doorbell overflow recovery mechanism > > introduced in commit 36907cd5cd72 ("qed: Add doorbell overflow > > recovery mechanism")

Re: [PATCH net-next iproute2 2/3] tc: Introduce tc ct action

2019-07-11 Thread Paul Blakey
On 7/9/2019 6:36 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jul 09, 2019 at 06:58:36AM +, Paul Blakey wrote: >> On 7/8/2019 8:54 PM, Marcelo Ricardo Leitner wrote: >>> On Sun, Jul 07, 2019 at 11:53:47AM +0300, Paul Blakey wrote: New tc action to send packets to conntrack module, commit

Re: [PATCH net-next v6 0/4] net/sched: Introduce tc connection tracking

2019-07-11 Thread Paul Blakey
On 7/9/2019 10:14 PM, David Miller wrote: > From: Paul Blakey > Date: Tue, 9 Jul 2019 10:30:47 +0300 > >> This patch series add connection tracking capabilities in tc sw datapath. >> It does so via a new tc action, called act_ct, and new tc flower classifier >> matching >> on conntrack state, m