RE: [PATCH net-next] net/tls: Corrected enabling of zero-copy mode

2018-07-26 Thread Vakul Garg
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev- > ow...@vger.kernel.org] On Behalf Of David Miller > Sent: Thursday, July 26, 2018 1:59 AM > To: Vakul Garg > Cc: netdev@vger.kernel.org; bor...@mellanox.com; > avia...@mellanox.com; davejwat...@fb.com > Subject:

Re: [PATCH] xfrm: fix ptr_ret.cocci warnings

2018-07-26 Thread Steffen Klassert
On Thu, Jul 26, 2018 at 03:09:52PM +0800, kbuild test robot wrote: > From: kbuild test robot > > net/xfrm/xfrm_interface.c:692:1-3: WARNING: PTR_ERR_OR_ZERO can be used > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > >

Re: [PATCH ipsec-next] xfrm: Return detailed errors from xfrmi_newlink

2018-07-26 Thread Steffen Klassert
On Wed, Jul 25, 2018 at 01:45:29PM -0700, Benedict Wong wrote: > Currently all failure modes of xfrm interface creation return EEXIST. > This change improves the granularity of errnos provided by also > returning ENODEV or EINVAL if failures happen in looking up the > underlying interface, or a

Re: [PATCH bpf-next 0/4] samples: bpf: convert two more samples to libbpf

2018-07-26 Thread Daniel Borkmann
On 07/26/2018 11:32 PM, Jakub Kicinski wrote: > Hi! > > This set converts xdpsock_user.c and xdp_fwd_user.c to use libbpf instead > of bpf_load.o. First two patches are minor improvements to libbpf to make > the conversion (and use of libbpf in general) nicer. > > Jakub Kicinski (4): > tools:

Re: [PATCH bpf-next 0/6] nfp: bpf: improve efficiency of offloaded perf events

2018-07-26 Thread Daniel Borkmann
On 07/26/2018 04:53 AM, Jakub Kicinski wrote: > Hi! > > This set is focused on improving the performance of perf events > reported from BPF offload. Perf events can now be received on > packet data queues, which significantly improves the performance > (from total of 0.5 Msps to 5Msps per core).

Re: [PATCH v5 bpf-next 2/9] veth: Add driver XDP

2018-07-26 Thread Toshiaki Makita
Hi John, On 2018/07/27 12:02, John Fastabend wrote: > On 07/26/2018 07:40 AM, Toshiaki Makita wrote: >> From: Toshiaki Makita >> >> This is the basic implementation of veth driver XDP. >> >> Incoming packets are sent from the peer veth device in the form of skb, >> so this is generally doing the

Re: [pull request][net-next 00/13] Mellanox, mlx5e updates 2018-07-26 (XDP redirect)

2018-07-26 Thread David Miller
From: Saeed Mahameed Date: Thu, 26 Jul 2018 15:56:34 -0700 > This series from Tariq adds the support for device-out XDP redirect. > > For more information please see tag log below. > > Please pull and let me know if there's any problem. Looks good, pulled, thanks a lot.

Re: [PATCH net] net: ena: Fix use of uninitialized DMA address bits field

2018-07-26 Thread David Miller
From: Gal Pressman Date: Thu, 26 Jul 2018 23:40:33 +0300 > UBSAN triggers the following undefined behaviour warnings: > [...] > [ 13.236124] UBSAN: Undefined behaviour in > drivers/net/ethernet/amazon/ena/ena_eth_com.c:468:22 > [ 13.240043] shift exponent 64 is too large for 64-bit type

Re: [PATCH net-next] netdevsim: make debug dirs' dentries static

2018-07-26 Thread David Miller
From: Jakub Kicinski Date: Thu, 26 Jul 2018 14:25:26 -0700 > The root directories of netdevsim should only be used by the core > to create per-device subdirectories, so limit their visibility to > the core file. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Quentin Monnet Applied.

Re: [patch net-next RFC] net: sched: don't dump chains only held by actions

2018-07-26 Thread Cong Wang
On Thu, Jul 26, 2018 at 9:33 AM Jiri Pirko wrote: > > From: Jiri Pirko > > In case a chain is empty and not explicitly created by a user, > such chain should not exist. The only exception is if there is > an action "goto chain" pointing to it. In that case, don't show the > chain in the dump.

Re: [PATCH v5 bpf-next 5/9] veth: Add ndo_xdp_xmit

2018-07-26 Thread John Fastabend
On 07/26/2018 07:40 AM, Toshiaki Makita wrote: > From: Toshiaki Makita > > This allows NIC's XDP to redirect packets to veth. The destination veth > device enqueues redirected packets to the napi ring of its peer, then > they are processed by XDP on its peer veth device. > This can be thought as

Re: [PATCH v5 bpf-next 4/9] veth: Handle xdp_frames in xdp napi ring

2018-07-26 Thread John Fastabend
On 07/26/2018 07:40 AM, Toshiaki Makita wrote: > From: Toshiaki Makita > > This is preparation for XDP TX and ndo_xdp_xmit. > This allows napi handler to handle xdp_frames through xdp ring as well > as sk_buff. > > v3: > - Revert v2 change around rings and use a flag to differentiate skb and >

Re: [PATCH v5 bpf-next 2/9] veth: Add driver XDP

2018-07-26 Thread John Fastabend
On 07/26/2018 07:40 AM, Toshiaki Makita wrote: > From: Toshiaki Makita > > This is the basic implementation of veth driver XDP. > > Incoming packets are sent from the peer veth device in the form of skb, > so this is generally doing the same thing as generic XDP. > > This itself is not so

Re: [PATCH net-next v3 1/5] tc/act: user space can't use TC_ACT_REDIRECT directly

2018-07-26 Thread Daniel Borkmann
On 07/26/2018 09:43 AM, Jiri Pirko wrote: > Wed, Jul 25, 2018 at 06:29:54PM CEST, dan...@iogearbox.net wrote: >> On 07/25/2018 05:48 PM, Paolo Abeni wrote: >>> On Wed, 2018-07-25 at 15:03 +0200, Jiri Pirko wrote: Wed, Jul 25, 2018 at 02:54:04PM CEST, pab...@redhat.com wrote: > On Wed,

Re: [PATCH bpf] bpf: btf: Use exact btf value_size match in map_check_btf()

2018-07-26 Thread Daniel Borkmann
On 07/26/2018 06:57 PM, Martin KaFai Lau wrote: > The current map_check_btf() in BPF_MAP_TYPE_ARRAY rejects > '> map->value_size' to ensure map_seq_show_elem() will not > access things beyond an array element. > > Yonghong suggested that using '!=' is a more correct > check. The 8 bytes round_up

Re: [PATCH V3 bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Daniel Borkmann
On 07/26/2018 04:17 PM, Taehee Yoo wrote: > rhashtable_lookup() can return NULL. so that NULL pointer > check routine should be added. > > Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") > Acked-by: Martin KaFai Lau > Signed-off-by: Taehee Yoo Applied to bpf, thanks Taehee!

Re: [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-26 Thread Jakub Kicinski
On Fri, 27 Jul 2018 10:06:41 +0900, Toshiaki Makita wrote: > On 2018/07/27 9:51, Jakub Kicinski wrote: > > On Thu, 26 Jul 2018 23:40:26 +0900, Toshiaki Makita wrote: > >> + max_mtu = PAGE_SIZE - VETH_XDP_HEADROOM - > >> +peer->hard_header_len - > >> +

Re: [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-26 Thread Toshiaki Makita
On 2018/07/27 9:51, Jakub Kicinski wrote: > On Thu, 26 Jul 2018 23:40:26 +0900, Toshiaki Makita wrote: >> +max_mtu = PAGE_SIZE - VETH_XDP_HEADROOM - >> + peer->hard_header_len - >> + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); >> +

Re: [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-26 Thread Jakub Kicinski
On Thu, 26 Jul 2018 23:40:26 +0900, Toshiaki Makita wrote: > + max_mtu = PAGE_SIZE - VETH_XDP_HEADROOM - > + peer->hard_header_len - > + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); > + if (peer->mtu > max_mtu) { > +

Re: [PATCH net-next v4 1/4] net/sched: user-space can't set unknown tcfa_action values

2018-07-26 Thread Marcelo Ricardo Leitner
Hi, On Thu, Jul 26, 2018 at 04:34:57PM +0200, Paolo Abeni wrote: ... > @@ -895,6 +904,14 @@ struct tc_action *tcf_action_init_1(struct net *net, > struct tcf_proto *tp, > } > } > > + if (!tcf_action_valid(a->tcfa_action)) { > + net_warn_ratelimited("invalid

Re: [PATCH bpf-next 0/4] samples: bpf: convert two more samples to libbpf

2018-07-26 Thread Y Song
On Thu, Jul 26, 2018 at 2:32 PM, Jakub Kicinski wrote: > Hi! > > This set converts xdpsock_user.c and xdp_fwd_user.c to use libbpf instead > of bpf_load.o. First two patches are minor improvements to libbpf to make > the conversion (and use of libbpf in general) nicer. > > Jakub Kicinski (4): >

Re: [PATCH net-next v4 3/4] net/tc: introduce TC_ACT_REINSERT.

2018-07-26 Thread Cong Wang
On Thu, Jul 26, 2018 at 7:35 AM Paolo Abeni wrote: > > This is similar TC_ACT_REDIRECT, but with a slightly different > semantic: > - on ingress the mirred skbs are passed to the target device > network stack without any additional check not scrubbing. > - the rcu-protected stats provided via the

Re: [PATCH net-next v4 4/4] act_mirred: use TC_ACT_REINSERT when possible

2018-07-26 Thread Cong Wang
On Thu, Jul 26, 2018 at 7:35 AM Paolo Abeni wrote: > > When mirred is invoked from the ingress path, and it wants to redirect > the processed packet, it can now use the TC_ACT_REINSERT action, > filling the tcf_result accordingly, and avoiding a per packet > skb_clone(). > > Overall this gives a

Re: [PATCH net-next v3 4/5] net/tc: introduce TC_ACT_REINJECT.

2018-07-26 Thread Cong Wang
On Thu, Jul 26, 2018 at 5:52 AM Jamal Hadi Salim wrote: > > On 25/07/18 01:09 PM, Marcelo Ricardo Leitner wrote: > > On Wed, Jul 25, 2018 at 09:48:16AM -0700, Cong Wang wrote: > >> On Wed, Jul 25, 2018 at 5:27 AM Jamal Hadi Salim wrote: > >>> > >>> Those changes were there from the beginning

Re: [PATCH] bpf: verifier: BPF_MOV don't mark dst reg if src == dst

2018-07-26 Thread Y Song
On Thu, Jul 26, 2018 at 9:52 AM, Arthur Fabre wrote: > Oops, gmail seems to have mangled everything. Will resend using git > send-email. > > I've added the test cases for mov64, but I'm not sure of the expected mov32 > behavior. The interpreter has below: ALU_MOV_X: DST

[net-next 03/13] net/mlx5e: Gather all XDP pre-requisite checks in a single function

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Dedicate a function to all checks done when setting an XDP program. Take indications from priv instead of netdev features. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_main.c | 33 --- 1 file changed,

[net-next 06/13] net/mlx5e: Add counter for XDP redirect in RX

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Add per-ring and total stats for received packets that goes into XDP redirection. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 +++

[net-next 10/13] net/mlx5e: Add support for XDP_REDIRECT in device-out side

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Add implementation for the ndo_xdp_xmit callback. Dedicate a new set of XDP-SQ instances to satisfy the XDP_REDIRECT requests. These instances are totally separated from the existing XDP-SQ objects that satisfy local XDP_TX actions. Performance tests: xdp_redirect_map from

[net-next 12/13] net/mlx5e: TX, Move DB fields in TXQ-SQ struct

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Pointers in DB are static, move them to read-only area so they do not share a cacheline with fields modified in datapath. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 -- 1 file changed, 4

[net-next 04/13] net/mlx5e: Restrict the combination of large MTU and XDP

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Add checks in control path upon an MTU change or an XDP program set, to prevent reaching cases where large MTU and XDP are set simultaneously. This is to make sure we allow XDP only with the linear RX memory scheme, i.e. a received packet is not scattered to different pages.

[net-next 13/13] net/mlx5e: TX, Use function to access sq_dma object in fifo

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Use designated function mlx5e_dma_get() to get the mlx5e_sq_dma object to be pushed into fifo. Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_tx.c | 19 +-- 1 file

[net-next 11/13] net/mlx5e: RX, Prefetch the xdp_frame data area

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan A loaded XDP program might write to the xdp_frame data area, prefetchw() it to avoid a potential cache miss. Performance tests: ConnectX-5, XDP_TX packet rate, single ring. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Before: 13,172,976 pps After: 13,456,248 pps 2% gain.

[net-next 01/13] net/mlx5e: Replace call to MPWQE free with dealloc in interface down flow

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan No need to expose the MPWQE free function to control path. The dealloc function already exposed, use it. Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 -

[net-next 08/13] net/mlx5e: Refactor XDP counters

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Separate the XDP counters into two sets: (1) One set reside in the RQ stats, and they monitor XDP stats in the RQ side. (2) Another set is per XDP-SQ, and they monitor XDP stats that are related to XDP transmit flow. Signed-off-by: Tariq Toukan Signed-off-by: Eugenia

[net-next 07/13] net/mlx5e: Make XDP xmit functions more generic

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Convert the XDP xmit functions to use the generic xdp_frame API in XDP_TX flow. Same functions will be used later in this series to transmit the XDP redirect-out packets as well. Signed-off-by: Tariq Toukan Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed ---

[net-next 09/13] net/mlx5e: Re-order fields of struct mlx5e_xdpsq

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan In the downstream patch that adds support to XDP_REDIRECT-out, the XDP xmit frame function doesn't share the same run context as the NAPI that polls the XDP-SQ completion queue. Hence, need to re-order the XDP-SQ fields to avoid cacheline false-sharing. Take redirect_flush

[net-next 05/13] net/mlx5e: Move XDP related code into new XDP files

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Take XDP code out of the general EN header and RX file into new XDP files. Currently, XDP-SQ resides only within an RQ and used from a single flow (XDP_TX) triggered upon RX completions. In a downstream patch, additional type of XDP-SQ instances will be presented and used for

[net-next 02/13] net/mlx5e: Do not recycle RX pages in interface down flow

2018-07-26 Thread Saeed Mahameed
From: Tariq Toukan Keep all page-pool recycle calls within NAPI context. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_rx.c | 37 ++- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git

[pull request][net-next 00/13] Mellanox, mlx5e updates 2018-07-26 (XDP redirect)

2018-07-26 Thread Saeed Mahameed
Hi Dave, This series from Tariq adds the support for device-out XDP redirect. For more information please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit 6a8fab17940d4934293d4145abce00e178393bec: Merge branch

RE: [net-next 1/6] ixgbe: Do not allow LRO or MTU change with XDP

2018-07-26 Thread Nguyen, Anthony L
> From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > Sent: Thursday, July 26, 2018 2:47 PM > On Thu, 26 Jul 2018 14:21:08 -0700, Jakub Kicinski wrote: > > On Thu, 26 Jul 2018 10:40:45 -0700, Jeff Kirsher wrote: > > > From: Tony Nguyen > > > > > > XDP does not support jumbo frames or

Re: [net-next 1/6] ixgbe: Do not allow LRO or MTU change with XDP

2018-07-26 Thread Jakub Kicinski
On Thu, 26 Jul 2018 14:21:08 -0700, Jakub Kicinski wrote: > On Thu, 26 Jul 2018 10:40:45 -0700, Jeff Kirsher wrote: > > From: Tony Nguyen > > > > XDP does not support jumbo frames or LRO. These checks are being made > > outside the driver when an XDP program is loaded, however, there is > >

[RFC bpf-next 0/6] net: xsk: minor improvements around queue handling

2018-07-26 Thread Jakub Kicinski
Hi! This set tries to make the core take care of error checking for the drivers. In particular making sure that the AF_XDP UMEM is not installed on queues which don't exist (or are disabled) and that changing queue (AKA ethtool channel) count cannot disable queues with active AF_XDF zero-copy

[RFC bpf-next 2/6] xsk: refactor xdp_umem_assign_dev()

2018-07-26 Thread Jakub Kicinski
Return early and only take the ref on dev once there is no possibility of failing. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- net/xdp/xdp_umem.c | 49 -- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git

[RFC bpf-next 4/6] xsk: don't allow installing UMEM beyond the number of queues

2018-07-26 Thread Jakub Kicinski
Don't allow installing UMEM on queue IDs higher than real_num_rx_queues. Note that the check in xsk_bind() is advisory at most, since it's done without rtnl. Besides from driver's perspective the UMEM queue ID really only relates to RX queues. TX real_num_tx_queues queues the driver exposes are

[RFC bpf-next 6/6] ethtool: don't allow disabling queues with umem installed

2018-07-26 Thread Jakub Kicinski
We already check the RSS indirection table does not use queues which would be disabled by channel reconfiguration. Make sure user does not try to disable queues which have a UMEM and zero- -copy AF_XDP socket installed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet ---

[RFC bpf-next 5/6] ethtool: rename local variable max -> curr

2018-07-26 Thread Jakub Kicinski
ethtool_set_channels() validates the config against driver's max settings. It retrieves the current config and stores it in a variable called max. This was okay when only max settings were accessed but we will soon want to access current settings as well, so calling the entire structure max

[RFC bpf-next 1/6] net: update real_num_rx_queues even when !CONFIG_SYSFS

2018-07-26 Thread Jakub Kicinski
We used to depend on real_num_rx_queues as a upper bound for sanity checks. For AF_XDP it's useful if drivers can trust the stack never to try to install UMEM for queues which are not configured. Update dev->real_num_rx_queues even without sysfs compiled, otherwise it would always stay equal

[RFC bpf-next 3/6] xsk: don't allow umem replace at stack level

2018-07-26 Thread Jakub Kicinski
Currently drivers have to check if they already have a umem installed for a given queue and return an error if so. Make better use of XDP_QUERY_XSK_UMEM and move this functionality to the core. We need to keep rtnl across the calls now. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet

[PATCH bpf-next 2/4] tools: libbpf: add bpf_object__find_program_by_title()

2018-07-26 Thread Jakub Kicinski
Allow users to find programs by section names. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/lib/bpf/libbpf.c | 12 tools/lib/bpf/libbpf.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index

[PATCH bpf-next 1/4] tools: libbpf: handle NULL program gracefully in bpf_program__nth_fd()

2018-07-26 Thread Jakub Kicinski
bpf_map__fd() handles NULL map gracefully and returns -EINVAL. bpf_program__fd() and bpf_program__nth_fd() crash in this case. Make the behaviour more consistent by validating prog pointer as well. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/lib/bpf/libbpf.c | 3 +++ 1

[PATCH bpf-next 0/4] samples: bpf: convert two more samples to libbpf

2018-07-26 Thread Jakub Kicinski
Hi! This set converts xdpsock_user.c and xdp_fwd_user.c to use libbpf instead of bpf_load.o. First two patches are minor improvements to libbpf to make the conversion (and use of libbpf in general) nicer. Jakub Kicinski (4): tools: libbpf: handle NULL program gracefully in

[PATCH bpf-next 4/4] samples: bpf: convert xdpsock_user.c to libbpf

2018-07-26 Thread Jakub Kicinski
Convert xdpsock_user.c to use libbpf instead of bpf_load.o. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- CC: Magnus Karlsson CC: Björn Töpel samples/bpf/Makefile | 2 +- samples/bpf/xdpsock_user.c | 38 +- 2 files changed, 30

[PATCH bpf-next 3/4] samples: bpf: convert xdp_fwd_user.c to libbpf

2018-07-26 Thread Jakub Kicinski
Convert xdp_fwd_user.c to use libbpf instead of bpf_load.o. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- CC: dsah...@gmail.com samples/bpf/Makefile | 2 +- samples/bpf/xdp_fwd_user.c | 34 +++--- 2 files changed, 24 insertions(+), 12

[PATCH net-next] netdevsim: make debug dirs' dentries static

2018-07-26 Thread Jakub Kicinski
The root directories of netdevsim should only be used by the core to create per-device subdirectories, so limit their visibility to the core file. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/netdevsim/netdev.c| 6 +++--- drivers/net/netdevsim/netdevsim.h | 3

Re: [net-next 1/6] ixgbe: Do not allow LRO or MTU change with XDP

2018-07-26 Thread Jakub Kicinski
On Thu, 26 Jul 2018 10:40:45 -0700, Jeff Kirsher wrote: > From: Tony Nguyen > > XDP does not support jumbo frames or LRO. These checks are being made > outside the driver when an XDP program is loaded, however, there is > nothing preventing these from changing after an XDP program is loaded. >

Re: [net-next 0/6][pull request] 10GbE Intel Wired LAN Driver Updates 2018-07-26

2018-07-26 Thread David Miller
From: Jeff Kirsher Date: Thu, 26 Jul 2018 10:40:44 -0700 > This series contains updates to ixgbe and igb. Pulled, thanks Jeff.

Re: [patch net-next] net: sched: unmark chain as explicitly created on delete

2018-07-26 Thread David Miller
From: Jiri Pirko Date: Thu, 26 Jul 2018 18:27:58 +0200 > From: Jiri Pirko > > Once user manually deletes the chain using "chain del", the chain cannot > be marked as explicitly created anymore. > > Signed-off-by: Jiri Pirko > Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")

Re: [PATCH net-next] l2tp: remove ->recv_payload_hook

2018-07-26 Thread David Miller
From: Guillaume Nault Date: Wed, 25 Jul 2018 14:53:33 +0200 > The tunnel reception hook is only used by l2tp_ppp for skipping PPP > framing bytes. This is a session specific operation, but once a PPP > session sets ->recv_payload_hook on its tunnel, all frames received by > the tunnel will enter

Re: [PATCH net-next] net/tls: Removed redundant checks for non-NULL

2018-07-26 Thread David Miller
From: Vakul Garg Date: Tue, 24 Jul 2018 16:54:27 +0530 > Removed checks against non-NULL before calling kfree_skb() and > crypto_free_aead(). These functions are safe to be called with NULL > as an argument. > > Signed-off-by: Vakul Garg Applied.

Re: [PATCH net v2] net: rollback orig value on failure of dev_qdisc_change_tx_queue_len

2018-07-26 Thread David Miller
From: Tariq Toukan Date: Tue, 24 Jul 2018 14:12:20 +0300 > Fix dev_change_tx_queue_len so it rolls back original value > upon a failure in dev_qdisc_change_tx_queue_len. > This is already done for notifirers' failures, share the code. > > In case of failure in dev_qdisc_change_tx_queue_len,

Re: [PATCH net-next] cbs: Add support for the graft function

2018-07-26 Thread David Miller
From: Vinicius Costa Gomes Date: Mon, 23 Jul 2018 17:08:00 -0700 > This will allow to install a child qdisc under cbs. The main use case > is to install ETF (Earliest TxTime First) qdisc under cbs, so there's > another level of control for time-sensitive traffic. > > Signed-off-by: Vinicius

[PATCH net] net: ena: Fix use of uninitialized DMA address bits field

2018-07-26 Thread Gal Pressman
UBSAN triggers the following undefined behaviour warnings: [...] [ 13.236124] UBSAN: Undefined behaviour in drivers/net/ethernet/amazon/ena/ena_eth_com.c:468:22 [ 13.240043] shift exponent 64 is too large for 64-bit type 'long long unsigned int' [...] [ 13.744769] UBSAN: Undefined

Re: [patch net-next RFC] net: sched: don't dump chains only held by actions

2018-07-26 Thread Jakub Kicinski
On Thu, 26 Jul 2018 18:31:01 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > In case a chain is empty and not explicitly created by a user, > such chain should not exist. The only exception is if there is > an action "goto chain" pointing to it. In that case, don't show the > chain in the dump.

Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c

2018-07-26 Thread Saeed Mahameed
On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib wrote: > Move the definition of mlx5e_priv_flags into en_ethtool.c because it's > only used there. > > Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags > infrastructure") > Signed-off-by: Kamal Heib > --- >

Re: [PATCH bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Jakub Kicinski
On Thu, 26 Jul 2018 14:13:20 +0200, Björn Töpel wrote: > Den mån 23 juli 2018 kl 21:58 skrev Jakub Kicinski: > > On Mon, 23 Jul 2018 11:39:36 +0200, Björn Töpel wrote: > > > Den fre 20 juli 2018 kl 22:08 skrev Jakub Kicinski: > > > > On Fri, 20 Jul 2018 10:18:21 -0700, Martin KaFai Lau wrote:

(no subject)

2018-07-26 Thread Fritz Micheal.
-- Do you need a loan at 2% interest rate for any reason ? Every interested applicant should contact us via the below contact details. E-mails: fritzmicloanf...@financier.com firtzmicloanf...@gmail.com Yours Sincerely Fritz Micheal.

[net-next 1/6] ixgbe: Do not allow LRO or MTU change with XDP

2018-07-26 Thread Jeff Kirsher
From: Tony Nguyen XDP does not support jumbo frames or LRO. These checks are being made outside the driver when an XDP program is loaded, however, there is nothing preventing these from changing after an XDP program is loaded. Add the checks so that while an XDP program is loaded, do not allow

[net-next 0/6][pull request] 10GbE Intel Wired LAN Driver Updates 2018-07-26

2018-07-26 Thread Jeff Kirsher
This series contains updates to ixgbe and igb. Tony fixes ixgbe to add checks to ensure jumbo frames or LRO get enabled after an XDP program is loaded. Shannon Nelson adds the missing security configuration registers to the ixgbe register dump, which will help in debugging. Christian Grönke

[net-next 5/6] ixgbe: Reorder Tx/Rx shutdown to reduce time needed to stop device

2018-07-26 Thread Jeff Kirsher
From: Alexander Duyck This change is meant to help reduce the time needed to shutdown the transmit and receive paths for the device. Specifically what we now do after this patch is disable the transmit path first at the netdev level, and then work on disabling the Rx. This way while we are

[net-next 3/6] igb: Remove superfluous reset to PHY and page 0 selection

2018-07-26 Thread Jeff Kirsher
From: Christian Grönke This patch reverts two previous applied patches to fix an issue that appeared when using SGMII based SFP modules. In the current state the driver will try to reset the PHY before obtaining the phy_addr of the SGMII attached PHY. That leads to an error in

[net-next 2/6] ixgbe: add ipsec security registers into ethtool register dump

2018-07-26 Thread Jeff Kirsher
From: Shannon Nelson Add the ixgbe's security configuration registers into the register dump. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 10 +- 1 file changed, 9 insertions(+), 1

[net-next 4/6] igb: Use dma_wmb() instead of wmb() before doorbell writes

2018-07-26 Thread Jeff Kirsher
From: Venkatesh Srinivas igb writes to doorbells to post transmit and receive descriptors; after writing descriptors to memory but before writing to doorbells, use dma_wmb() rather than wmb(). wmb() is more heavyweight than necessary before doorbell writes. On x86, this avoids SFENCEs before

[PATCH v1 net-next] igb: Use an advanced ctx descriptor for launchtime

2018-07-26 Thread Jesus Sanchez-Palencia
On i210, Launchtime (TxTime) requires the usage of an "Advanced Transmit Context Descriptor" for retrieving the timestamp of a packet. The igb driver correctly builds such descriptor on the segmentation flow (i.e. igb_tso()) or on the checksum one (i.e. igb_tx_csum()), but the feature is broken

[PATCH bpf] bpf: btf: Use exact btf value_size match in map_check_btf()

2018-07-26 Thread Martin KaFai Lau
The current map_check_btf() in BPF_MAP_TYPE_ARRAY rejects '> map->value_size' to ensure map_seq_show_elem() will not access things beyond an array element. Yonghong suggested that using '!=' is a more correct check. The 8 bytes round_up on value_size is stored in array->elem_size. Hence, using

Re: [PATCH] bpf: verifier: BPF_MOV don't mark dst reg if src == dst

2018-07-26 Thread Arthur Fabre
Oops, gmail seems to have mangled everything. Will resend using git send-email. I've added the test cases for mov64, but I'm not sure of the expected mov32 behavior. Currently coerce_reg_to_size() is called after mark_reg_unknown(), which sets the bounds to 64bits. coerce_reg_to_size() resets the

Re: [patch net-next] selftests: forwarding: add tests for TC chain get and dump operations

2018-07-26 Thread David Miller
From: Jiri Pirko Date: Thu, 26 Jul 2018 11:38:34 +0200 > From: Jiri Pirko > > Signed-off-by: Jiri Pirko Applied, thanks Jiri.

[patch net-next RFC] net: sched: don't dump chains only held by actions

2018-07-26 Thread Jiri Pirko
From: Jiri Pirko In case a chain is empty and not explicitly created by a user, such chain should not exist. The only exception is if there is an action "goto chain" pointing to it. In that case, don't show the chain in the dump. Track the chain references held by actions and use them to find

[patch net-next] net: sched: unmark chain as explicitly created on delete

2018-07-26 Thread Jiri Pirko
From: Jiri Pirko Once user manually deletes the chain using "chain del", the chain cannot be marked as explicitly created anymore. Signed-off-by: Jiri Pirko Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") --- net/sched/cls_api.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH V3 bpf] xdp: add NULL pointer check in __xdp_return()

2018-07-26 Thread Björn Töpel
Den tors 26 juli 2018 kl 16:18 skrev Taehee Yoo : > > rhashtable_lookup() can return NULL. so that NULL pointer > check routine should be added. > Thanks Taehee! Acked-by: Björn Töpel > Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY") > Acked-by: Martin KaFai Lau > Signed-off-by: Taehee

Re: [Query]: DSA Understanding

2018-07-26 Thread Andrew Lunn
> I am bit confused on how dsa needs to be actually working, > Q's > 1] should I be running a dhcp server on eth1 (where switch is connected) > so that devices connected on lan* devices get an ip ? Nope. You need eth1 up, but otherwise you do not use it. Use the lanX interfaces like normal

Re: [Query]: DSA Understanding

2018-07-26 Thread Lad, Prabhakar
On Thu, Jul 26, 2018 at 3:08 PM, Andrew Lunn wrote: >> Yes I am using fixed phy on slave1, following is my dts: > > Posting the original DTS file is better, not the decompiled version. > My bad will take care of it next time. >> >> ethernet@48484000 { >> compatible =

[PATCH net-next v2 1/2] tls: Remove dead code in tls_sw_sendmsg

2018-07-26 Thread Doron Roberts-Kedes
tls_push_record either returns 0 on success or a negative value on failure. This patch removes code that would only be executed if tls_push_record were to return a positive value. Signed-off-by: Doron Roberts-Kedes --- net/tls/tls_sw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-)

[PATCH net-next v2 2/2] tls: Fix improper revert in zerocopy_from_iter

2018-07-26 Thread Doron Roberts-Kedes
The current code is problematic because the iov_iter is reverted and never advanced in the non-error case. This patch skips the revert in the non-error case. This patch also fixes the amount by which the iov_iter is reverted. Currently, iov_iter is reverted by size, which can be greater than the

[PATCH net-next v2 0/2] tls: Fix improper revert in zerocopy_from_iter

2018-07-26 Thread Doron Roberts-Kedes
This series fixes the improper iov_iter_revert introcded in "tls: Fix zerocopy_from_iter iov handling". Changes from v1: - call iov_iter_revert inside zerocopy_from_iter Doron Roberts-Kedes (2): tls: Remove dead code in tls_sw_sendmsg tls: Fix improper revert in zerocopy_from_iter

Re: [PATCH rdma-next v2 0/8] Support mlx5 flow steering with RAW data

2018-07-26 Thread Jason Gunthorpe
On Thu, Jul 26, 2018 at 07:35:49AM +0300, Leon Romanovsky wrote: > On Wed, Jul 25, 2018 at 08:35:17AM -0600, Jason Gunthorpe wrote: > > On Wed, Jul 25, 2018 at 08:37:03AM +0300, Leon Romanovsky wrote: > > > > > > Also, I would like to keep the specs consistently formatted according > > > > to

[PATCH v5 bpf-next 9/9] veth: Support per queue XDP ring

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita Move XDP and napi related fields in veth_priv to newly created veth_rq structure. When xdp_frames are enqueued from ndo_xdp_xmit and XDP_TX, rxq is selected by current cpu. When skbs are enqueued from the peer device, rxq is one to one mapping of its peer txq. This way we

[PATCH v5 bpf-next 6/9] bpf: Make redirect_info accessible from modules

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita We are going to add kern_flags field in redirect_info for kernel internal use. In order to avoid function call to access the flags, make redirect_info accessible from modules. Also as it is now non-static, add prefix bpf_ to redirect_info. Signed-off-by: Toshiaki Makita

[PATCH v5 bpf-next 8/9] veth: Add XDP TX and REDIRECT

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This allows further redirection of xdp_frames like NIC -> veth--veth -> veth--veth (XDP) (XDP) (XDP) The intermediate XDP, redirecting packets from NIC to the other veth, reuses xdp_mem_info from NIC so that page recycling of the NIC works on the

[PATCH v5 bpf-next 5/9] veth: Add ndo_xdp_xmit

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This allows NIC's XDP to redirect packets to veth. The destination veth device enqueues redirected packets to the napi ring of its peer, then they are processed by XDP on its peer veth device. This can be thought as calling another XDP program by XDP program using REDIRECT,

[PATCH v5 bpf-next 4/9] veth: Handle xdp_frames in xdp napi ring

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This is preparation for XDP TX and ndo_xdp_xmit. This allows napi handler to handle xdp_frames through xdp ring as well as sk_buff. v3: - Revert v2 change around rings and use a flag to differentiate skb and xdp_frame, since bulk skb xmit makes little performance

[PATCH v5 bpf-next 7/9] xdp: Helpers for disabling napi_direct of xdp_return_frame

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita We need some mechanism to disable napi_direct on calling xdp_return_frame_rx_napi() from some context. When veth gets support of XDP_REDIRECT, it will redirects packets which are redirected from other devices. On redirection veth will reuse xdp_mem_info of the redirection

[PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita All oversized packets including GSO packets are dropped if XDP is enabled on receiver side, so don't send such packets from peer. Drop TSO and SCTP fragmentation features so that veth devices themselves segment packets with XDP enabled. Also cap MTU accordingly. v4: -

[PATCH v5 bpf-next 1/9] net: Export skb_headers_offset_update

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This is needed for veth XDP which does skb_copy_expand()-like operation. v2: - Drop skb_copy_header part because it has already been exported now. Signed-off-by: Toshiaki Makita --- include/linux/skbuff.h | 1 + net/core/skbuff.c | 3 ++- 2 files changed, 3

[PATCH v5 bpf-next 2/9] veth: Add driver XDP

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This is the basic implementation of veth driver XDP. Incoming packets are sent from the peer veth device in the form of skb, so this is generally doing the same thing as generic XDP. This itself is not so useful, but a starting point to implement other useful veth XDP

[PATCH v5 bpf-next 0/9] veth: Driver XDP

2018-07-26 Thread Toshiaki Makita
From: Toshiaki Makita This patch set introduces driver XDP for veth. Basically this is used in conjunction with redirect action of another XDP program. NIC ---> veth===veth (XDP) (redirect)(XDP) In this case xdp_frame can be forwarded to the peer veth without modification,

[PATCH net-next v4 4/4] act_mirred: use TC_ACT_REINSERT when possible

2018-07-26 Thread Paolo Abeni
When mirred is invoked from the ingress path, and it wants to redirect the processed packet, it can now use the TC_ACT_REINSERT action, filling the tcf_result accordingly, and avoiding a per packet skb_clone(). Overall this gives a ~10% improvement in forwarding performance for the TC S/W data

[PATCH net-next v4 0/4] TC: refactor act_mirred packets re-injection

2018-07-26 Thread Paolo Abeni
This series is aimed at improving the act_mirred redirect performances. Such action is used by OVS to represent TC S/W flows, and it's current largest bottle-neck is the need for a skb_clone() for each packet. The first 2 patches introduce some cleanup and safeguards to allow extending

[PATCH net-next v4 1/4] net/sched: user-space can't set unknown tcfa_action values

2018-07-26 Thread Paolo Abeni
Currently, when initializing an action, the user-space can specify and use arbitrary values for the tcfa_action field. If the value is unknown by the kernel, is implicitly threaded as TC_ACT_UNSPEC. This change explicitly checks for unknown values at action creation time, and explicitly convert

[PATCH net-next v4 3/4] net/tc: introduce TC_ACT_REINSERT.

2018-07-26 Thread Paolo Abeni
This is similar TC_ACT_REDIRECT, but with a slightly different semantic: - on ingress the mirred skbs are passed to the target device network stack without any additional check not scrubbing. - the rcu-protected stats provided via the tcf_result struct are updated on error conditions. This new

[PATCH net-next v4 2/4] tc/act: remove unneeded RCU lock in action callback

2018-07-26 Thread Paolo Abeni
Each lockless action currently does its own RCU locking in ->act(). This allows using plain RCU accessor, even if the context is really RCU BH. This change drops the per action RCU lock, replace the accessors with the _bh variant, cleans up a bit the surrounding code and documents the RCU status

  1   2   >