Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-02 Thread Andrii Nakryiko
On Fri, Aug 2, 2019 at 2:56 PM Alexei Starovoitov wrote: > > On Fri, Aug 02, 2019 at 12:16:52AM -0700, Andrii Nakryiko wrote: > > On Thu, Aug 1, 2019 at 4:50 PM Alexei Starovoitov > > wrote: > > > > > > On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > > > > This patch implements

Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-08-02 Thread Nathan Chancellor
On Fri, Aug 02, 2019 at 06:39:52PM -0700, Matthew Wilcox wrote: > On Fri, Aug 02, 2019 at 06:30:31PM -0700, Nathan Chancellor wrote: > > On Fri, Aug 02, 2019 at 06:11:32PM -0700, David Miller wrote: > > > The proper way to fix this is to include either > > > > > > linux/io-64-nonatomic-hi-lo.h >

[PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors

2019-08-02 Thread Nathan Chancellor
After commit 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS"), the following combination of configs cause a few Kconfig warnings and build errors (distilled from arm allyesconfig and Randy's randconfig builds): CONFIG_NETDEVICES=y CONFIG_STAGING=y CONFIG_COMPILE_TEST=y and C

Re: [PATCH bpf-next 1/3] selftests/bpf: test_progs: switch to open_memstream

2019-08-02 Thread Andrii Nakryiko
On Fri, Aug 2, 2019 at 1:14 PM Stanislav Fomichev wrote: > > On 08/02, Andrii Nakryiko wrote: > > On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > > > Use open_memstream to override stdout during test execution. > > > The copy of the original stdout is held in env.stdout and used > > > to print sub

[PATCH 0/1] bpf: introduce new helper udp_flow_src_port

2019-08-02 Thread Farid Zakaria
This is a submission to expose a new eBPF helper method to allow access to udp_flow_src_port -- which is useful when doing any Foo Over UDP network tunneling. I hope this change adheres to the submission guidelines. I've included a test and verified it passes: ./test_progs -t udp_flow_src_port #3

[PATCH 1/1] bpf: introduce new helper udp_flow_src_port

2019-08-02 Thread Farid Zakaria
Foo over UDP uses UDP encapsulation to add additional entropy into the packets so that they get beter distribution across EMCP routes. Expose udp_flow_src_port as a bpf helper so that tunnel filters can benefit from the helper. Signed-off-by: Farid Zakaria --- include/uapi/linux/bpf.h

Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-08-02 Thread Matthew Wilcox
On Fri, Aug 02, 2019 at 06:30:31PM -0700, Nathan Chancellor wrote: > On Fri, Aug 02, 2019 at 06:11:32PM -0700, David Miller wrote: > > The proper way to fix this is to include either > > > > linux/io-64-nonatomic-hi-lo.h > > > > or > > > > linux/io-64-nonatomic-lo-hi.h > > > > whichever

Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-08-02 Thread Nathan Chancellor
On Fri, Aug 02, 2019 at 06:11:32PM -0700, David Miller wrote: > From: Nathan Chancellor > Date: Wed, 31 Jul 2019 11:50:24 -0700 > > > arm allyesconfig warns: > > > > WARNING: unmet direct dependencies detected for MDIO_OCTEON > > Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS

Re: [PATCH net] r8152: fix typo in register name

2019-08-02 Thread David Miller
From: Kevin Lo Date: Thu, 1 Aug 2019 11:29:38 +0800 > It is likely that PAL_BDC_CR should be PLA_BDC_CR. > > Signed-off-by: Kevin Lo Applied.

Re: [PATCH net] net: phy: fix race in genphy_update_link

2019-08-02 Thread David Miller
From: Heiner Kallweit Date: Wed, 31 Jul 2019 23:05:10 +0200 > In phy_start_aneg() autoneg is started, and immediately after that > link and autoneg status are read. As reported in [0] it can happen that > at time of this read the PHY has reset the "aneg complete" bit but not > yet the "link up" b

Re: [PATCH] enetc: Select PHYLIB while CONFIG_FSL_ENETC_VF is set

2019-08-02 Thread David Miller
From: YueHaibing Date: Thu, 1 Aug 2019 09:24:19 +0800 > Like FSL_ENETC, when CONFIG_FSL_ENETC_VF is set, > we should select PHYLIB, otherwise building still fails: > > drivers/net/ethernet/freescale/enetc/enetc.o: In function `enetc_open': > enetc.c:(.text+0x2744): undefined reference to `phy_st

Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning

2019-08-02 Thread David Miller
From: Nathan Chancellor Date: Wed, 31 Jul 2019 11:50:24 -0700 > arm allyesconfig warns: > > WARNING: unmet direct dependencies detected for MDIO_OCTEON > Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] > && 64BIT && HAS_IOMEM [=y] && OF_MDIO [=y] > Selected by [y]: > -

Re: [PATCH] net/ethernet/qlogic/qed: force the string buffer NULL-terminated

2019-08-02 Thread David Miller
From: Wang Xiayang Date: Wed, 31 Jul 2019 16:15:42 +0800 > strncpy() does not ensure NULL-termination when the input string > size equals to the destination buffer size 30. > The output string is passed to qed_int_deassertion_aeu_bit() > which calls DP_INFO() and relies NULL-termination. > > Use

Re: [PATCH net-next] net/tls: prevent skb_orphan() from leaking TLS plain text with offload

2019-08-02 Thread David Miller
From: Jakub Kicinski Date: Tue, 30 Jul 2019 14:12:58 -0700 > I'm sending this for net-next because of lack of confidence > in my own abilities. It should apply cleanly to net... :) It looks like there will be changes to this.

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread Jakub Kicinski
On Sat, 3 Aug 2019 07:19:31 +0800, wenxu wrote: > > Or: > > > > device unregister: > > - nft block destroy > > - UNBIND cb > > - free driver's block state > > - driver notifier callback > > - free driver's state > > > > No? > > For the second case maybe can't unbind cb? because

RE: [PATCH net 1/2] net/tls: partially revert fix transition through disconnect with close

2019-08-02 Thread John Fastabend
Jakub Kicinski wrote: > Looks like we were slightly overzealous with the shutdown() > cleanup. Even though the sock->sk_state can reach CLOSED again, > socket->state will not got back to SS_UNCONNECTED once > connections is ESTABLISHED. Meaning we will see EISCONN if > we try to reconnect, and EINV

[PATCH bpf-next 2/2] selftests/bpf: add loop test 5

2019-08-02 Thread Alexei Starovoitov
Add a test with multiple exit conditions. It's not an infinite loop only when the verifier can properly track all math on variable 'i' through all possible ways of executing this loop. barrier()s are needed to disable llvm optimization that combines multiple branches into fewer branches. Signed-o

[PATCH bpf-next 0/2] selftests/bpf: more loop tests

2019-08-02 Thread Alexei Starovoitov
Add two bounded loop tests. Alexei Starovoitov (2): selftests/bpf: add loop test 4 selftests/bpf: add loop test 5 .../bpf/prog_tests/bpf_verif_scale.c | 2 + tools/testing/selftests/bpf/progs/loop4.c | 23 tools/testing/selftests/bpf/progs/loop5.c | 37

[PATCH bpf-next 1/2] selftests/bpf: add loop test 4

2019-08-02 Thread Alexei Starovoitov
Add a test that returns a 'random' number between [0, 2^20) If state pruning is not working correctly for loop body the number of processed insns will be 2^20 * num_of_insns_in_loop_body and the program will be rejected. Signed-off-by: Alexei Starovoitov --- .../bpf/prog_tests/bpf_verif_scale.c

Re: [PATCH] net: sctp: Rename fallthrough label to unhandled

2019-08-02 Thread David Miller
From: Joe Perches Date: Fri, 02 Aug 2019 10:47:34 -0700 > On Wed, 2019-07-31 at 08:16 -0400, Neil Horman wrote: >> On Wed, Jul 31, 2019 at 04:32:43AM -0700, Joe Perches wrote: >> > On Wed, 2019-07-31 at 07:19 -0400, Neil Horman wrote: >> > > On Tue, Jul 30, 2019 at 10:04:37PM -0700, Joe Perches w

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread wenxu
在 2019/8/3 2:02, Jakub Kicinski 写道: > On Fri, 2 Aug 2019 21:09:03 +0800, wenxu wrote: We'd have something like the loop in flow_get_default_block(): for each (subsystem) subsystem->handle_new_indir_cb(indr_dev, cb); And then per-subsystem logic would ac

Re: [PATCH net 0/2] flow_offload hardware priority fixes

2019-08-02 Thread Jakub Kicinski
On Sat, 3 Aug 2019 00:04:09 +0200, Pablo Neira Ayuso wrote: > That patch removed the reference to tcf_auto_prio() already, please > let me know if you have any more specific update you would like to see > on that patch. Please explain why the artificial priorities are needed at all. Hardware shoul

Re: [PATCH net 0/2] flow_offload hardware priority fixes

2019-08-02 Thread Pablo Neira Ayuso
Hi Jakub, On Fri, Aug 02, 2019 at 01:47:38PM -0700, Jakub Kicinski wrote: > On Fri, 2 Aug 2019 13:00:23 +0200, Pablo Neira Ayuso wrote: > > Hi Jakub, > > > > If the user specifies 'pref' in the new rule, then tc checks if there > > is a tcf_proto object that matches this priority. If the tcf_prot

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-02 Thread Alexei Starovoitov
On Fri, Aug 02, 2019 at 12:16:52AM -0700, Andrii Nakryiko wrote: > On Thu, Aug 1, 2019 at 4:50 PM Alexei Starovoitov > wrote: > > > > On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > > > This patch implements the core logic for BPF CO-RE offsets relocations. > > > Every instructi

Re: [PATCH v4 net-next 18/19] ionic: Add coalesce and other features

2019-08-02 Thread Shannon Nelson
On 7/25/19 5:13 PM, Saeed Mahameed wrote: On Mon, 2019-07-22 at 14:40 -0700, Shannon Nelson wrote: +static void ionic_tx_timeout_work(struct work_struct *ws) +{ + struct lif *lif = container_of(ws, struct lif, tx_timeout_work); + + netdev_info(lif->netdev, "Tx Timeout recovery\n");

[PATCH bpf-next v2 3/3] selftests/bpf: test_progs: drop extra trailing tab

2019-08-02 Thread Stanislav Fomichev
Small (un)related cleanup. Cc: Andrii Nakryiko Acked-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/test_progs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/te

[PATCH bpf-next v2 2/3] selftests/bpf: test_progs: test__printf -> printf

2019-08-02 Thread Stanislav Fomichev
Now that test__printf is a simple wraper around printf, let's drop it (and test__vprintf as well). Cc: Andrii Nakryiko Acked-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/prog_tests/bpf_verif_scale.c | 4 ++-- .../testing/selftests/bpf/prog_tests/l4lb_all.c |

[PATCH bpf-next v2 1/3] selftests/bpf: test_progs: switch to open_memstream

2019-08-02 Thread Stanislav Fomichev
Use open_memstream to override stdout during test execution. The copy of the original stdout is held in env.stdout and used to print subtest info and dump failed log. test_{v,}printf are now simple wrappers around stdout and will be removed in the next patch. v2: * add ifdef __GLIBC__ around open

[PATCH bpf-next v2 0/3] selftests/bpf: switch test_progs back to stdio

2019-08-02 Thread Stanislav Fomichev
I was looking into converting test_sockops* to test_progs framework and that requires using cgroup_helpers.c which rely on stdio/stderr. Let's use open_memstream to override stdout into buffer during subtests instead of custom test_{v,}printf wrappers. That lets us continue to use stdio in the subt

Re: [PATCH net-next 0/3,v2] flow_offload hardware priority fixes

2019-08-02 Thread Jakub Kicinski
On Fri, 2 Aug 2019 15:28:43 +0200, Pablo Neira Ayuso wrote: > v2: address Jakub comments to not use the netfilter basechain > priority for this mapping. Hardly.

Re: [net-next 01/12] net/mlx5: E-Switch, add ingress rate support

2019-08-02 Thread Saeed Mahameed
On Fri, 2019-08-02 at 12:44 -0700, Alexei Starovoitov wrote: > On Fri, Aug 02, 2019 at 07:22:21PM +, Saeed Mahameed wrote: > > On Fri, 2019-08-02 at 10:37 -0700, Alexei Starovoitov wrote: > > > On Thu, Aug 1, 2019 at 6:30 PM Saeed Mahameed < > > > sae...@mellanox.com> > > > wrote: > > > > From:

Re: [PATCH net 0/2] flow_offload hardware priority fixes

2019-08-02 Thread Jakub Kicinski
On Fri, 2 Aug 2019 13:00:23 +0200, Pablo Neira Ayuso wrote: > Hi Jakub, > > If the user specifies 'pref' in the new rule, then tc checks if there > is a tcf_proto object that matches this priority. If the tcf_proto > object does not exist, tc creates a tcf_proto object and it adds the > new rule t

Re: [PATCH net] ipv4/route: do not check saddr dev if iif is LOOPBACK_IFINDEX

2019-08-02 Thread Stefano Brivio
David, On Thu, 1 Aug 2019 13:51:25 -0600 David Ahern wrote: > On 8/1/19 2:29 AM, Hangbin Liu wrote: > > Jianlin reported a bug that for IPv4, ip route get from src_addr would fail > > if src_addr is not an address on local system. > > > > \# ip route get 1.1.1.1 from 2.2.2.2 > > RTNETLINK answe

Re: [PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to stdio

2019-08-02 Thread Stanislav Fomichev
On 08/02, Andrii Nakryiko wrote: > > On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > > I was looking into converting test_sockops* to test_progs framework > > and that requires using cgroup_helpers.c which rely on stdio/stderr. > > Let's use open_memstream to override stdout into buffer during > >

Re: [PATCH bpf-next 1/3] selftests/bpf: test_progs: switch to open_memstream

2019-08-02 Thread Stanislav Fomichev
On 08/02, Andrii Nakryiko wrote: > On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > > Use open_memstream to override stdout during test execution. > > The copy of the original stdout is held in env.stdout and used > > to print subtest info and dump failed log. > > I really like the idea. I didn't k

Re: [PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to stdio

2019-08-02 Thread Andrii Nakryiko
On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > I was looking into converting test_sockops* to test_progs framework > and that requires using cgroup_helpers.c which rely on stdio/stderr. > Let's use open_memstream to override stdout into buffer during > subtests instead of custom test_{v,}printf w

Re: [PATCH bpf-next 3/3] selftests/bpf: test_progs: drop extra trailing tab

2019-08-02 Thread Andrii Nakryiko
On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > Small (un)related cleanup. > > Cc: Andrii Nakryiko > Signed-off-by: Stanislav Fomichev > --- Acked-by: Andrii Nakryiko > tools/testing/selftests/bpf/test_progs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testi

Re: [PATCH bpf-next 2/3] selftests/bpf: test_progs: test__printf -> printf

2019-08-02 Thread Andrii Nakryiko
On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > Now that test__printf is a simple wraper around printf, let's drop it > (and test__vprintf as well). > > Cc: Andrii Nakryiko > Signed-off-by: Stanislav Fomichev > --- Acked-by: Andrii Nakryiko > .../selftests/bpf/prog_tests/bpf_verif_scale.c

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

2019-08-02 Thread Bernd
2019-08-02 21:14 GMT+02:00, Neal Cardwell : > What's the exact kernel version you are using? It is the RHEL errata kernel 3.10.0-957.21.3.el7 (rhsa-2019:1481), i need to check if there is a newer one. > Eric submitted a patch recently that may address your issue: >tcp: be more careful in tcp_

Re: [PATCH bpf-next 1/3] selftests/bpf: test_progs: switch to open_memstream

2019-08-02 Thread Andrii Nakryiko
On 8/2/19 10:17 AM, Stanislav Fomichev wrote: > Use open_memstream to override stdout during test execution. > The copy of the original stdout is held in env.stdout and used > to print subtest info and dump failed log. I really like the idea. I didn't know about open_memstream, it's awesome. Than

Re: [net-next 01/12] net/mlx5: E-Switch, add ingress rate support

2019-08-02 Thread Alexei Starovoitov
On Fri, Aug 02, 2019 at 07:22:21PM +, Saeed Mahameed wrote: > On Fri, 2019-08-02 at 10:37 -0700, Alexei Starovoitov wrote: > > On Thu, Aug 1, 2019 at 6:30 PM Saeed Mahameed > > wrote: > > > From: Eli Cohen > > > > > > Use the scheduling elements to implement ingress rate limiter on an > > >

[PATCH ethtool] ethtool: dump nested registers

2019-08-02 Thread Vivien Didelot
Usually kernel drivers set the regs->len value to the same length as info->regdump_len, which was used for the allocation. In case where regs->len is smaller than the allocated info->regdump_len length, we may assume that the dump contains a nested set of registers. This becomes handy for kernel d

[PATCH net-next] net: dsa: dump CPU port regs through master

2019-08-02 Thread Vivien Didelot
Merge the CPU port registers dump into the master interface registers dump through ethtool, by nesting the ethtool_drvinfo and ethtool_regs structures of the CPU port into the dump. drvinfo->regdump_len will contain the full data length, while regs->len will contain only the master interface regis

Re: [net-next 01/12] net/mlx5: E-Switch, add ingress rate support

2019-08-02 Thread Saeed Mahameed
On Fri, 2019-08-02 at 10:37 -0700, Alexei Starovoitov wrote: > On Thu, Aug 1, 2019 at 6:30 PM Saeed Mahameed > wrote: > > From: Eli Cohen > > > > Use the scheduling elements to implement ingress rate limiter on an > > eswitch ports ingress traffic. Since the ingress of eswitch port is > > the >

[PATCH net 0/2] Fix batched event generation for vlan action

2019-08-02 Thread Roman Mashak
When adding or deleting a batch of entries, the kernel sends up to TCA_ACT_MAX_PRIO (defined to 32 in kernel) entries in an event to user space. However it does not consider that the action sizes may vary and require different skb sizes. For example, consider the following script adding 32 entries

[PATCH net 1/2] net sched: update vlan action for batched events operations

2019-08-02 Thread Roman Mashak
Add get_fill_size() routine used to calculate the action size when building a batch of events. Fixes: c7e2b9689 ("sched: introduce vlan action") Signed-off-by: Roman Mashak --- net/sched/act_vlan.c | 9 + 1 file changed, 9 insertions(+) diff --git a/net/sched/act_vlan.c b/net/sched/act_

[PATCH net 2/2] tc-testing: updated vlan action tests with batch create/delete

2019-08-02 Thread Roman Mashak
Update TDC tests with cases varifying ability of TC to install or delete batches of vlan actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/vlan.json | 94 ++ 1 file changed, 94 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc-t

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

2019-08-02 Thread Neal Cardwell
On Fri, Aug 2, 2019 at 3:03 PM Bernd wrote: > > Hello, > > While analyzing a aborted upload packet capture I came across a odd > trace where a sender was not responding to a duplicate SACK but > sending further segments until it stalled. > > Took me some time until I remembered this fix, and actua

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

2019-08-02 Thread Bernd
Hello, While analyzing a aborted upload packet capture I came across a odd trace where a sender was not responding to a duplicate SACK but sending further segments until it stalled. Took me some time until I remembered this fix, and actually the problems started since the security fix was applied

Re: [v2,1/2] tools: bpftool: add net attach command to attach XDP on interface

2019-08-02 Thread Jakub Kicinski
On Fri, 2 Aug 2019 14:02:29 +0900, Daniel T. Lee wrote: > On Fri, Aug 2, 2019 at 8:36 AM Jakub Kicinski wrote: > > On Thu, 1 Aug 2019 17:11:32 +0900, Daniel T. Lee wrote: > > > By this commit, using `bpftool net attach`, user can attach XDP prog on > > > interface. New type of enum 'net_attach_

Re: [PATCH bpf-next v4 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-08-02 Thread Jonathan Lemon
On 2 Aug 2019, at 1:11, Björn Töpel wrote: > From: Björn Töpel > > When an AF_XDP socket is released/closed the XSKMAP still holds a > reference to the socket in a "released" state. The socket will still > use the netdev queue resource, and block newly created sockets from > attaching to that

Re: [PATCH bpf-next v4 2/2] xsk: support BPF_EXIST and BPF_NOEXIST flags in XSKMAP

2019-08-02 Thread Jonathan Lemon
On 2 Aug 2019, at 1:11, Björn Töpel wrote: > From: Björn Töpel > > The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flags when updating > an entry. This patch addresses that. > > Signed-off-by: Björn Töpel Reviewed-by: Jonathan Lemon

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread Jakub Kicinski
On Fri, 2 Aug 2019 21:09:03 +0800, wenxu wrote: > >> We'd have something like the loop in flow_get_default_block(): > >> > >>for each (subsystem) > >>subsystem->handle_new_indir_cb(indr_dev, cb); > >> > >> And then per-subsystem logic would actually call the cb. Or: > >> > >>for

Re: [PATCH net-next] openvswitch: Print error when ovs_execute_actions() fails

2019-08-02 Thread Gregory Rose
On 8/1/2019 2:14 PM, Yifeng Sun wrote: Currently in function ovs_dp_process_packet(), return values of ovs_execute_actions() are silently discarded. This patch prints out an error message when error happens so as to provide helpful hints for debugging. Signed-off-by: Yifeng Sun --- net/openvs

Re: [net-next 01/12] net/mlx5: E-Switch, add ingress rate support

2019-08-02 Thread Alexei Starovoitov
On Thu, Aug 1, 2019 at 6:30 PM Saeed Mahameed wrote: > > From: Eli Cohen > > Use the scheduling elements to implement ingress rate limiter on an > eswitch ports ingress traffic. Since the ingress of eswitch port is the > egress of VF port, we control eswitch ingress by controlling VF egress. Loo

[PATCH iproute2-next v2] ip tunnel: add json output

2019-08-02 Thread Andrea Claudi
Add json support on iptunnel and ip6tunnel. The plain text output format should remain the same. Signed-off-by: Andrea Claudi --- Changes since v1: * Use print_color_* for ifname and ip addresses; * Use print_null() instead of print_bool() where appropriate; * Reduce indentation level on tnl_p

Re: [PATCH iproute2-next] ip tunnel: add json output

2019-08-02 Thread Andrea Claudi
On Fri, Aug 2, 2019 at 5:49 PM Stephen Hemminger wrote: > > On Fri, 2 Aug 2019 13:14:15 +0200 > Andrea Claudi wrote: > > > On Thu, Aug 1, 2019 at 5:16 PM Stephen Hemminger > > wrote: > > > > > > On Thu, 1 Aug 2019 12:12:58 +0200 > > > Andrea Claudi wrote: > > > > > > > Add json support on iptu

[PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to stdio

2019-08-02 Thread Stanislav Fomichev
I was looking into converting test_sockops* to test_progs framework and that requires using cgroup_helpers.c which rely on stdio/stderr. Let's use open_memstream to override stdout into buffer during subtests instead of custom test_{v,}printf wrappers. That lets us continue to use stdio in the subt

[PATCH bpf-next 1/3] selftests/bpf: test_progs: switch to open_memstream

2019-08-02 Thread Stanislav Fomichev
Use open_memstream to override stdout during test execution. The copy of the original stdout is held in env.stdout and used to print subtest info and dump failed log. test_{v,}printf are now simple wrappers around stdout and will be removed in the next patch. Cc: Andrii Nakryiko Signed-off-by: S

[PATCH bpf-next 2/3] selftests/bpf: test_progs: test__printf -> printf

2019-08-02 Thread Stanislav Fomichev
Now that test__printf is a simple wraper around printf, let's drop it (and test__vprintf as well). Cc: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/prog_tests/bpf_verif_scale.c | 4 ++-- .../testing/selftests/bpf/prog_tests/l4lb_all.c | 2 +- .../testing/selftest

[PATCH bpf-next 3/3] selftests/bpf: test_progs: drop extra trailing tab

2019-08-02 Thread Stanislav Fomichev
Small (un)related cleanup. Cc: Andrii Nakryiko Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/test_progs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index 71c717162a

Re: [net v1 PATCH 4/4] net: fix bpf_xdp_adjust_head regression for generic-XDP

2019-08-02 Thread Jakub Kicinski
On Fri, 2 Aug 2019 09:53:54 +0200, Jesper Dangaard Brouer wrote: > On Thu, 1 Aug 2019 17:44:06 -0700 > Jakub Kicinski wrote: > > > On Thu, 01 Aug 2019 20:00:31 +0200, Jesper Dangaard Brouer wrote: > > > When generic-XDP was moved to a later processing step by commit > > > 458bf2f224f0 ("net: co

Re: [net-next 2/9] i40e: make visible changed vf mac on host

2019-08-02 Thread Shannon Nelson
On 8/2/19 1:14 AM, Loktionov, Aleksandr wrote: Good day Nelson Please don't top post.  The custom on this mailing list is to answer inline in order to be sure we're answering in context.  As it is, I believe you missed answering one of my questions. In 99% cases VF has _only one_ unicast m

Re: [patch 1/1] drivers/net/ethernet/marvell/mvmdio.c: Fix non OF case

2019-08-02 Thread Rtp
Andrew Lunn writes: Hi, > On Fri, Aug 02, 2019 at 10:32:40AM +0200, Arnaud Patard wrote: >> Orion5.x systems are still using machine files and not device-tree. >> Commit 96cb4342382290c9 ("net: mvmdio: allow up to three clocks to be >> specified for orion-mdio") has replaced devm_clk_get() with

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-02 Thread David Ahern
On 8/2/19 9:15 AM, Alexei Starovoitov wrote: > On Thu, Aug 1, 2019 at 9:11 PM David Ahern wrote: >> >> On 8/1/19 6:19 PM, Alexei Starovoitov wrote: >>> Do you really need 'sleep 1' everywhere? >>> It makes them so slow to run... >>> What happens if you just remove it ? Tests will fail? Why? >> >>

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-02 Thread David Ahern
On 8/2/19 9:14 AM, Alexei Starovoitov wrote: > On Thu, Aug 1, 2019 at 9:04 PM David Ahern wrote: >> ... >> >>> >>> with -v I see: >>> COMMAND: ip netns exec ns-A ping -c1 -w1 -I 172.16.2.1 172.16.1.2 >>> ping: unknown iface 172.16.2.1 >>> TEST: ping out, address bind - ns-B IP

Re: [PATCH iproute2-next] ip tunnel: add json output

2019-08-02 Thread Stephen Hemminger
On Fri, 2 Aug 2019 13:14:15 +0200 Andrea Claudi wrote: > On Thu, Aug 1, 2019 at 5:16 PM Stephen Hemminger > wrote: > > > > On Thu, 1 Aug 2019 12:12:58 +0200 > > Andrea Claudi wrote: > > > > > Add json support on iptunnel and ip6tunnel. > > > The plain text output format should remain the sam

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-08-02 Thread David Ahern
On 8/2/19 1:48 AM, Jiri Pirko wrote: > Wed, Jul 31, 2019 at 09:58:10PM CEST, dsah...@gmail.com wrote: >> On 7/31/19 1:46 PM, David Ahern wrote: >>> On 7/31/19 1:45 PM, Jiri Pirko wrote: > check. e.g., what happens if a resource controller has been configured > for the devlink instance and i

Re: [PATCH 2/2] net: mvpp2: support multiple comphy lanes

2019-08-02 Thread Maxime Chevallier
Hello Matt, On Thu, 1 Aug 2019 16:45:23 -0400 Matt Pelland wrote: >mvpp 2.2 supports RXAUI which requires a pair of serdes lanes instead of >the usual single lane required by other interface modes. This patch >expands the number of lanes that can be associated to a port so that >both lanes are

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-02 Thread Alexei Starovoitov
On Thu, Aug 1, 2019 at 9:11 PM David Ahern wrote: > > On 8/1/19 6:19 PM, Alexei Starovoitov wrote: > > Do you really need 'sleep 1' everywhere? > > It makes them so slow to run... > > What happens if you just remove it ? Tests will fail? Why? > > yes, the sleep 1 is needed. A server process is get

[PATCH net] inet: frags: re-introduce skb coalescing for local delivery

2019-08-02 Thread Guillaume Nault
Before commit d4289fcc9b16 ("net: IP6 defrag: use rbtrees for IPv6 defrag"), a netperf UDP_STREAM test[0] using big IPv6 datagrams (thus generating many fragments) and running over an IPsec tunnel, reported more than 6Gbps throughput. After that patch, the same test gets only 9Mbps when receiving o

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-02 Thread Alexei Starovoitov
On Thu, Aug 1, 2019 at 9:04 PM David Ahern wrote: > ... > > > > > with -v I see: > > COMMAND: ip netns exec ns-A ping -c1 -w1 -I 172.16.2.1 172.16.1.2 > > ping: unknown iface 172.16.2.1 > > TEST: ping out, address bind - ns-B IP > > [FAIL] > > With ping from

Re: [patch 1/1] drivers/net/ethernet/marvell/mvmdio.c: Fix non OF case

2019-08-02 Thread Andrew Lunn
On Fri, Aug 02, 2019 at 10:32:40AM +0200, Arnaud Patard wrote: > Orion5.x systems are still using machine files and not device-tree. > Commit 96cb4342382290c9 ("net: mvmdio: allow up to three clocks to be > specified for orion-mdio") has replaced devm_clk_get() with of_clk_get(), > leading to a oop

[PATCH net-next 1/3,v2] net: sched: use major priority number as hardware priority

2019-08-02 Thread Pablo Neira Ayuso
tc transparently maps the software priority number to hardware. Update it to pass the major priority which is what most drivers expect. Update drivers too so they do not need to lshift the priority field of the flow_cls_common_offload object. The stmmac driver is an exception, since this code assum

[PATCH net-next 3/3] filter: nf_tables_offload: set priority field for rules

2019-08-02 Thread Pablo Neira Ayuso
This patch allocates the priority per rule starting from priority 1 since some drivers assume priority 0 never happens. This patch is restricting the rule priority range to 8-bit integer since the nft_rule object has 7-bit spare bits plus one that is scratched from the handle. It should be possibl

[PATCH net-next 2/3] netfilter: nf_tables_offload: add offload field to basechain

2019-08-02 Thread Pablo Neira Ayuso
Wrap offload objects in struct nft_base_chain around structure. Signed-off-by: Pablo Neira Ayuso --- v1: initial patch version. include/net/netfilter/nf_tables.h | 6 -- include/net/netfilter/nf_tables_offload.h | 5 + net/netfilter/nf_tables_api.c | 2 +- net/netfil

[PATCH net-next 0/3,v2] flow_offload hardware priority fixes

2019-08-02 Thread Pablo Neira Ayuso
Hi, This patchset contains three updates for the flow_offload users: 1) Pass major tc priority to drivers so they do not have to lshift it. This is a preparation patch for the fix coming in patch 3/3. 2) Add a new structure to basechain objects to wrap the offload data. This is another

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread wenxu
在 2019/8/2 18:45, wenxu 写道: > On 8/2/2019 7:11 AM, Jakub Kicinski wrote: >> On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: >>> From: wenxu >>> >>> The new flow-indr-block can't get the tcf_block >>> directly. It provide a callback list to find the flow_block immediately >>> when the

[PATCH 1/4] can: sja1000: force the string buffer NULL-terminated

2019-08-02 Thread Marc Kleine-Budde
From: Wang Xiayang strncpy() does not ensure NULL-termination when the input string size equals to the destination buffer size IFNAMSIZ. The output string 'name' is passed to dev_info which relies on NULL-termination. Use strlcpy() instead. This issue is identified by a Coccinelle script. Sign

[PATCH 4/4] can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices

2019-08-02 Thread Marc Kleine-Budde
From: Tomas Bortoli Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by: syzbot+d6a5a1a3657b596ef...@syzkaller.appspotmail.com Fixes: f14e22435a27 ("net: can: peak_usb: Do not do dma

[PATCH 3/4] can: peak_usb: pcan_usb_fd: uix info-leaks to USB devices

2019-08-02 Thread Marc Kleine-Budde
From: Tomas Bortoli Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEA

[PATCH 2/4] can: peak_usb: force the string buffer NULL-terminated

2019-08-02 Thread Marc Kleine-Budde
From: Wang Xiayang strncpy() does not ensure NULL-termination when the input string size equals to the destination buffer size IFNAMSIZ. The output string is passed to dev_info() which relies on the NULL-termination. Use strlcpy() instead. This issue is identified by a Coccinelle script. Signe

pull-request: can 2019-08-02

2019-08-02 Thread Marc Kleine-Budde
-can.git tags/linux-can-fixes-for-5.3-20190802 for you to fetch changes up to ead16e53c2f0ed946d82d4037c630e2f60f4ab69: can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices (2019-08-02 13:58:01 +0200) linux-can-fixes-for-5.3

Re: [PATCH iproute2-next] ip tunnel: add json output

2019-08-02 Thread Andrea Claudi
On Thu, Aug 1, 2019 at 5:16 PM Stephen Hemminger wrote: > > On Thu, 1 Aug 2019 12:12:58 +0200 > Andrea Claudi wrote: > > > Add json support on iptunnel and ip6tunnel. > > The plain text output format should remain the same. > > > > Signed-off-by: Andrea Claudi > > --- > > ip/ip6tunnel.c | 82 +

Re: [PATCH net 0/2] flow_offload hardware priority fixes

2019-08-02 Thread Pablo Neira Ayuso
Hi Jakub, If the user specifies 'pref' in the new rule, then tc checks if there is a tcf_proto object that matches this priority. If the tcf_proto object does not exist, tc creates a tcf_proto object and it adds the new rule to this tcf_proto. In cls_flower, each tcf_proto only stores one single

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-02 Thread wenxu
On 8/2/2019 7:11 AM, Jakub Kicinski wrote: > On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: >> From: wenxu >> >> The new flow-indr-block can't get the tcf_block >> directly. It provide a callback list to find the flow_block immediately >> when the device register and contain a ingres

Re: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list

2019-08-02 Thread Hangbin Liu
On Thu, Aug 01, 2019 at 12:51:14PM -0400, David Miller wrote: > From: Hangbin Liu > Date: Thu, 1 Aug 2019 17:03:47 +0800 > > > When setting lots of multicast list on ibmveth, e.g. add 3000 membership on > > a > > multicast group, the following error message flushes our log file > > > > 8507

Re: [v2,1/2] tools: bpftool: add net attach command to attach XDP on interface

2019-08-02 Thread Daniel T. Lee
On Fri, Aug 2, 2019 at 3:23 PM Y Song wrote: > > On Thu, Aug 1, 2019 at 2:04 AM Daniel T. Lee wrote: > > > > By this commit, using `bpftool net attach`, user can attach XDP prog on > > interface. New type of enum 'net_attach_type' has been made, as stated at > > cover-letter, the meaning of 'atta

[patch 1/1] drivers/net/ethernet/marvell/mvmdio.c: Fix non OF case

2019-08-02 Thread Rtp
Orion5.x systems are still using machine files and not device-tree. Commit 96cb4342382290c9 ("net: mvmdio: allow up to three clocks to be specified for orion-mdio") has replaced devm_clk_get() with of_clk_get(), leading to a oops at boot and not working network, as reported in https://lists.debian

[PATCH net] net/smc: avoid fallback in case of non-blocking connect

2019-08-02 Thread Karsten Graul
From: Ursula Braun FASTOPEN is not possible with SMC. sendmsg() with msg_flag MSG_FASTOPEN triggers a fallback to TCP if the socket is in state SMC_INIT. But if a nonblocking connect is already started, fallback to TCP is no longer possible, even though the socket may still be in state SMC_INIT.

Re: [v2,2/2] tools: bpftool: add net detach command to detach XDP on interface

2019-08-02 Thread Daniel T. Lee
On Fri, Aug 2, 2019 at 3:26 PM Y Song wrote: > > On Thu, Aug 1, 2019 at 2:04 AM Daniel T. Lee wrote: > > > > By this commit, using `bpftool net detach`, the attached XDP prog can > > be detached. Detaching the BPF prog will be done through libbpf > > 'bpf_set_link_xdp_fd' with the progfd set to -

[PATCH net] net/smc: do not schedule tx_work in SMC_CLOSED state

2019-08-02 Thread Karsten Graul
From: Ursula Braun The setsockopts options TCP_NODELAY and TCP_CORK may schedule the tx worker. Make sure the socket is not yet moved into SMC_CLOSED state (for instance by a shutdown SHUT_RDWR call). Reported-by: syzbot+92209502e7aab127c...@syzkaller.appspotmail.com Reported-by: syzbot+b972214b

RE: [net-next 2/9] i40e: make visible changed vf mac on host

2019-08-02 Thread Loktionov, Aleksandr
Good day Nelson In 99% cases VF has _only one_ unicast mac anyway, and the last MAC has been chosen because of VF mac address change algo - it marks unicast filter for deletion and appends a new unicast filter to the list. The implementation has been chosen because of simplicity /* Just 3 more

[PATCH bpf-next v4 2/2] xsk: support BPF_EXIST and BPF_NOEXIST flags in XSKMAP

2019-08-02 Thread Björn Töpel
From: Björn Töpel The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flags when updating an entry. This patch addresses that. Signed-off-by: Björn Töpel --- kernel/bpf/xskmap.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/xskmap.c b/kernel

[PATCH bpf-next v4 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-08-02 Thread Björn Töpel
From: Björn Töpel When an AF_XDP socket is released/closed the XSKMAP still holds a reference to the socket in a "released" state. The socket will still use the netdev queue resource, and block newly created sockets from attaching to that queue, but no user application can access the fill/complet

[PATCH bpf-next v4 0/2] net: xdp: XSKMAP improvements

2019-08-02 Thread Björn Töpel
This series (v4 and counting) add two improvements for the XSKMAP, used by AF_XDP sockets. 1. Automatic cleanup when an AF_XDP socket goes out of scope/is released. Instead of require that the user manually clears the "released" state socket from the map, this is done automatically. Each

Re: [net v1 PATCH 4/4] net: fix bpf_xdp_adjust_head regression for generic-XDP

2019-08-02 Thread Jesper Dangaard Brouer
On Thu, 1 Aug 2019 17:44:06 -0700 Jakub Kicinski wrote: > On Thu, 01 Aug 2019 20:00:31 +0200, Jesper Dangaard Brouer wrote: > > When generic-XDP was moved to a later processing step by commit > > 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") > > a regression was introduced w

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-08-02 Thread Jiri Pirko
Wed, Jul 31, 2019 at 09:58:10PM CEST, dsah...@gmail.com wrote: >On 7/31/19 1:46 PM, David Ahern wrote: >> On 7/31/19 1:45 PM, Jiri Pirko wrote: check. e.g., what happens if a resource controller has been configured for the devlink instance and it is moved to a namespace whose existing >>>

Re: [patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-08-02 Thread Jiri Pirko
Wed, Jul 31, 2019 at 09:46:13PM CEST, dsah...@gmail.com wrote: >On 7/31/19 1:45 PM, Jiri Pirko wrote: >>> check. e.g., what happens if a resource controller has been configured >>> for the devlink instance and it is moved to a namespace whose existing >>> config exceeds those limits? >> >> It's mo

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-08-02 Thread Jiri Pirko
Thu, Aug 01, 2019 at 12:31:52AM CEST, dsah...@gmail.com wrote: >On 7/31/19 4:28 PM, Jakub Kicinski wrote: >> On Wed, 31 Jul 2019 16:07:31 -0600, David Ahern wrote: >>> On 7/31/19 4:02 PM, Jakub Kicinski wrote: Can you elaborate further? Ports for most purposes are represented by netdevice

  1   2   >