[PATCH net-next] qed: Mark expected switch fall-through

2019-01-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/qlogic/qed/qed_cxt.c:2126:4: warning: this statement may fall through [-Wimplicit-fallthrough=] Warning level 3 was used: -Wi

RE: [PATCH net-next] bna: Mark expected switch fall-throughs

2019-01-23 Thread Sudarsana Reddy Kalluru
-Original Message- From: Gustavo A. R. Silva [mailto:gust...@embeddedor.com] Sent: 23 January 2019 13:23 To: Rasesh Mody ; Sudarsana Kalluru ; dept-gelinuxnic...@cavium.com; David S. Miller Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; Gustavo A. R. Silva Subject: [PATCH n

[PATCH net-next] net/mlx4: Mark expected switch fall-through

2019-01-23 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/mellanox/mlx4/eq.c: In function ‘mlx4_eq_int’: drivers/net/ethernet/mellanox/mlx4/mlx4.h:219:5: warning: this statement may fa

Re: [PATCH net-next] bna: Mark expected switch fall-throughs

2019-01-23 Thread Gustavo A. R. Silva
On 1/23/19 2:03 AM, Sudarsana Reddy Kalluru wrote: > -Original Message- > From: Gustavo A. R. Silva [mailto:gust...@embeddedor.com] > Sent: 23 January 2019 13:23 > To: Rasesh Mody ; Sudarsana Kalluru > ; dept-gelinuxnic...@cavium.com; David S. > Miller > Cc: netdev@vger.kernel.org; l

RE: [NETDEV]: getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) is in fact sometimes returning the source IP instead the destination IP

2019-01-23 Thread Mohandass, Roobesh
Hi Willy/Florian/Lukas, disabling nf_conntrack_tcp_loose (solved the problem) and for last 24 hours, we are not evening seeing a single wrong connection data by send-proxy. Worth a note in your documentation related to this, as users might be aware off. Thanks very much for your help and suppo

Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()

2019-01-23 Thread Vinod Koul
On 23-01-19, 06:19, Wei Yongjun wrote: > In case of error, the function devm_clk_get() returns ERR_PTR() and > never returns NULL. The NULL test in the return value check should be > replaced with IS_ERR(). Acked-by: Vinod Koul This is a networking subsystem patch and you missed Dave :( > Fixes

Re: [PATCH net-next v7 1/8] devlink: Add devlink_param for port register and unregister

2019-01-23 Thread Jiri Pirko
Fri, Jan 18, 2019 at 08:09:38AM CET, vasundhara-v.vo...@broadcom.com wrote: >Add functions to register and unregister for the driver supported >configuration parameters table per port. > >v2->v3: >- Add a helper __devlink_params_register() with common code used by > both devlink_params_register()

Re: [NETDEV]: getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) is in fact sometimes returning the source IP instead the destination IP

2019-01-23 Thread Willy Tarreau
Hi Roobesh, On Wed, Jan 23, 2019 at 08:07:48AM +, Mohandass, Roobesh wrote: > Hi Willy/Florian/Lukas, > > disabling nf_conntrack_tcp_loose (solved the problem) and for last 24 hours, > we are not evening seeing a single wrong connection data by send-proxy. > > Worth a note in your document

Re: [PATCH] bpftool: Fix prog dump by tag

2019-01-23 Thread Daniel Borkmann
On 01/18/2019 01:58 PM, Jiri Olsa wrote: > Lance reported an issue with bpftool not being able to > dump program if there are more programs loaded and you > want to dump any but the first program, like: > > # bpftool prog > 28: kprobe name trace_req_start tag 1dfc28ba8b3dd597 gpl > lo

Re: [PATCH bpf v3] bpftool: fix percpu maps updating

2019-01-23 Thread Daniel Borkmann
On 01/21/2019 12:36 PM, Paolo Abeni wrote: > When updating a percpu map, bpftool currently copies the provided > value only into the first per CPU copy of the specified value, > all others instances are left zeroed. > > This change explicitly copies the user-provided bytes to all the > per CPU ins

Re: [PATCH net-next v7 2/8] devlink: Add port param get command

2019-01-23 Thread Jiri Pirko
Fri, Jan 18, 2019 at 08:09:39AM CET, vasundhara-v.vo...@broadcom.com wrote: >Add port param get command which gets data per parameter. >It also has option to dump the parameters data per port. > >Cc: Jiri Pirko >Signed-off-by: Vasundhara Volam Acked-by: Jiri Pirko

Re: [PATCH net-next v7 1/8] devlink: Add devlink_param for port register and unregister

2019-01-23 Thread Vasundhara Volam
On Wed, Jan 23, 2019 at 2:04 PM Jiri Pirko wrote: > > Fri, Jan 18, 2019 at 08:09:38AM CET, vasundhara-v.vo...@broadcom.com wrote: > >Add functions to register and unregister for the driver supported > >configuration parameters table per port. > > > >v2->v3: > >- Add a helper __devlink_params_regis

[PATCH net-next] devlink: Use after free in devlink_health_reporter_destroy()

2019-01-23 Thread Dan Carpenter
This calls kfree(reporter); before dereferencing reporter on the next line when it does mutex_unlock(&reporter->devlink->lock); Fixes: 880ee82f0313 ("devlink: Add health reporter create/destroy functionality") Signed-off-by: Dan Carpenter --- net/core/devlink.c | 6 -- 1 file changed, 4 ins

Re: [PATCH net 5/5] net: aquantia: added err var into AQ_HW_WAIT_FOR construct

2019-01-23 Thread Igor Russkikh
> > Hi Igor > >err = readx_poll_timeout(hw_atl_itr_res_irq_get, self, alt_itr_res, > alt_itr_res == 0, 10, 1000); > > The advantage of using readx_poll_timeout is that it is used by lots > of other drivers and works. It is much better to use core > infras

Re: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to CAN nodes

2019-01-23 Thread Simon Horman
On Fri, Jan 18, 2019 at 01:13:53PM +0100, Simon Horman wrote: > On Thu, Jan 17, 2019 at 02:54:15PM +, Fabrizio Castro wrote: > > According to the latest information, clkp2 is available on RZ/G2. > > Modify CAN0 and CAN1 nodes accordingly. > > > > Signed-off-by: Fabrizio Castro > > Reviewed-by

Re: [PATCH net-next] devlink: Use after free in devlink_health_reporter_destroy()

2019-01-23 Thread Eran Ben Elisha
On 1/23/2019 11:44 AM, Dan Carpenter wrote: > This calls kfree(reporter); before dereferencing reporter on the next > line when it does mutex_unlock(&reporter->devlink->lock); > > Fixes: 880ee82f0313 ("devlink: Add health reporter create/destroy > functionality") > Signed-off-by: Dan Carpenter

[PATCH net-next V4 1/5] vhost: generalize adding used elem

2019-01-23 Thread Jason Wang
Use one generic vhost_copy_to_user() instead of two dedicated accessor. This will simplify the conversion to fine grain accessors. About 2% improvement of PPS were seen during vitio-user txonly test. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 11 +-- 1 file changed, 1 insertio

[PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-23 Thread Jason Wang
It was noticed that the copy_user() friends that was used to access virtqueue metdata tends to be very expensive for dataplane implementation like vhost since it involves lots of software checks, speculation barrier, hardware feature toggling (e.g SMAP). The extra cost will be more obvious when tra

[PATCH net-next V4 3/5] vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch()

2019-01-23 Thread Jason Wang
Rename the function to be more accurate since it actually tries to prefetch vq metadata address in IOTLB. And this will be used by following patch to prefetch metadata virtual addresses. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 4 ++-- drivers/vhost/vhost.c | 4 ++-- drivers/vhost/v

[PATCH net-next V4 2/5] vhost: fine grain userspace memory accessors

2019-01-23 Thread Jason Wang
This is used to hide the metadata address from virtqueue helpers. This will allow to implement a vmap based fast accessing to metadata. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 94 +++ 1 file changed, 77 insertions(+), 17 deletions(-) diff --

[PATCH net-next V4 4/5] vhost: introduce helpers to get the size of metadata area

2019-01-23 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 46 ++- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 24c74c60c093..37e2cac8e8b0 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vho

[PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap()

2019-01-23 Thread Jason Wang
This series tries to access virtqueue metadata through kernel virtual address instead of copy_user() friends since they had too much overheads like checks, spec barriers or even hardware feature toggling. Test shows about 24% improvement on TX PPS. It should benefit other cases as well. Changes f

RE: [PATCH 0/7] AF_PACKET transport_offset fix

2019-01-23 Thread Maxim Mikityanskiy
>From my perspective, after the discussion we had with Willem, the current version of this series can be merged to net-next. Willem, do you approve it? Thanks for reviewing! > -Original Message- > From: Maxim Mikityanskiy > Sent: 14 January, 2019 15:19 > To: David S. Miller ; Saeed Maham

RE: [PATCH 1/7] net: Don't set transport offset to invalid value

2019-01-23 Thread Maxim Mikityanskiy
> -Original Message- > From: Willem de Bruijn > Sent: 17 January, 2019 17:16 > To: Maxim Mikityanskiy > Cc: David S. Miller ; Saeed Mahameed > ; Willem de Bruijn ; Jason Wang > ; Eric Dumazet ; > netdev@vger.kernel.org; Eran Ben Elisha ; Tariq Toukan > > Subject: Re: [PATCH 1/7] net: Don

Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()

2019-01-23 Thread Niklas Cassel
On Wed, Jan 23, 2019 at 06:19:18AM +, Wei Yongjun wrote: > In case of error, the function devm_clk_get() returns ERR_PTR() and > never returns NULL. The NULL test in the return value check should be > replaced with IS_ERR(). > > Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Daniel Borkmann
On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > xdp_redirect_cpu has a 6 different XDP programs that can be attached to > network interface. This sample has a option --prognum that allows user > for specifying which particular program from a given set will be > attached to network interface. >

Re: [PATCH bpf-next v2 1/8] libbpf: Add a helper for retrieving a map fd for a given name

2019-01-23 Thread Daniel Borkmann
On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > XDP samples are mostly cooperating with eBPF maps through their file > descriptors. In case of a eBPF program that contains multiple maps it > might be tiresome to iterate through them and call bpf_map__fd for each > one. Add a helper mostly based

[PATCH 2/3] gcc-plugins: Introduce stackinit plugin

2019-01-23 Thread Kees Cook
This attempts to duplicate the proposed gcc option -finit-local-vars[1] in an effort to implement the "always initialize local variables" kernel development goal[2]. Enabling CONFIG_GCC_PLUGIN_STACKINIT should stop all "uninitialized stack variable" flaws as long as they don't depend on being zero

[PATCH 3/3] lib: Introduce test_stackinit module

2019-01-23 Thread Kees Cook
Adds test for stack initialization coverage. We have several build options that control the level of stack variable initialization. This test lets us visualize which options cover which cases, and provide tests for options that are currently not available (padding initialization). All options pass

[PATCH 0/3] gcc-plugins: Introduce stackinit plugin

2019-01-23 Thread Kees Cook
This adds a new plugin "stackinit" that attempts to perform unconditional initialization of all stack variables[1]. It has wider effects than GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y since BYREF_ALL does not consider non-structures. A notable weakness is that padding bytes in many cases remain uninitializ

[PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Kees Cook
Variables declared in a switch statement before any case statements cannot be initialized, so move all instances out of the switches. After this, future always-initialized stack variables will work and not throw warnings like this: fs/fcntl.c: In function ‘send_sigio_to_task’: fs/fcntl.c:738:13: w

Re: [PATCH net-next v7 3/8] devlink: Add port param set command

2019-01-23 Thread Jiri Pirko
Fri, Jan 18, 2019 at 08:09:40AM CET, vasundhara-v.vo...@broadcom.com wrote: >Add port param set command to set the value for a parameter. >Value can be set to any of the supported configuration modes. > >Cc: Jiri Pirko >Signed-off-by: Vasundhara Volam Acked-by: Jiri Pirko

Re: [PATCH net-next v7 4/8] devlink: Add support for driverinit get value for devlink_port

2019-01-23 Thread Jiri Pirko
Fri, Jan 18, 2019 at 08:09:41AM CET, vasundhara-v.vo...@broadcom.com wrote: >Add support for "driverinit" configuration mode value for devlink_port >configuration parameters. Add devlink_port_param_driverinit_value_get() >function to help the driver get the value from devlink_port. > >Also, move th

[PATCH v2 net] ravb: expand rx descriptor data to accommodate hw checksum

2019-01-23 Thread Simon Horman
EtherAVB may provide a checksum of packet data appended to packet data. In order to allow this checksum to be received by the host descriptor data needs to be enlarged by 2 bytes to accommodate the checksum. In the case of MTU-sized packets without a VLAN tag the checksum were already accommodated

Connection Tracking Offload netdev RFC v1.0, part 1/2: command line + implementation

2019-01-23 Thread Guy Shattah
-- Connection Tracking Offload netdev RFC v1.0 Part 1/2 - TC with Connection Tracking - command line + implementation -- OVS recirculation ID is to be t

Re: [PATCH iproute2-next v2] devlink: Add health command support

2019-01-23 Thread Aya Levin
נכתב על ידי David Ahern, ב־1/23/2019 בשעה 5:37 AM: > On 1/20/19 2:27 AM, Aya Levin wrote: >> diff --git a/devlink/devlink.c b/devlink/devlink.c >> index 3651e90c1159..9fc19668ccd0 100644 >> --- a/devlink/devlink.c >> +++ b/devlink/devlink.c >> @@ -1,4 +1,5 @@ >> /* >> + * > > extra newline > >

Connection Tracking Offload netdev RFC v1.0, Part 2/2 - TC with Connection Tracking - hardware offloading and Netfilter changes

2019-01-23 Thread Guy Shattah
- Connection Tracking Offload netdev RFC v1.0 Part 2/2 - TC with Connection Tracking - hardware offloading and Netfilter changes -- This part continues

[RFC] Connection Tracking Offload netdev RFC v1.0, Part 2/2 - TC with Connection Tracking - hardware offloading and Netfilter changes

2019-01-23 Thread Guy Shattah
- Connection Tracking Offload netdev RFC v1.0 Part 2/2 - TC with Connection Tracking - hardware offloading and Netfilter changes -- This part continues

[RFC] Connection Tracking Offload netdev RFC v1.0, part 1/2: command line + implementation

2019-01-23 Thread Guy Shattah
-- Connection Tracking Offload netdev RFC v1.0 Part 1/2 - TC with Connection Tracking - command line + implementation -- OVS recirculation ID is to be

Re: [PATCH v2 bpf] bpf: sock recvbuff must be limited by rmem_max in bpf_setsockopt()

2019-01-23 Thread Daniel Borkmann
On 01/23/2019 05:37 AM, Yafang Shao wrote: > When sock recvbuff is set by bpf_setsockopt(), the value must by limited > by rmem_max. > It is the same with sendbuff. > > Fixes: 8c4b4c7e9ff0 ("bpf: Add setsockopt helper function to bpf") > Acked-by: Martin KaFai Lau > Acked-by: Lawrence Brakmo > S

Re: [PATCH bpf-next v4] libbpf: Show supported ELF section names on when failed to guess a prog/attach type

2019-01-23 Thread Daniel Borkmann
On 01/21/2019 02:06 PM, Taeung Song wrote: > We need to let users check their wrong ELF section name > with proper ELF section names when failed to get a prog/attach type from it. > Because users can't realize libbpf guess prog/attach types from > given ELF section names. > For example, when a 'cgr

Re: [PATCH net-next v7 4/8] devlink: Add support for driverinit get value for devlink_port

2019-01-23 Thread Vasundhara Volam
On Wed, Jan 23, 2019 at 4:47 PM Jiri Pirko wrote: > > Fri, Jan 18, 2019 at 08:09:41AM CET, vasundhara-v.vo...@broadcom.com wrote: > >Add support for "driverinit" configuration mode value for devlink_port > >configuration parameters. Add devlink_port_param_driverinit_value_get() > >function to help

Re: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to CAN nodes

2019-01-23 Thread Simon Horman
On Wed, Jan 23, 2019 at 10:51:23AM +0100, Simon Horman wrote: > On Fri, Jan 18, 2019 at 01:13:53PM +0100, Simon Horman wrote: > > On Thu, Jan 17, 2019 at 02:54:15PM +, Fabrizio Castro wrote: > > > According to the latest information, clkp2 is available on RZ/G2. > > > Modify CAN0 and CAN1 nodes

[PATCH] netfilter: ipt_CLUSTERIP: fix warning unused variable cn

2019-01-23 Thread Anders Roxell
When CONFIG_PROC_FS isn't set the variable cn isn't used. net/ipv4/netfilter/ipt_CLUSTERIP.c: In function ‘clusterip_net_exit’: net/ipv4/netfilter/ipt_CLUSTERIP.c:849:24: warning: unused variable ‘cn’ [-Wunused-variable] struct clusterip_net *cn = clusterip_pernet(net);

Re: [PATCH net-next 0/7] Devlink health updates

2019-01-23 Thread Jiri Pirko
Tue, Jan 22, 2019 at 04:57:17PM CET, era...@mellanox.com wrote: >This patchset fixes some comments that were received for the devlink >health series, mostly around the devlink health buffers API. > >It offers a new devlink<->driver API for passing health dump and diagnose info. >As part of this pat

Re: [PATCH v2 bpf-next] bpf: allow BPF programs access skb_shared_info->gso_segs field

2019-01-23 Thread Daniel Borkmann
On 01/18/2019 07:42 PM, Martin Lau wrote: > On Thu, Jan 17, 2019 at 03:31:57PM -0800, Eric Dumazet wrote: >> This adds the ability to read gso_segs from a BPF program. >> >> v2: refined Eddie Hao patch to address Alexei feedback. >> >> Signed-off-by: Eric Dumazet >> Cc: Eddie Hao >> Cc: Vlad Dumi

Re: [PATCH bpf-next] selftests/bpf: don't hardcode iptables/nc path in test_tcpnotify_user

2019-01-23 Thread Daniel Borkmann
On 01/17/2019 08:56 PM, Stanislav Fomichev wrote: > system() is calling shell which should find the appropriate full path > via $PATH. On some systems, full path to iptables and/or nc might be > different that we one we have hardcoded. > > Signed-off-by: Stanislav Fomichev Applied, thanks!

Re: [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Greg KH
On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: > Variables declared in a switch statement before any case statements > cannot be initialized, so move all instances out of the switches. > After this, future always-initialized stack variables will work > and not throw warnings like this:

RE: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to CAN nodes

2019-01-23 Thread Fabrizio Castro
Hello Simon, Thank you for your feedback! > From: Simon Horman > Sent: 23 January 2019 11:38 > Subject: Re: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to > CAN nodes > > On Wed, Jan 23, 2019 at 10:51:23AM +0100, Simon Horman wrote: > > On Fri, Jan 18, 2019 at 01:13:53PM +0100, S

Re: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to CAN nodes

2019-01-23 Thread Geert Uytterhoeven
Hi Fabrizio, On Wed, Jan 23, 2019 at 1:01 PM Fabrizio Castro wrote: > > From: Simon Horman > > Sent: 23 January 2019 11:38 > > Subject: Re: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to > > CAN nodes > > > > On Wed, Jan 23, 2019 at 10:51:23AM +0100, Simon Horman wrote: > > > On

Re: [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Jann Horn
On Wed, Jan 23, 2019 at 1:04 PM Greg KH wrote: > On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: > > Variables declared in a switch statement before any case statements > > cannot be initialized, so move all instances out of the switches. > > After this, future always-initialized stack

Re: [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Ard Biesheuvel
On Wed, 23 Jan 2019 at 13:09, Jann Horn wrote: > > On Wed, Jan 23, 2019 at 1:04 PM Greg KH wrote: > > On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: > > > Variables declared in a switch statement before any case statements > > > cannot be initialized, so move all instances out of the

RE: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to CAN nodes

2019-01-23 Thread Fabrizio Castro
Hello Geert, Thank you for your feedback! > From: Geert Uytterhoeven > Sent: 23 January 2019 12:08 > Subject: Re: [PATCH 2/3] arm64: dts: renesas: r8a774a1: Add clkp2 clock to > CAN nodes > > Hi Fabrizio, > > On Wed, Jan 23, 2019 at 1:01 PM Fabrizio Castro > wrote: > > > From: Simon Horman >

Re: [PATCH net-next] net/mlx4: Mark expected switch fall-through

2019-01-23 Thread Tariq Toukan
On 1/23/2019 10:05 AM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > This patch fixes the following warning: > > drivers/net/ethernet/mellanox/mlx4/eq.c: In function ‘mlx4_eq_int’: > drivers/net/et

Re: [PATCH net-next 0/7] Devlink health updates

2019-01-23 Thread Eran Ben Elisha
On 1/23/2019 1:44 PM, Jiri Pirko wrote: > Tue, Jan 22, 2019 at 04:57:17PM CET, era...@mellanox.com wrote: >> This patchset fixes some comments that were received for the devlink >> health series, mostly around the devlink health buffers API. >> >> It offers a new devlink<->driver API for passing

Re: [PATCH ipvs-next] ipvs: use indirect call wrappers

2019-01-23 Thread Simon Horman
On Sun, Jan 20, 2019 at 02:12:04PM +0200, Julian Anastasov wrote: > > Hello, > > On Sat, 19 Jan 2019, Matteo Croce wrote: > > > Use the new indirect call wrappers in IPVS when calling the TCP or UDP > > protocol specific functions. > > This avoids an indirect calls in IPVS, and reduces the

Re: [PATCH ipvs-next] ipvs: avoid indirect calls when calculating checksums

2019-01-23 Thread Simon Horman
On Sun, Jan 20, 2019 at 02:11:31PM +0200, Julian Anastasov wrote: > > Hello, > > On Sat, 19 Jan 2019, Matteo Croce wrote: > > > The function pointer ip_vs_protocol->csum_check is only used in protocol > > specific code, and never in the generic one. > > Remove the function pointer from str

Re: [PATCH net 5/5] net: aquantia: added err var into AQ_HW_WAIT_FOR construct

2019-01-23 Thread Andrew Lunn
On Wed, Jan 23, 2019 at 09:49:25AM +, Igor Russkikh wrote: > > > > > Hi Igor > > > > err = readx_poll_timeout(hw_atl_itr_res_irq_get, self, alt_itr_res, > > alt_itr_res == 0, 10, 1000); > > > > The advantage of using readx_poll_timeout is that it is used b

Re: [PATCH bpf-next 3/3] xsk: add sock_diag interface for AF_XDP

2019-01-23 Thread Daniel Borkmann
On 01/18/2019 02:03 PM, bjorn.to...@gmail.com wrote: > From: Björn Töpel > > This patch adds the sock_diag interface for querying sockets from user > space. Tools like iproute2 ss(8) can use this interface to list open > AF_XDP sockets. > > The user-space ABI is defined in linux/xdp_diag.h and i

Re: [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread William Kucharski
> On Jan 23, 2019, at 5:09 AM, Jann Horn wrote: > > AFAICS this only applies to switch statements (because they jump to a > case and don't execute stuff at the start of the block), not blocks > after if/while/... . It bothers me that we are going out of our way to deprecate valid C constructs

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Maciej Fijalkowski
On Wed, 23 Jan 2019 11:41:11 +0100 Daniel Borkmann wrote: > On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > > xdp_redirect_cpu has a 6 different XDP programs that can be attached to > > network interface. This sample has a option --prognum that allows user > > for specifying which particular

Re: [PATCH bpf-next] bpf: use the proper optlen when doing strncpy in bpf_getsockopt()

2019-01-23 Thread Daniel Borkmann
On 01/22/2019 07:04 PM, Martin Lau wrote: > On Sat, Jan 19, 2019 at 02:20:52PM +0800, Yafang Shao wrote: >> As the last character of optval will be set with 0, so just copying >> (optlen - 1) characters is enough. > I am not sure this optimization is needed but I think it will Yeah, it's totally f

Re: [PATCH net-next V4 0/5] vhost: accelerate metadata access through vmap()

2019-01-23 Thread Michael S. Tsirkin
On Wed, Jan 23, 2019 at 05:55:52PM +0800, Jason Wang wrote: > This series tries to access virtqueue metadata through kernel virtual > address instead of copy_user() friends since they had too much > overheads like checks, spec barriers or even hardware feature > toggling. > > Test shows about 24%

Re: [PATCH bpf-next v2 1/8] libbpf: Add a helper for retrieving a map fd for a given name

2019-01-23 Thread Maciej Fijalkowski
On Wed, 23 Jan 2019 11:54:41 +0100 Daniel Borkmann wrote: > On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > > XDP samples are mostly cooperating with eBPF maps through their file > > descriptors. In case of a eBPF program that contains multiple maps it > > might be tiresome to iterate through

Re: [net-next] net: phy: fix issue with loading PHY driver w/o initramfs

2019-01-23 Thread Geert Uytterhoeven
From: Geert Uytterhoeven Hi Heiner, > On 22.01.2019 23:45, David Miller wrote: > > From: Heiner Kallweit > > Date: Sat, 19 Jan 2019 10:30:21 +0100 > > > >> It was reported that on a system with nfsboot and w/o initramfs network > >> fails because trying to load the PHY driver returns -E

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-23 Thread Michael S. Tsirkin
On Wed, Jan 23, 2019 at 05:55:57PM +0800, Jason Wang wrote: > It was noticed that the copy_user() friends that was used to access > virtqueue metdata tends to be very expensive for dataplane > implementation like vhost since it involves lots of software checks, > speculation barrier, hardware featu

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Daniel Borkmann
On 01/23/2019 02:41 PM, Maciej Fijalkowski wrote: > On Wed, 23 Jan 2019 11:41:11 +0100 > Daniel Borkmann wrote: >> On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: >>> xdp_redirect_cpu has a 6 different XDP programs that can be attached to >>> network interface. This sample has a option --prognum

Re: [PATCH 1/7] net: Don't set transport offset to invalid value

2019-01-23 Thread Willem de Bruijn
On Wed, Jan 23, 2019 at 5:17 AM Maxim Mikityanskiy wrote: > > > -Original Message- > > From: Willem de Bruijn > > Sent: 17 January, 2019 17:16 > > To: Maxim Mikityanskiy > > Cc: David S. Miller ; Saeed Mahameed > > ; Willem de Bruijn ; Jason Wang > > ; Eric Dumazet ; > > netdev@vger.kern

Re: [PATCH 0/7] AF_PACKET transport_offset fix

2019-01-23 Thread Willem de Bruijn
On Wed, Jan 23, 2019 at 5:19 AM Maxim Mikityanskiy wrote: > > From my perspective, after the discussion we had with Willem, the > current version of this series can be merged to net-next. net-next has moved forward. The patchset as is no longer applies cleanly. > Willem, do you approve it? > >

Re: [PATCH 3/7] net/ethernet: Add parse_protocol header_ops support

2019-01-23 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 8:21 AM Maxim Mikityanskiy wrote: > > The previous commit introduced parse_protocol callback which should > extract the protocol number from the L2 header. Make all Ethernet > devices support it. > > Signed-off-by: Maxim Mikityanskiy > --- > include/linux/etherdevice.h |

Re: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Jani Nikula
On Wed, 23 Jan 2019, Greg KH wrote: > On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: >> Variables declared in a switch statement before any case statements >> cannot be initialized, so move all instances out of the switches. >> After this, future always-initialized stack variables will

Re: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Jani Nikula
On Wed, 23 Jan 2019, Jani Nikula wrote: > On Wed, 23 Jan 2019, Greg KH wrote: >> On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: >>> Variables declared in a switch statement before any case statements >>> cannot be initialized, so move all instances out of the switches. >>> After this,

Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a prog via index

2019-01-23 Thread Jesper Dangaard Brouer
On Wed, 23 Jan 2019 14:41:59 +0100 Maciej Fijalkowski wrote: > On Wed, 23 Jan 2019 11:41:11 +0100 > Daniel Borkmann wrote: > > > On 01/21/2019 10:10 AM, Maciej Fijalkowski wrote: > > > xdp_redirect_cpu has a 6 different XDP programs that can be attached to > > > network interface. This sample

Re: [PATCH bpf-next 3/3] xsk: add sock_diag interface for AF_XDP

2019-01-23 Thread Björn Töpel
Den ons 23 jan. 2019 kl 14:19 skrev Daniel Borkmann : > > On 01/18/2019 02:03 PM, bjorn.to...@gmail.com wrote: > > From: Björn Töpel > > > > This patch adds the sock_diag interface for querying sockets from user > > space. Tools like iproute2 ss(8) can use this interface to list open > > AF_XDP so

Re: [PATCH bpf-next v2 08/16] bpf: functional and min/max reasoning unit tests for JMP32

2019-01-23 Thread Jiong Wang
Jiong Wang writes: > +/* BPF_RAND_SEXT_R7 contains 5 instructions, it initializes R7 into a random > + * negative u32, and sign-extend it into 64-bit. > + */ > +#define BPF_RAND_SEXT_R7 \ > + BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,

[PATCH net-next 2/4] mlxsw: spectrum_nve: Breakout common code to a common function

2019-01-23 Thread Ido Schimmel
The configuration of a VXLAN tunnel in Spectrum-1 and Spectrum-2 is largely the same. To avoid code duplication, breakout the common parts to a common function that can be invoked from the ASIC-specific code. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../mellanox/mlxsw/spectrum_

[PATCH net-next 1/4] mlxsw: spectrum: Expose functions to create and destroy underlay RIF

2019-01-23 Thread Ido Schimmel
In Spectrum-2, instead of providing the ID of the virtual router (VR) where NVE underlay lookups will occur as in Spectrum-1, the ID of a router interface (RIF) in this VR is required. Expose functions to create and destroy such a RIF. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata ---

[PATCH net-next 3/4] mlxsw: spectrum_nve: Add support for VXLAN on Spectrum-2

2019-01-23 Thread Ido Schimmel
Spectrum-1 and Spectrum-2 are largely backward compatible with regards to VXLAN. One difference - as explained in previous patch - is that an underlay RIF needs to be specified instead of an underlay VR during NVE initialization. This is accomplished by calling the relevant function that returns th

[PATCH net-next 0/4] mlxsw: Add VXLAN support for Spectrum-2

2019-01-23 Thread Ido Schimmel
This patchset adds support for VXLAN tunneling on the Spectrum-2 ASIC. Spectrum-1 and Spectrum-2 are largely backward compatible in this area, so not too many changes are required. Patches #1-#2 expose a function and perform small refactoring towards the actual Spectrum-2 implementation in patches

[PATCH net-next 4/4] mlxsw: spectrum_nve: Enable VXLAN on Spectrum-2

2019-01-23 Thread Ido Schimmel
Enable VXLAN on Spectrum-2 as previous patches added the required functionality. Note that for now Spectrum-1 and Spectrum-2 use the same function to determine whether the VXLAN configuration is valid or not. In the future, when the driver will be extended to support features not present in Spectr

Re: [PATCH net-next 1/7] devlink: Add devlink msg API

2019-01-23 Thread Jiri Pirko
Tue, Jan 22, 2019 at 04:57:18PM CET, era...@mellanox.com wrote: >Devlink msg is a mechanism to pass descriptors between drivers and >devlink, in json-like format. The API allows the driver to add objects, >object pair, value array (nested attributes), value and name. > >Driver can use this API to f

Re: [PATCH net-next 2/7] net/mlx5e: Move driver to use devlink msg API

2019-01-23 Thread Jiri Pirko
Tue, Jan 22, 2019 at 04:57:19PM CET, era...@mellanox.com wrote: >As part of the devlink health reporter diagnose ops callback, the mlx5e TX >reporter used devlink health buffers API. Which will soon be depracated. >Modify the reporter to use the new devlink msg API. > >The actual set of the new dia

Re: [PATCH net-next 3/7] devlink: move devlink health reporter to use devlink msg API

2019-01-23 Thread Jiri Pirko
Tue, Jan 22, 2019 at 04:57:20PM CET, era...@mellanox.com wrote: >Move devlink reporter diagnose and dump operations to use the new msg API. >Redefine the signature of diagnose and dump operations and move the mlx5e >reporter to use it with the new format. > >Signed-off-by: Eran Ben Elisha >Reviewe

RE: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Edwin Zimmerman
On Wed, 23 Jan 2019, Jani Nikula wrote: > On Wed, 23 Jan 2019, Greg KH wrote: > > On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: > >> Variables declared in a switch statement before any case statements > >> cannot be initialized, so move all instances out of the switches. > >> After t

Re: [PATCH v2 net] ravb: expand rx descriptor data to accommodate hw checksum

2019-01-23 Thread Sergei Shtylyov
On 01/23/2019 02:14 PM, Simon Horman wrote: > EtherAVB may provide a checksum of packet data appended to packet data. In > order to allow this checksum to be received by the host descriptor data > needs to be enlarged by 2 bytes to accommodate the checksum. > > In the case of MTU-sized packets wi

Re: [PATCH iproute2-next] Introduce ip-brctl shell script

2019-01-23 Thread Nikolay Aleksandrov
On 18/01/2019 19:00, Stefano Brivio wrote: > This script wraps 'ip' and 'bridge' tools to provide a drop-in replacement > of the standalone 'brctl' utility. > > It's bug-to-bug compatible with brctl as of bridge-utils version 1.6, > has no dependencies other than a POSIX shell, and it's less than

RE: [Intel-gfx] [PATCH 1/3] treewide: Lift switch variables out of switches

2019-01-23 Thread Jani Nikula
On Wed, 23 Jan 2019, Edwin Zimmerman wrote: > On Wed, 23 Jan 2019, Jani Nikula wrote: >> On Wed, 23 Jan 2019, Greg KH wrote: >> > On Wed, Jan 23, 2019 at 03:03:47AM -0800, Kees Cook wrote: >> >> Variables declared in a switch statement before any case statements >> >> cannot be initialized, so m

[PATCH net-next 06/10] net: introduce a net_device_ops macsec helper

2019-01-23 Thread Antoine Tenart
This patch introduces a net_device_ops MACsec helper to allow net device drivers to implement a MACsec offloading solution. Signed-off-by: Antoine Tenart --- include/linux/netdevice.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.

[PATCH net-next 09/10] net: phy: mscc: macsec initialization

2019-01-23 Thread Antoine Tenart
This patch adds support for initializing the MACsec engine found within the Microsemi Ocelot PHY. The engine is initialized in a passthrough mode and does not modify any incoming or outgoing packet. But thanks to this it now can be configured to perform MACsec transformations on packets, which will

[PATCH net-next 07/10] net: macsec: hardware offloading infrastructure

2019-01-23 Thread Antoine Tenart
This patch introduces the MACsec hardware offloading infrastructure. The main idea here is to re-use the logic and data structures of the software MACsec implementation. This allows not to duplicate definitions and structure storing the same kind of information. It also allows to use a unified gen

[PATCH net-next 10/10] net: phy: mscc: macsec support

2019-01-23 Thread Antoine Tenart
This patch adds MACsec support to the Microsemi Ocelot PHY, to configure flows and transformations so that matched packets can be processed by the MACsec engine, either at egress, or at ingress. This addition allows a user to create an hardware accelerated virtual MACsec interface on a port using a

[PATCH net-next 05/10] net: phy: introduce a phy_driver macsec helper

2019-01-23 Thread Antoine Tenart
This patch introduces a phy_driver MACsec helper to allow PHYs to implement a MACsec offloading solution. The phy_driver MACsec helper is called through a wrapper, phy_macsec, to perform this call while holding the phydev lock. Signed-off-by: Antoine Tenart --- drivers/net/phy/phy.c | 17 +++

[PATCH net-next 08/10] net: phy: export __phy_read_page/__phy_write_page

2019-01-23 Thread Antoine Tenart
This patch exports the __phy_read_page and __phy_write_page helpers, to allow reading and setting the current page when a function already holds the MDIO lock. This is something the Microsemi PHY driver does during its initialization because parts of its registers and engines are shared between po

[PATCH net-next 00/10] net: macsec: initial support for hardware offloading

2019-01-23 Thread Antoine Tenart
Hello, This series intends to add support for offloading MACsec transformations in hardware enabled devices. The series is divided in two parts: the first 7 patches add the infrastructure support to offload a MACsec configuration to hardware drivers; and the last 3 patches introduce the MACsec off

[PATCH net-next 01/10] net: introduce the MACSEC netdev feature

2019-01-23 Thread Antoine Tenart
This patch introduce a new netdev feature, which will be used by drivers to state they can perform MACsec transformations in hardware. Signed-off-by: Antoine Tenart --- include/linux/netdev_features.h | 3 +++ net/core/ethtool.c | 1 + 2 files changed, 4 insertions(+) diff --git a/

[PATCH net-next 02/10] net: macsec: convert to SPDX

2019-01-23 Thread Antoine Tenart
This cosmetic patch converts the macsec implementation license header to the now recommended format, SPDX. Signed-off-by: Antoine Tenart --- drivers/net/macsec.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 64a982563d5

[PATCH net-next 04/10] net: macsec: introduce the netdev_macsec structure

2019-01-23 Thread Antoine Tenart
This patch introduces the netdev_macsec structure. It will be used in the kernel to exchange information between the common MACsec implementation (macsec.c) and the MACsec hardware offloading implementations. This structure contains a command (struct netdev_macsec_command) and pointers to MACsec sp

[PATCH net-next 03/10] net: macsec: move some definitions in a dedicated header

2019-01-23 Thread Antoine Tenart
This patch moves some structure, type and identifier definitions into a MACsec specific header. This patch does not modify how the MACsec code is running and only move things around. This is a preparation for the future MACsec hardware offloading support, which will re-use those definitions outside

Re: [PATCH iproute2-next] Introduce ip-brctl shell script

2019-01-23 Thread Roopa Prabhu
On Wed, Jan 23, 2019 at 7:09 AM Nikolay Aleksandrov wrote: > > On 18/01/2019 19:00, Stefano Brivio wrote: > > This script wraps 'ip' and 'bridge' tools to provide a drop-in replacement > > of the standalone 'brctl' utility. > > > > It's bug-to-bug compatible with brctl as of bridge-utils version 1

Re: [PATCH v2 bpf-next] bpf: allow BPF programs access skb_shared_info->gso_segs field

2019-01-23 Thread Eric Dumazet
On Wed, Jan 23, 2019 at 3:55 AM Daniel Borkmann wrote: > > On 01/18/2019 07:42 PM, Martin Lau wrote: > > On Thu, Jan 17, 2019 at 03:31:57PM -0800, Eric Dumazet wrote: > >> This adds the ability to read gso_segs from a BPF program. > >> > >> v2: refined Eddie Hao patch to address Alexei feedback. >

  1   2   3   >