Re: [PATCH net-next 2/4] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread Nicolas Dichtel
Le 21/11/2018 à 22:07, David Ahern a écrit : > On 11/21/18 1:58 PM, Nicolas Dichtel wrote: >> The target-nsid is not stored in net_cb (not needed). ref_net is set only if >> tgt_net comes from TARGET_NSID. I can add a comment. > > ref_net is added by this patch and it is only used (unless I missed

[PATCH net] team: no need to do team_notify_peers or team_mcast_rejoin when disabling port

2018-11-22 Thread Hangbin Liu
team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin() will send multicast join group message to notify peers. We should do this when enabling/changed to a new port. But it doesn't make sense to do it when a port is disabled. On the other hand, when we set mcast_rejoin_count

Re: consistency for statistics with XDP mode

2018-11-22 Thread Toke Høiland-Jørgensen
Saeed Mahameed writes: >> > I'd say it sounds reasonable to include XDP in the normal traffic >> > counters, but having the detailed XDP-specific counters is quite >> > useful >> > as well... So can't we do both (for all drivers)? >> > > > What are you thinking ? > reporting XDP_DROP in interfa

Re: net: thunderx: nicvf_xdp_setup error code path

2018-11-22 Thread Lorenzo Bianconi
> > Sunil did review this, so please resubmit formally. Hi David, I have already posted a formal patch: https://patchwork.ozlabs.org/patch/1001213/ Reviewing the mail I have not explicitly added you in cc, sorry Regards, Lorenzo

[PATCH net-next 00/10] net/smc: patches 2018-11-22

2018-11-22 Thread Ursula Braun
Dave, here are more patches for SMC: * patches 1-3 and 7 are cleanups without functional change * patches 4-6 and 8 are optimizations of existing code * patches 9 and 10 introduce and exploit LLC message DELETE RKEY Thanks, Ursula Karsten Graul (3): net/smc: avoid a delay by waiting for nothin

[PATCH net-next 01/10] net/smc: cleanup tcp_listen_worker initialization

2018-11-22 Thread Ursula Braun
The tcp_listen_worker is already initialized when socket is created (in smc_sock_alloc()). Get rid of the duplicate initialization in smc_listen(). No functional change. Signed-off-by: Ursula Braun --- net/smc/af_smc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/smc/af_smc.c b/net/smc

[PATCH net-next 05/10] net/smc: no link delete for a never active link

2018-11-22 Thread Ursula Braun
If a link is terminated that has never reached the active state, there is no need to trigger an LLC DELETE LINK. Signed-off-by: Ursula Braun --- net/smc/smc_core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 4812ca30f1dc..

[PATCH net-next 07/10] net/smc: cleanup listen worker mutex unlocking

2018-11-22 Thread Ursula Braun
For easier reading move the unlock of mutex smc_create_lgr_pending into smc_listen_work(), i.e. into the function the mutex has been locked. No functional change. Reported-by: Dan Carpenter Signed-off-by: Ursula Braun --- net/smc/af_smc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(

[PATCH net-next 04/10] net/smc: allow fallback after clc timeouts

2018-11-22 Thread Ursula Braun
If connection initialization fails for the LLC CONFIRM LINK or the LLC ADD LINK step, fallback to TCP should be enabled. Thus the negative return code -EAGAIN should switch to a positive timeout reason code in these cases, and the internal CLC socket should not have a set sk_err. Signed-off-by: Ur

[PATCH net-next 02/10] net/smc: make smc_lgr_free() static

2018-11-22 Thread Ursula Braun
smc_lgr_free() is just called inside smc_core.c. Make it static. Just cleanup, no functional change. Signed-off-by: Ursula Braun --- net/smc/smc_core.c | 4 +++- net/smc/smc_core.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index

[PATCH net-next 10/10] net/smc: unregister rkeys of unused buffer

2018-11-22 Thread Ursula Braun
From: Karsten Graul When an rmb is no longer in use by a connection, unregister its rkey at the remote peer with an LLC DELETE RKEY message. With this change, unused buffers held in the buffer pool are no longer registered at the remote peer. They are registered before the buffer is actually used

[PATCH net-next 09/10] net/smc: add infrastructure to send delete rkey messages

2018-11-22 Thread Ursula Braun
From: Karsten Graul Add the infrastructure to send LLC messages of type DELETE RKEY to unregister a shared memory region at the peer. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun --- net/smc/smc_core.h | 3 +++ net/smc/smc_llc.c | 53 +

[PATCH net-next 08/10] net/smc: avoid a delay by waiting for nothing

2018-11-22 Thread Ursula Braun
From: Karsten Graul When a send failed then don't start to wait for a response in smc_llc_do_confirm_rkey. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun --- net/smc/smc_llc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.

[PATCH net-next 06/10] net/smc: short wait for late smc_clc_wait_msg

2018-11-22 Thread Ursula Braun
After sending one of the initial LLC messages CONFIRM LINK or ADD LINK, there is already a wait for the LLC response. It does not make sense to wait another long time for a CLC DECLINE. Thus this patch introduces a shorter wait time for these cases. Signed-off-by: Ursula Braun --- net/smc/af_smc

[PATCH net-next 03/10] net/smc: remove sock_error detour in clc-functions

2018-11-22 Thread Ursula Braun
There is no need to store the return value in sk_err, if it is afterwards cleared again with sock_error(). This patch sets the return value directly. Just cleanup, no functional change. Signed-off-by: Ursula Braun --- net/smc/smc_clc.c | 18 +- 1 file changed, 5 insertions(+), 13

Re: [PATCH bpf-next v2 1/1] bpf, lpm: make longest_prefix_match() faster

2018-11-22 Thread Daniel Borkmann
On 11/22/2018 06:39 AM, Eric Dumazet wrote: > At LPC 2018 in Vancouver, Vlad Dumitrescu mentioned that > longest_prefix_match() > has a high cost [1]. > > One reason for that cost is a loop handling one byte at a time. > > We can handle more bytes at a time, if enough attention is paid > to endi

Re: [PATCH bpf-next 1/2] libbpf: Add version script for DSO

2018-11-22 Thread Daniel Borkmann
On 11/21/2018 11:22 PM, Alexei Starovoitov wrote: > On 11/21/18 12:18 PM, Yonghong Song wrote: >> On 11/21/18 9:40 AM, Andrey Ignatov wrote: >>> More and more projects use libbpf and one day it'll likely be packaged >>> and distributed as DSO and that requires ABI versioning so that both >>> compat

Re: [PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed

2018-11-22 Thread Anssi Hannula
Hi, On 12.9.2018 2:53, Andrew Lunn wrote: > Many Ethernet MAC drivers want to limit the PHY to only advertise a > maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use > of the helper function phy_set_max_speed(). But what if the PHY does not support 1Gbps in the first place? This

Re: [PATCH] samples: bpf: fix: error handling regarding kprobe_events

2018-11-22 Thread Daniel Borkmann
On 11/21/2018 05:07 PM, Daniel T. Lee wrote: > Currently, kprobe_events failure won't be handled properly. > Due to calling system() indirectly to write to kprobe_events, > it can't be identified whether an error is derived from kprobe or system. > > // buf = "echo '%c:%s %s' >> /s/k/d/t/kprob

Re: selftests/bpf :get_cgroup_id_user: File not found: /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id

2018-11-22 Thread Daniel Borkmann
Hi Naresh, On 11/21/2018 06:53 PM, Y Song wrote: > On Wed, Nov 21, 2018 at 3:44 AM Naresh Kamboju > wrote: >> >> Kselftest bpf get_cgroup_id_user is failed on all devices. >> >> selftests: bpf: get_cgroup_id_user >> main:PASS:setup_cgroup_environment >> main:PASS:create_and_get_cgroup >> main:PAS

[PATCH net-next 0/4] octeontx2-af: CGX LMAC link bringup and cleanups

2018-11-22 Thread Linu Cherian
From: Linu Cherian Patch 1: Code cleanup Patch 2: Adds support for an unhandled hardware configuration Patch 3: Preparatory patch for enabling cgx lmac links Patch 4: Support for enabling cgx lmac links Linu Cherian (4): octeontx2-af: Misc cleanups in cgx driver octeontx2-af: Handle non-c

[PATCH net-next 1/4] octeontx2-af: Misc cleanups in cgx driver

2018-11-22 Thread Linu Cherian
From: Linu Cherian * Do CGX init before NIX init This would add consistency in NIX code that depends on cgx ports * Few other misc cleanups - rvu_cgx_probe renamed as rvu_cgx_init for consistency - rvu_cgx_exit wrapper added to take care of the exit path - Added error check on cgx_lmac_e

[PATCH net-next 3/4] octeontx2-af: Unregister cgx event callbacks gracefully

2018-11-22 Thread Linu Cherian
From: Linu Cherian Added provision to unregister cgx event callbacks. This enables the exit path to ensure event callbacks are unregistered before workqueues get destroyed. Signed-off-by: Linu Cherian --- .../net/ethernet/marvell/octeontx2/af/cgx.c | 29 ++- .../net/ethernet/

[PATCH net-next 4/4] octeontx2-af: Bringup CGX LMAC links by default

2018-11-22 Thread Linu Cherian
From: Linu Cherian - Added new CGX firmware interface API for sending link up/down commands - Do link up for cgx lmac ports by default at the time of CGX driver probe. Since cgx link up in driver probe affects the Linux boot time, linkup procedure is kept threaded using workqueues. For

[PATCH net-next 2/4] octeontx2-af: Handle non-contiguous CGX LMAC interfaces

2018-11-22 Thread Linu Cherian
From: Linu Cherian For this, cgx_id(struct cgx) definition has been changed to reflect cgx port id instead of device instance id. Now cgx_id can be directly used as channel offset for NPC configuration. Assumptions on contiguous cgx port ids has been removed from nix_calibrate_x2p as well. As a

Re: DSA support for Marvell 88e6065 switch

2018-11-22 Thread Pavel Machek
On Mon 2018-11-19 04:25:35, Andrew Lunn wrote: > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > should just attach it as soon as it is compiled in? > > Nope. It is a switch, not a PHY. Switches are never auto-probed > because they are not guaranteed to have ID registers

maximum number of cpu cores for interrupt handling

2018-11-22 Thread Oleg
Hi, all. I found info that IO APIC limit the number of cpu cores for interrupt handling to 8(because of just 4 bits using for cpu number or something like this). But now MSI/MSI-X is used for interrupts and i don't know is this limit is actual now. For example, i have 4 nic with 8 rx/tx queues

[PATCH v3 1/4] bpf: respect size hint to BPF_PROG_TEST_RUN if present

2018-11-22 Thread Lorenz Bauer
Use data_size_out as a size hint when copying test output to user space. ENOSPC is returned if the output buffer is too small. Callers which so far did not set data_size_out are not affected. Signed-off-by: Lorenz Bauer --- include/uapi/linux/bpf.h | 7 +-- net/bpf/test_run.c | 15 +++

[PATCH v3 2/4] tools: sync uapi/linux/bpf.h

2018-11-22 Thread Lorenz Bauer
Pull changes from "bpf: respect size hint to BPF_PROG_TEST_RUN if present". Signed-off-by: Lorenz Bauer --- tools/include/uapi/linux/bpf.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 05d95290b848

[PATCH v3 3/4] libbpf: add bpf_prog_test_run_xattr

2018-11-22 Thread Lorenz Bauer
Add a new function, which encourages safe usage of the test interface. bpf_prog_test_run continues to work as before, but should be considered unsafe. Signed-off-by: Lorenz Bauer --- tools/lib/bpf/bpf.c | 27 +++ tools/lib/bpf/bpf.h | 13 + 2 files changed, 40

[PATCH v3 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-22 Thread Lorenz Bauer
Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. This is because bpf_test_finish copies the output buffer to user space without checking its size. This can lead to the kernel overwriting data in user space after the buffer if xdp_adjust_head and friends are in play. Changes

[PATCH v3 4/4] selftests: add a test for bpf_prog_test_run_xattr

2018-11-22 Thread Lorenz Bauer
Make sure that bpf_prog_test_run_xattr returns the correct length and that the kernel respects the output size hint. Also check that errno indicates ENOSPC if there is a short output buffer given. Signed-off-by: Lorenz Bauer --- tools/testing/selftests/bpf/test_progs.c | 49 +

[PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-22 Thread Petr Oros
The driver enumerates Tx queues in ndo_tx_timeout() handler, here is possible race with be_update_queues. For this case we set carrier_off. It prevents netdev watchdog to be fired after be_clear_queues(). The watchdog timeout doesn't make any sense here as we re-creating queues. Reproducer: We can

Re: DSA support for Marvell 88e6065 switch

2018-11-22 Thread Lennert Buytenhek
On Thu, Nov 22, 2018 at 02:21:23PM +0100, Pavel Machek wrote: > > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > > should just attach it as soon as it is compiled in? > > > > Nope. It is a switch, not a PHY. Switches are never auto-probed > > because they are not guara

[PATCH net-next v2 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread Nicolas Dichtel
Like the previous patch, the goal is to ease to convert nsids from one netns to another netns. A new attribute (NETNSA_CURRENT_NSID) is added to the kernel answer when NETNSA_TARGET_NSID is provided, thus the user can easily convert nsids. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/ne

[PATCH net-next v2 0/5] Ease to interpret net-nsid

2018-11-22 Thread Nicolas Dichtel
The goal of this series is to ease the interpretation of nsid received in netlink messages from other netns (when the user uses NETLINK_F_LISTEN_ALL_NSID). After this series, with a patched iproute2: $ ip netns add foo $ ip netns add bar $ touch /var/run/netns/init_net $ mount --bind /proc/1/ns/n

[PATCH net-next v2 3/5] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread Nicolas Dichtel
Like it was done for link and address, add the ability to perform get/dump in another netns by specifying a target nsid attribute. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/net_namespace.h | 1 + net/core/net_namespace.c | 86 ++ 2 files changed

[PATCH net-next v2 1/5] netns: remove net arg from rtnl_net_fill()

2018-11-22 Thread Nicolas Dichtel
This argument is not used anymore. Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") Signed-off-by: Nicolas Dichtel --- net/core/net_namespace.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.

[PATCH net-next v2 2/5] netns: introduce 'struct net_fill_args'

2018-11-22 Thread Nicolas Dichtel
This is a preparatory work. To avoid having to much arguments for the function rtnl_net_fill(), a new structure is defined. Signed-off-by: Nicolas Dichtel --- net/core/net_namespace.c | 48 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/n

[PATCH net-next v2 4/5] netns: enable to specify a nsid for a get request

2018-11-22 Thread Nicolas Dichtel
Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one netns to a nsid of another netns. This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the user to interpret a nsid received from an other netns. Signed-off-by: Nicolas Dichtel --- net/core/net_namespace.

[PATCH bpf] bpf: Fix integer overflow in queue_stack_map_alloc.

2018-11-22 Thread Wei Wu
Integer overflow in queue_stack_map_alloc when calculating size may lead to heap overflow of arbitrary length. The patch fix it by checking whether attr->max_entries+1 < attr->max_entries and bailing out if it is the case. The vulnerability is discovered with the assistance of syzkaller. Reported-

[PATCH] bpf: fix check of allowed specifiers in bpf_trace_printk

2018-11-22 Thread Martynas Pumputis
A format string consisting of "%p" or "%s" followed by an invalid specifier (e.g. "%p%\n" or "%s%") could pass the check which would make format_decode (lib/vsprintf.c) to warn. Reported-by: syzbot+1ec5c5ec949c4adaa...@syzkaller.appspotmail.com Signed-off-by: Martynas Pumputis --- kernel/trace/b

Re: [PATCH bpf] bpf: Fix integer overflow in queue_stack_map_alloc.

2018-11-22 Thread Greg KH
On Thu, Nov 22, 2018 at 11:59:02PM +0800, Wei Wu wrote: > Integer overflow in queue_stack_map_alloc when calculating size may > lead to heap overflow of arbitrary length. > The patch fix it by checking whether attr->max_entries+1 < > attr->max_entries and bailing out if it is the case. > The vulner

Re: [PATCH net-next 2/2] net: bridge: add no_linklocal_learn bool option

2018-11-22 Thread Andrew Lunn
> int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt) > { > - int optval = 0; > - > switch (opt) { > + case BR_BOOLOPT_NO_LL_LEARN: > + return br_opt_get(br, BROPT_NO_LL_LEARN); > default: > break; > } > > - return optv

Re: [PATCH net-next v2 1/5] netns: remove net arg from rtnl_net_fill()

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > This argument is not used anymore. > > Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") > Signed-off-by: Nicolas Dichtel > --- > net/core/net_namespace.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > Re

Re: [PATCH net-next,v3 00/12] add flow_rule infrastructure

2018-11-22 Thread Marcelo Ricardo Leitner
On Wed, Nov 21, 2018 at 03:51:20AM +0100, Pablo Neira Ayuso wrote: > Hi, > > This patchset is the third iteration [1] [2] [3] to introduce a kernel > intermediate (IR) to express ACL hardware offloads. On v2 cover letter you had: """ However, cost of this layer is very small, adding 1 million ru

Re: [PATCH net-next v2 2/5] netns: introduce 'struct net_fill_args'

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > This is a preparatory work. To avoid having to much arguments for the > function rtnl_net_fill(), a new structure is defined. > > Signed-off-by: Nicolas Dichtel > --- > net/core/net_namespace.c | 48 > 1 file

Re: [PATCH net-next v2 3/5] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > Like it was done for link and address, add the ability to perform get/dump > in another netns by specifying a target nsid attribute. > > Signed-off-by: Nicolas Dichtel > --- > include/uapi/linux/net_namespace.h | 1 + > net/core/net_namespace.c

Re: [PATCH net-next v2 4/5] netns: enable to specify a nsid for a get request

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one > netns to a nsid of another netns. > This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the > user to interpret a nsid received from an other netns. > > Sign

Re: [PATCH net-next,v3 04/12] cls_api: add translator to flow_action representation

2018-11-22 Thread Marcelo Ricardo Leitner
On Wed, Nov 21, 2018 at 03:51:24AM +0100, Pablo Neira Ayuso wrote: ... > +int tc_setup_flow_action(struct flow_action *flow_action, > + const struct tcf_exts *exts) > +{ > + const struct tc_action *act; > + int i, j, k; > + > + if (!exts) > + return 0; >

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Yuchung Cheng
On Wed, Nov 21, 2018 at 2:40 PM, Eric Dumazet wrote: > > > On 11/21/2018 02:31 PM, Yuchung Cheng wrote: >> On Wed, Nov 21, 2018 at 9:52 AM, Eric Dumazet wrote: > >>> + >> Really nice! would it make sense to re-use (some of) the similar >> tcp_try_coalesce()? >> > > Maybe, but it is a bit complex,

[PATCH bpf] bpf: Fix integer overflow in queue_stack_map_alloc.

2018-11-22 Thread ww9210
Integer overflow in queue_stack_map_alloc when calculating size may lead to heap overflow of arbitrary length. The patch fix it by checking whether attr->max_entries+1 < attr->max_entries and bailing out if it is the case. The vulnerability is discovered with the assistance of syzkaller. Reporte

Re: [PATCH net-next v2 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread David Ahern
On 11/22/18 8:50 AM, Nicolas Dichtel wrote: > diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c > index dd25fb22ad45..25030e0317a2 100644 > --- a/net/core/net_namespace.c > +++ b/net/core/net_namespace.c > @@ -745,6 +745,8 @@ struct net_fill_args { > int flags; > int cmd;

Re: [PATCH net-next v2 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread Nicolas Dichtel
Le 22/11/2018 à 17:40, David Ahern a écrit : > On 11/22/18 8:50 AM, Nicolas Dichtel wrote: >> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c >> index dd25fb22ad45..25030e0317a2 100644 >> --- a/net/core/net_namespace.c >> +++ b/net/core/net_namespace.c >> @@ -745,6 +745,8 @@ struct

Re: consistency for statistics with XDP mode

2018-11-22 Thread David Ahern
On 11/21/18 5:53 PM, Toshiaki Makita wrote: >> We really need consistency in the counters and at a minimum, users >> should be able to track packet and byte counters for both Rx and Tx >> including XDP. >> >> It seems to me the Rx and Tx packet, byte and dropped counters returned >> for the standar

Re: consistency for statistics with XDP mode

2018-11-22 Thread David Ahern
On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: > Saeed Mahameed writes: > I'd say it sounds reasonable to include XDP in the normal traffic counters, but having the detailed XDP-specific counters is quite useful as well... So can't we do both (for all drivers)? >> >>

Re: [PATCH net-next,v3 12/12] qede: use ethtool_rx_flow_rule() to remove duplicated parser code

2018-11-22 Thread Marcelo Ricardo Leitner
On Wed, Nov 21, 2018 at 03:51:32AM +0100, Pablo Neira Ayuso wrote: ... > static int > qede_parse_flower_attr(struct qede_dev *edev, __be16 proto, > -struct tc_cls_flower_offload *f, > -struct qede_arfs_tuple *tuple) > +struct flow_rule *

Re: consistency for statistics with XDP mode

2018-11-22 Thread Toke Høiland-Jørgensen
David Ahern writes: > On 11/22/18 1:26 AM, Toke Høiland-Jørgensen wrote: >> Saeed Mahameed writes: >> > I'd say it sounds reasonable to include XDP in the normal traffic > counters, but having the detailed XDP-specific counters is quite > useful > as well... So can't we do both

patchwork bug?

2018-11-22 Thread Nicolas Dichtel
Not sure if it's the right place to post that. When I try to list patches with filters, something like this: http://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=2036&state=*&q=&archive=both&delegate=34 I can see only page 1. When I click on '2', the page 1 is still displayed and th

Re: [RFC v4 1/5] udp_tunnel: add config option to bind to a device

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > UDP tunnel sockets are always opened unbound to a specific device. This > patch allow the socket to be bound on a custom device, which > incidentally makes UDP tunnels VRF-aware if binding to an l3mdev. > > Signed-off-by: Alexis Bauvin > Reviewed-by: Am

Re: [RFC v4 2/5] l3mdev: add function to retreive upper master

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > Existing functions to retreive the l3mdev of a device did not walk the > master chain to find the upper master. This patch adds a function to > find the l3mdev, even indirect through e.g. a bridge: > > ... > > This will properly resolve the l3mdev of e

Re: [RFC v4 4/5] netdev: add netdev_is_upper_master

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index 93243479085f..12459036d0da 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -7225,6 +7225,23 @@ void netdev_lower_state_changed(struct net_device > *lower_dev, > } > EXPORT_SYMBOL(netdev_low

Re: [RFC v4 3/5] vxlan: add support for underlay in non-default VRF

2018-11-22 Thread David Ahern
On 11/21/18 6:07 PM, Alexis Bauvin wrote: > Creating a VXLAN device with is underlay in the non-default VRF makes > egress route lookup fail or incorrect since it will resolve in the > default VRF, and ingress fail because the socket listens in the default > VRF. > > This patch binds the underlyin

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Neal Cardwell
On Wed, Nov 21, 2018 at 12:52 PM Eric Dumazet wrote: > > In case GRO is not as efficient as it should be or disabled, > we might have a user thread trapped in __release_sock() while > softirq handler flood packets up to the point we have to drop. > > This patch balances work done from user thread

Re: [RFC v4 4/5] netdev: add netdev_is_upper_master

2018-11-22 Thread Alexis Bauvin
Le 22 nov. 2018 à 18:14, David Ahern a écrit : > On 11/21/18 6:07 PM, Alexis Bauvin wrote: >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 93243479085f..12459036d0da 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -7225,6 +7225,23 @@ void netdev_lower_state_changed(struct net

Re: [PATCH v1 net] lan743x: Enable driver to work with LAN7431

2018-11-22 Thread Andrew Lunn
On Wed, Nov 21, 2018 at 02:22:45PM -0500, Bryan Whitehead wrote: > This driver was designed to work with both LAN7430 and LAN7431. > The only difference between the two is the LAN7431 has support > for external phy. > > This change adds LAN7431 to the list of recognized devices > supported by this

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Eric Dumazet
On Thu, Nov 22, 2018 at 10:01 AM Neal Cardwell wrote: > > On Wed, Nov 21, 2018 at 12:52 PM Eric Dumazet wrote: > > > > In case GRO is not as efficient as it should be or disabled, > > we might have a user thread trapped in __release_sock() while > > softirq handler flood packets up to the point w

Re: [PATCH net-next 2/3] tcp: implement coalescing on backlog queue

2018-11-22 Thread Eric Dumazet
On Thu, Nov 22, 2018 at 10:16 AM Eric Dumazet wrote: > Yes, I was considering properly filtering SACK as a refinement later [1] > but you raise a valid point for alien stacks that are not yet using SACK :/ > > [1] This version of the patch will not aggregate sacks since the > memcmp() on tcp opti

Re: [PATCH net-next 4/4] octeontx2-af: Bringup CGX LMAC links by default

2018-11-22 Thread Andrew Lunn
On Thu, Nov 22, 2018 at 05:18:37PM +0530, Linu Cherian wrote: > From: Linu Cherian > > - Added new CGX firmware interface API for sending link up/down > commands > > - Do link up for cgx lmac ports by default at the time of CGX > driver probe. Hi Linu This is a complex driver which i don't

Re: [PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed

2018-11-22 Thread Andrew Lunn
On Thu, Nov 22, 2018 at 12:40:25PM +0200, Anssi Hannula wrote: > Hi, > > On 12.9.2018 2:53, Andrew Lunn wrote: > > Many Ethernet MAC drivers want to limit the PHY to only advertise a > > maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use > > of the helper function phy_set_max_spe

[PATCH bpf] bpf: fix integer overflow in queue_stack_map

2018-11-22 Thread Alexei Starovoitov
fix the following issues: - allow queue_stack_map for root only - fix u32 max_entries overflow - disallow value_size == 0 Reported-by: Wei Wu Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Alexei Starovoitov --- kernel/bpf/queue_stack_maps.c | 16 1 file c

Re: [PATCH net-next] selftests: explicitly require kernel features needed by udpgro tests

2018-11-22 Thread David Miller
From: Paolo Abeni Date: Wed, 21 Nov 2018 14:31:15 +0100 > commit 3327a9c46352f1 ("selftests: add functionals test for UDP GRO") > make use of ipv6 NAT, but such a feature is not currently implied by > selftests. Since the 'ip[6]tables' commands may actually create nft rules, > depending on the sp

Re: [PATCH net] net/dim: Update DIM start sample after each DIM iteration

2018-11-22 Thread David Miller
From: Tal Gilboa Date: Wed, 21 Nov 2018 16:28:23 +0200 > On every iteration of net_dim, the algorithm may choose to > check for the system state by comparing current data sample > with previous data sample. After each of these comparison, > regardless of the action taken, the sample used as basel

Re: [PATCH net-next] {net,IB}/mlx4: Initialize CQ buffers in the driver when possible

2018-11-22 Thread David Miller
From: Tariq Toukan Date: Wed, 21 Nov 2018 17:12:05 +0200 > From: Daniel Jurgens > > Perform CQ initialization in the driver when the capability is supported > by the FW. When passing the CQ to HW indicate that the CQ buffer has > been pre-initialized. > > Doing so decreases CQ creation time.

[PATCH v2 bpf-next] bpf: add skb->tstamp r/w access from tc clsact and cg skb progs

2018-11-22 Thread Vlad Dumitrescu
This could be used to rate limit egress traffic in concert with a qdisc which supports Earliest Departure Time, such as FQ. Write access from cg skb progs only with CAP_SYS_ADMIN, since the value will be used by downstream qdiscs. It might make sense to relax this. Changes v1 -> v2: - allow acc

Re: [PATCH net] net: thunderx: set xdp_prog to NULL if bpf_prog_add fails

2018-11-22 Thread David Miller
From: Lorenzo Bianconi Date: Wed, 21 Nov 2018 16:32:10 +0100 > Set xdp_prog pointer to NULL if bpf_prog_add fails since that routine > reports the error code instead of NULL in case of failure and xdp_prog > pointer value is used in the driver to verify if XDP is currently > enabled. > Moreover r

Re: DSA support for Marvell 88e6065 switch

2018-11-22 Thread Pavel Machek
Hi! > > > > If I wanted it to work, what do I need to do? AFAICT phy autoprobing > > > > should just attach it as soon as it is compiled in? > > > > > > Nope. It is a switch, not a PHY. Switches are never auto-probed > > > because they are not guaranteed to have ID registers. > > > > > > You nee

Re: [PATCH bpf] bpf: fix integer overflow in queue_stack_map

2018-11-22 Thread Daniel Borkmann
On 11/22/2018 07:49 PM, Alexei Starovoitov wrote: > fix the following issues: > - allow queue_stack_map for root only > - fix u32 max_entries overflow > - disallow value_size == 0 > > Reported-by: Wei Wu > Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") > Signed-off-by: Alexei Starovoitov

[PATCH net-next 0/5] r8169: some functional improvements

2018-11-22 Thread Heiner Kallweit
This series includes a few functional improvements. Heiner Kallweit (5): r8169: Remove ancient GCC bug workaround in a second place r8169: remove default chip versions r8169: simplify detecting chip versions with same XID r8169: use napi_consume_skb where possible r8169: replace macro TX

[PATCH bpf-next] bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_QUEUE to bpftool-map

2018-11-22 Thread David Calavera
I noticed that these two new BPF Maps are not defined in bpftool. This patch defines those two maps and adds their names to the bpftool-map documentation. Signed-off-by: David Calavera --- tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- tools/bpf/bpftool/map.c |

[PATCH net-next 1/5] r8169: remove ancient GCC bug workaround in a second place

2018-11-22 Thread Heiner Kallweit
Remove ancient GCC bug workaround in a second place and factor out rtl_8169_get_txd_opts1. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next 3/5] r8169: simplify detecting chip versions with same XID

2018-11-22 Thread Heiner Kallweit
For the GMII chip versions we set the version number which was set already. This can be simplified. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.

[PATCH net-next 4/5] r8169: use napi_consume_skb where possible

2018-11-22 Thread Heiner Kallweit
Use napi_consume_skb() where possible to profit from bulk free infrastructure. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r

[PATCH net-next 5/5] r8169: replace macro TX_FRAGS_READY_FOR with a function

2018-11-22 Thread Heiner Kallweit
Replace macro TX_FRAGS_READY_FOR with function rtl_tx_slots_avail to make code cleaner and type-safe. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/realte

[PATCH net-next 2/5] r8169: remove default chip versions

2018-11-22 Thread Heiner Kallweit
Even the chip versions within a family have so many differences that using a default chip version doesn't really make sense. Instead of leaving a best case flaky network connectivity, bail out and report the unknown chip version. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8

Re: [PATCH net-next,v3 00/12] add flow_rule infrastructure

2018-11-22 Thread Marcelo Ricardo Leitner
On Thu, Nov 22, 2018 at 02:22:20PM -0200, Marcelo Ricardo Leitner wrote: > On Wed, Nov 21, 2018 at 03:51:20AM +0100, Pablo Neira Ayuso wrote: > > Hi, > > > > This patchset is the third iteration [1] [2] [3] to introduce a kernel > > intermediate (IR) to express ACL hardware offloads. > > On v2 co

Re: [PATCH] bpf: fix check of allowed specifiers in bpf_trace_printk

2018-11-22 Thread Daniel Borkmann
Hi Martynas, On 11/22/2018 05:00 PM, Martynas Pumputis wrote: > A format string consisting of "%p" or "%s" followed by an invalid > specifier (e.g. "%p%\n" or "%s%") could pass the check which > would make format_decode (lib/vsprintf.c) to warn. > > Reported-by: syzbot+1ec5c5ec949c4adaa...@syzkal

Re: [RFC PATCH bpf-next] libbpf: make bpf_object__open default to UNSPEC

2018-11-22 Thread Daniel Borkmann
[ +Wang ] On 11/22/2018 07:03 AM, Nikita V. Shirokov wrote: > currently by default libbpf's bpf_object__open requires > bpf's program to specify version in a code because of two things: > 1) default prog type is set to KPROBE > 2) KPROBE requires (in kernel/bpf/syscall.c) version to be specified

[PATCH v2] samples: bpf: fix: error handling regarding kprobe_events

2018-11-22 Thread Daniel T. Lee
Currently, kprobe_events failure won't be handled properly. Due to calling system() indirectly to write to kprobe_events, it can't be identified whether an error is derived from kprobe or system. // buf = "echo '%c:%s %s' >> /s/k/d/t/kprobe_events" err = system(buf); if (err < 0) {

[PATCH net-next v3 0/5] Ease to interpret net-nsid

2018-11-22 Thread Nicolas Dichtel
The goal of this series is to ease the interpretation of nsid received in netlink messages from other netns (when the user uses NETLINK_F_LISTEN_ALL_NSID). After this series, with a patched iproute2: $ ip netns add foo $ ip netns add bar $ touch /var/run/netns/init_net $ mount --bind /proc/1/ns

[PATCH net-next v3 3/5] netns: add support of NETNSA_TARGET_NSID

2018-11-22 Thread Nicolas Dichtel
Like it was done for link and address, add the ability to perform get/dump in another netns by specifying a target nsid attribute. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --- include/uapi/linux/net_namespace.h | 1 + net/core/net_namespace.c | 86 +

[PATCH net-next v3 2/5] netns: introduce 'struct net_fill_args'

2018-11-22 Thread Nicolas Dichtel
This is a preparatory work. To avoid having to much arguments for the function rtnl_net_fill(), a new structure is defined. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --- net/core/net_namespace.c | 48 1 file changed, 34 insertions(+), 14 de

[PATCH net-next v3 5/5] netns: enable to dump full nsid translation table

2018-11-22 Thread Nicolas Dichtel
Like the previous patch, the goal is to ease to convert nsids from one netns to another netns. A new attribute (NETNSA_CURRENT_NSID) is added to the kernel answer when NETNSA_TARGET_NSID is provided, thus the user can easily convert nsids. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/ne

[PATCH net-next v3 4/5] netns: enable to specify a nsid for a get request

2018-11-22 Thread Nicolas Dichtel
Combined with NETNSA_TARGET_NSID, it enables to "translate" a nsid from one netns to a nsid of another netns. This is useful when using NETLINK_F_LISTEN_ALL_NSID because it helps the user to interpret a nsid received from an other netns. Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --

[PATCH net-next v3 1/5] netns: remove net arg from rtnl_net_fill()

2018-11-22 Thread Nicolas Dichtel
This argument is not used anymore. Fixes: cab3c8ec8d57 ("netns: always provide the id to rtnl_net_fill()") Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern --- net/core/net_namespace.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/core/net_namespace.c

Re: [EXT] Re: [PATCH net-next 4/4] octeontx2-af: Bringup CGX LMAC links by default

2018-11-22 Thread Cherian, Linu
On Thu Nov 22, 2018 at 07:26:56PM +0100, Andrew Lunn wrote: > External Email > > External Email > > -- > On Thu, Nov 22, 2018 at 05:18:37PM +0530, Linu Cherian wrote: > > From: Linu Cherian > > > > - Added new CGX firmware inter

[PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed betwee

[PATCH net-next 02/12] switchdev: Add a blocking notifier chain

2018-11-22 Thread Petr Machata
In general one can't assume that a switchdev notifier is called in a non-atomic context, and correspondingly, the switchdev notifier chain is an atomic one. However, port object addition and deletion messages are delivered from a process context. Even the MDB addition messages, whose delivery is s

[PATCH net-next 01/12] switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize

2018-11-22 Thread Petr Machata
The two macros SWITCHDEV_OBJ_PORT_VLAN() and SWITCHDEV_OBJ_PORT_MDB() expand to a container_of() call, yielding an appropriate container of their sole argument. However, due to a name collision, the first argument, i.e. the contained object pointer, is not the only one to get expanded. The third ar

[PATCH net-next 03/12] switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL

2018-11-22 Thread Petr Machata
An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed betwee

  1   2   >