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

2018-07-25 Thread Arthur Fabre
When check_alu_op() handles a BPF_MOV between two registers, it calls check_reg_arg() on the dst register, marking it as unbounded. If the src and dst register are the same, this marks the src as unbounded, which can lead to unexpected errors for further checks that rely on bounds info.

[PATCH bpf-next v3] bpf: add End.DT6 action to bpf_lwt_seg6_action helper

2018-07-25 Thread Mathieu Xhonneux
The seg6local LWT provides the End.DT6 action, which allows to decapsulate an outer IPv6 header containing a Segment Routing Header (SRH), full specification is available here: https://tools.ietf.org/html/draft-filsfils-spring-srv6-network-programming-05 This patch adds this action now to the

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-25 Thread D'Souza, Nelson
David, To narrow down on the issue, I've been requested by our kernel team for the following information: "Can you clarify what kernel configuration was used for the clean 4.14.52 kernel (no changes) The kernel configuration may be available in /proc/config.gz, or it might be available as a

[PATCH bpf-next 2/6] nfp: allow control message reception on data queues

2018-07-25 Thread Jakub Kicinski
Port id 0x is reserved for control messages. Allow reception of messages with this id on data queues. Hand off a raw buffer to the higher layer code, without allocating SKB for max efficiency. The RX handle can't modify or keep the buffer, after it returns buffer is handed back over to

Re: [PATCH net-next 0/4] nfp: protect from theoretical size overflows and SR-IOV errors

2018-07-25 Thread David Miller
From: Jakub Kicinski Date: Wed, 25 Jul 2018 19:40:33 -0700 > This small set changes the handling of pci_sriov_set_totalvfs() errors. > nfp is the only driver which fails probe on pci_sriov_set_totalvfs() > errors. It turns out some BIOS configurations may break SR-IOV and > users who don't use

Re: [PATCH net] cxgb4: Added missing break in ndo_udp_tunnel_{add/del}

2018-07-25 Thread David Miller
From: Arjun Vynipadath Date: Wed, 25 Jul 2018 19:39:52 +0530 > Break statements were missing for Geneve case in > ndo_udp_tunnel_{add/del}, thereby raw mac matchall > entries were not getting added. > > Fixes: c746fc0e8b2d("cxgb4: add geneve offload support for T6") > Signed-off-by: Arjun

Re: [PATCH net] netdevsim: don't leak devlink resources

2018-07-25 Thread David Miller
From: Jakub Kicinski Date: Wed, 25 Jul 2018 15:39:27 -0700 > Devlink resources registered with devlink_resource_register() have > to be unregistered. > > Fixes: 37923ed6b8ce ("netdevsim: Add simple FIB resource controller via > devlink") > Signed-off-by: Jakub Kicinski > Reviewed-by: Quentin

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

2018-07-25 Thread Leon Romanovsky
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 clang-format with 'BinPackParameters: true', so I reflowed them as > > > well.

Re: pull-request: can 2018-07-23

2018-07-25 Thread David Miller
From: Marc Kleine-Budde Date: Tue, 24 Jul 2018 09:27:30 +0200 > Thanks David. Can you please merge net into next-next, as I've some > patches for net-next that would result in a merge conflict between net > and net-next later. This has now been done.

Re: [PATCH net-next 0/3] net/mlx5: Offload setting/matching on tunnel tos/ttl

2018-07-25 Thread David Miller
From: Or Gerlitz Date: Tue, 24 Jul 2018 13:59:32 +0300 > This series enables mlx5 offloading of tc eswitch rules that set > tos/ttl (encap) or match on them (decap) for tunnels. Series applied, thanks.

Re: [PATCH net-next] net: igmp: make function __ip_mc_inc_group() static

2018-07-25 Thread David Miller
From: Wei Yongjun Date: Wed, 25 Jul 2018 06:06:13 + > Fixes the following sparse warnings: > > net/ipv4/igmp.c:1391:6: warning: > symbol '__ip_mc_inc_group' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Applied to 'net'.

Re: [PATCH net-next] lan743x: Make symbol lan743x_pm_ops static

2018-07-25 Thread David Miller
From: Wei Yongjun Date: Wed, 25 Jul 2018 06:11:16 + > Fixes the following sparse warning: > > drivers/net/ethernet/microchip/lan743x_main.c:2944:25: warning: > symbol 'lan743x_pm_ops' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Applied.

Re: [net-next 10/16] net/mlx5: Support PCIe buffer congestion handling via Devlink

2018-07-25 Thread Jakub Kicinski
On Wed, 25 Jul 2018 08:23:26 -0700, Alexander Duyck wrote: > On Wed, Jul 25, 2018 at 5:31 AM, Eran Ben Elisha wrote: > > On 7/24/2018 10:51 PM, Jakub Kicinski wrote: > The devlink params haven't been upstream even for a full cycle and > already you guys are starting to use them to

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

2018-07-25 Thread Daniel Borkmann
On 07/26/2018 12:08 AM, Arthur Fabre wrote: > When check_alu_op() handles a BPF_MOV between two registers, > it calls check_reg_arg() on the dst register, marking it as unbounded. > If the src and dst register are the same, this marks the src as > unbounded, which can lead to unexpected errors for

[PATCH net-next 3/4] nfp: restore correct ordering of fields in rx ring structure

2018-07-25 Thread Jakub Kicinski
Commit 7f1c684a8966 ("nfp: setup xdp_rxq_info") mixed the cache cold and cache hot data in the nfp_net_rx_ring structure (ignoring the feedback), to try to fit the structure into 2 cache lines after struct xdp_rxq_info was added. Now that we are about to add a new field the structure will grow

[PATCH net-next 0/4] nfp: protect from theoretical size overflows and SR-IOV errors

2018-07-25 Thread Jakub Kicinski
Hi! This small set changes the handling of pci_sriov_set_totalvfs() errors. nfp is the only driver which fails probe on pci_sriov_set_totalvfs() errors. It turns out some BIOS configurations may break SR-IOV and users who don't use that feature should not suffer. Remaining patches makes sure we

[PATCH net-next 2/4] nfp: use kvcalloc() to allocate SW buffer descriptor arrays

2018-07-25 Thread Jakub Kicinski
Use kvcalloc() instead of tmp variable + kzalloc() when allocating SW buffer information to allow falling back to vmalloc and to protect from theoretical integer overflow. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- .../net/ethernet/netronome/nfp/nfp_net_common.c | 16

[PATCH net-next 1/4] nfp: don't fail probe on pci_sriov_set_totalvfs() errors

2018-07-25 Thread Jakub Kicinski
On machines with buggy ACPI tables or when SR-IOV is already enabled we may not be able to set the SR-IOV VF limit in sysfs, it's not fatal because the limit is imposed by the driver anyway. Only the sysfs 'sriov_totalvfs' attribute will be too high. Print an error to inform user about the

[PATCH net-next 4/4] nfp: protect from theoretical size overflows on HW descriptor ring

2018-07-25 Thread Jakub Kicinski
Use array_size() and store the size as full size_t to protect from theoretical size overflow when handling HW descriptor rings. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/nfp_net.h| 4 ++--

[PATCH bpf-next 5/6] nfp: bpf: remember maps by ID

2018-07-25 Thread Jakub Kicinski
Record perf maps by map ID, not raw kernel pointer. This helps with debug messages, because printing pointers to logs is frowned upon, and makes debug easier for the users, as map ID is something they should be more familiar with. Note that perf maps are offload neutral, therefore IDs won't be

[PATCH bpf-next 4/6] nfp: bpf: allow receiving perf events on data queues

2018-07-25 Thread Jakub Kicinski
Control queue is fairly low latency, and requires SKB allocations, which means we can't even reach 0.5Msps with perf events. Allow perf events to be delivered to data queues. This allows us to not only use multiple queues, but also receive and deliver to user space more than 5Msps per queue

[PATCH bpf-next 1/6] nfp: move repr handling on RX path

2018-07-25 Thread Jakub Kicinski
Representor packets are received on PF queues with special metadata tag for demux. There is no reason to resolve the representor ID -> netdev after the skb has been allocated. Move the code, this will allow us to handle special FW messages without SKB allocation overhead. Signed-off-by: Jakub

[PATCH bpf-next 3/6] nfp: bpf: pass raw data buffer to nfp_bpf_event_output()

2018-07-25 Thread Jakub Kicinski
In preparation for SKB-less perf event handling make nfp_bpf_event_output() take buffer address and length, not SKB as parameters. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 5 -

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

2018-07-25 Thread Jakub Kicinski
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). To get to this performance we need a fast path for

[PATCH bpf-next 6/6] nfp: bpf: improve map offload info messages

2018-07-25 Thread Jakub Kicinski
FW can put constraints on map element size to maximize resource use and efficiency. When user attempts offload of a map which does not fit into those constraints an informational message is printed to kernel logs to inform user about the reason offload failed. Map offload does not have access to

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

2018-07-25 Thread Jakub Kicinski
On Thu, 26 Jul 2018 00:09:50 +0900, 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") > Signed-off-by: Taehee Yoo > --- > V2 : add WARN_ON_ONCE when xa is NULL. > >

[PATCH RFC ipsec-next] xfrm: Check Reverse-Mark Lookup Before ADDSA/DELSA

2018-07-25 Thread Nathan Harold
It's possible to insert an SA into the SADB that will preclude the lookup of other SAs when using the MARK attribute. The problem occurs based on a particular sequencing with the marks where a new mark matches requests for the SA mark of an existing SA but the inverse is not true. For an example:

Re: [PATCH net-next] net/mlx4_core: Allow MTTs starting at any index

2018-07-25 Thread David Miller
From: Tariq Toukan Date: Tue, 24 Jul 2018 14:31:45 +0300 > Allow obtaining MTTs starting at any index, > thus give a better cache utilization. > > For this, allow setting log_mtts_per_seg to 0, and use > this in default. > > Signed-off-by: Tariq Toukan > Signed-off-by: Eli Cohen >

Re: [PATCH net-next] tcp: ack immediately when a cwr packet arrives

2018-07-25 Thread David Miller
From: Neal Cardwell Date: Tue, 24 Jul 2018 21:57:27 -0400 > On Tue, Jul 24, 2018 at 1:42 PM Lawrence Brakmo wrote: >> >> Note that without this fix the 99% latencies when doing 10KB RPCs >> in a congested network using DCTCP are 40ms vs. 190us with the patch. >> Also note that these 40ms high

Re: [181992] ...8xx/816: net-tcp_bbr: improve DCTCP ECN delayed ACK

2018-07-25 Thread Laurent Chavey
Are we ok with all the BBR patches for 816 (i.e. we did extensive testing?). On Wed, Jul 25, 2018 at 3:58 PM kernel-commit-validator (Code Review) < prodkernel-gerrit-comm...@google.com> wrote: > GA release commit message is missing a Release-Commit: tag indicating the > original SHA1. > > >

Re: [PATCH net-next] net/sched: cls_flower: Use correct inline function for assignment of vlan tpid

2018-07-25 Thread David Miller
From: Jianbo Liu Date: Wed, 25 Jul 2018 02:31:25 + > This fixes the following sparse warning: > > net/sched/cls_flower.c:1356:36: warning: incorrect type in argument 3 > (different base types) > net/sched/cls_flower.c:1356:36: expected unsigned short [unsigned] [usertype] > value >

Re: [PATCH net-next] tcp: make function tcp_retransmit_stamp() static

2018-07-25 Thread David Miller
From: Wei Yongjun Date: Wed, 25 Jul 2018 06:06:07 + > Fixes the following sparse warnings: > > net/ipv4/tcp_timer.c:25:5: warning: > symbol 'tcp_retransmit_stamp' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Applied, thank you.

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-25 Thread D'Souza, Nelson
David, I tried out the commands on an Ubuntu 17.10.1 VM. The pings on test-vrf are successful, but the pings on br0 are not successful. # uname -rv 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017  # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu

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

2018-07-25 Thread Dave Watson
On 07/24/18 04:54 PM, Vakul Garg wrote: > 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 Acked-by: Dave Watson

[PATCH net-next v2] tls: Skip zerocopy path for ITER_KVEC

2018-07-25 Thread Doron Roberts-Kedes
The zerocopy path ultimately calls iov_iter_get_pages, which defines the step function for ITER_KVECs as simply, return -EFAULT. Taking the non-zerocopy path for ITER_KVECs avoids the unnecessary fallback. See https://lore.kernel.org/lkml/20150401023311.gl29...@zeniv.linux.org.uk/T/#u for a

Re: [PATCH v1 1/4] igb: Remove unnecessary include of

2018-07-25 Thread Jeff Kirsher
On Wed, 2018-07-25 at 14:52 -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The igb driver doesn't need anything provided by pci-aspm.h, so > remove > the unnecessary include of it. > > Signed-off-by: Bjorn Helgaas Acked-by: Jeff Kirsher I am fine with you picking up this change. >

[PATCH net] netdevsim: don't leak devlink resources

2018-07-25 Thread Jakub Kicinski
Devlink resources registered with devlink_resource_register() have to be unregistered. Fixes: 37923ed6b8ce ("netdevsim: Add simple FIB resource controller via devlink") Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/netdevsim/devlink.c | 1 + 1 file changed, 1

Re: [PATCH net-next 00/17] mlxsw: Introduce algorithmic TCAM support

2018-07-25 Thread David Miller
From: Ido Schimmel Date: Wed, 25 Jul 2018 09:23:49 +0300 > The Spectrum-2 ASIC uses an algorithmic TCAM (A-TCAM) where multiple > exact matches lookups are performed instead of a single lookup as with > standard circuit TCAM (C-TCAM) memory. This allows for higher scale and > reduced power

Re: [PATCH bpf-next v2] bpf: add End.DT6 action to bpf_lwt_seg6_action helper

2018-07-25 Thread Mathieu Xhonneux
2018-07-25 23:13 GMT+02:00 Martin KaFai Lau : >> v2: - changed true/false -> 1/0 > hmmm...I thought I was asking to replace 1/0 with true/false. More > below. Silly me, I read your indication backwards. Agreed. @Daniel: sorry for this one, sending a v3.

[PATCH] drivers: net: wlcore: remove duplicate \n for some warnings

2018-07-25 Thread H. Nikolaus Schaller
wl1271_warning() already appends a \n to the format, so adding one to the warning string gives empty lines in the log. Signed-off-by: H. Nikolaus Schaller --- drivers/net/wireless/ti/wlcore/main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH net-next] lan743x: Make symbol lan743x_pm_ops static

2018-07-25 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/microchip/lan743x_main.c:2944:25: warning: symbol 'lan743x_pm_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

RE: [PATCH net-next] tls: Fix improper revert in zerocopy_from_iter

2018-07-25 Thread Vakul Garg
> -Original Message- > From: Doron Roberts-Kedes [mailto:doro...@fb.com] > Sent: Wednesday, July 25, 2018 1:50 AM > To: Vakul Garg > Cc: David S . Miller ; Dave Watson > ; Matt Mullins ; > netdev@vger.kernel.org > Subject: Re: [PATCH net-next] tls: Fix improper revert in

[PATCH net-next 05/17] mlxsw: resources: Add Spectrum-2 eRP resources

2018-07-25 Thread Ido Schimmel
Add the following resources to be used by A-TCAM code: * Maximum number of eRP banks * Maximum size of eRP bank * Number of eRP entries required for a 2/4/8/12 key blocks mask Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/resources.h | 12

[PATCH net-next 07/17] mlxsw: spectrum_acl: Enable C-TCAM only mode in eRP core

2018-07-25 Thread Ido Schimmel
Currently, no calls are performed into the eRP core, but in order to make review easier we would like to gradually add these calls. Have the eRP core initialize a region's master mask to all ones and allow it to use an empty eRP table. This directs the lookup to the C-TCAM and allows the C-TCAM

[PATCH net-next 01/17] mlxsw: reg: Prepare PERERP register for A-TCAM usage

2018-07-25 Thread Ido Schimmel
Before introducing A-TCAM support we need to make sure all the necessary fields are configurable and not hard coded to values that worked for the C-TCAM only use case. This includes - for example - the ability to configure the eRP table used by the TCAM region. Signed-off-by: Ido Schimmel

[PATCH net-next 10/17] mlxsw: spectrum_acl: Allow encoding a partial key

2018-07-25 Thread Ido Schimmel
When working with 12 key blocks in the A-TCAM, rules are split into two records, which constitute two lookups. The two records are linked using a "large entry key ID". The ID is assigned to key blocks 6 to 11 and resolved during the first lookup. The second lookup is performed using the ID and the

[PATCH net-next 00/17] mlxsw: Introduce algorithmic TCAM support

2018-07-25 Thread Ido Schimmel
The Spectrum-2 ASIC uses an algorithmic TCAM (A-TCAM) where multiple exact matches lookups are performed instead of a single lookup as with standard circuit TCAM (C-TCAM) memory. This allows for higher scale and reduced power consumption. The lookups are performed by masking a packet using

[PATCH net-next 11/17] mlxsw: spectrum_acl: Add A-TCAM initialization

2018-07-25 Thread Ido Schimmel
Initialize the A-TCAM as part of the driver's initialization routine. Specifically, initialize the eRP tables so that A-TCAM regions will be able to perform allocations of eRP tables upon rule insertion in subsequent patches. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko ---

[PATCH net-next 04/17] mlxsw: resources: Add Spectrum-2 maximum large key ID resource

2018-07-25 Thread Ido Schimmel
Add a resource to make sure we do not exceed the maximum number of supported large key IDs in a region. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/resources.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH net-next 08/17] mlxsw: spectrum_acl: Add support for C-TCAM eRPs

2018-07-25 Thread Ido Schimmel
The number of eRPs that can be used by a single A-TCAM region is limited to 16. When more eRPs are needed, an ordinary circuit TCAM (C-TCAM) can be used to hold the extra eRPs. Unlike the A-TCAM, only a single (last) lookup is performed in the C-TCAM and not a lookup per-eRP. However, modeling

[PATCH net-next 03/17] mlxsw: reg: Add Policy-Engine eRP Table Register

2018-07-25 Thread Ido Schimmel
The register is used to add and delete eRPs from the eRP table. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 113 ++ 1 file changed, 113 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h

[PATCH net-next 09/17] mlxsw: spectrum_acl: Extend Spectrum-2 region struct

2018-07-25 Thread Ido Schimmel
In a similar fashion to Spectrum-1's region struct, Spectrum-2's struct needs to store a pointer to the common region struct. The pointer will be used in follow-up patches that implement rules insertion and deletion. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko ---

[PATCH net-next 14/17] mlxsw: spectrum_acl: Add A-TCAM region initialization

2018-07-25 Thread Ido Schimmel
Before we start using the A-TCAM we need to make sure the region is properly initialized. This includes the setting of its type (which affects the size of its eRP table, for example) and its registration with the eRP core. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko ---

[PATCH net-next 15/17] mlxsw: spectrum_acl: Pass C-TCAM region and entry to insert function

2018-07-25 Thread Ido Schimmel
When A-TCAM will be used together with C-TCAM, the C-TCAM code will need to call into the eRP core in order to get an eRP for an inserted entry. The eRP core takes an A-TCAM region as one of its arguments, so pass the C-TCAM region to the insertion function which will later allow us to derive the

[PATCH net-next 13/17] mlxsw: spectrum_acl: Make global TCAM resources available to regions

2018-07-25 Thread Ido Schimmel
Each TCAM region currently uses its own resources and there is no sharing between the different regions. This is going to change with A-TCAM as each region will need to allocate an eRP table from the global eRP tables array. Make the global TCAM resources available to each region by passing the

[PATCH net-next 02/17] mlxsw: reg: Add Policy-Engine TCAM Entry Register Version 3

2018-07-25 Thread Ido Schimmel
The register is used to configure rules in the A-TCAM. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 165 +- 1 file changed, 162 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h

[PATCH net-next 12/17] mlxsw: spectrum_acl: Encapsulate C-TCAM region in A-TCAM region

2018-07-25 Thread Ido Schimmel
In Spectrum-2 the C-TCAM is only used for rules that can't fit in the A-TCAM due to a limited number of masks per A-TCAM region. In addition, rules inserted into the C-TCAM may affect rules residing in the A-TCAM, by clearing their C-TCAM prune bit. The two regions are thus closely related and

[PATCH net-next 16/17] mlxsw: spectrum_acl: Add A-TCAM rule insertion and deletion

2018-07-25 Thread Ido Schimmel
Implement rule insertion and deletion into the A-TCAM before we flip the driver to start using the A-TCAM. Rule insertion into the A-TCAM is very similar to C-TCAM, but there are subtle differences between regions of different sizes (i.e., different number of key blocks). Specifically, as

[PATCH net-next 17/17] mlxsw: spectrum_acl: Start using A-TCAM

2018-07-25 Thread Ido Schimmel
Now that all the pieces are in place we can start using the A-TCAM instead of only using the C-TCAM. This allows for much higher scale and better performance (to be improved further by follow-up patch sets). Perform the integration with the A-TCAM and the eRP core by reverting the changes

[PATCH net-next 06/17] mlxsw: spectrum_acl: Implement common eRP core

2018-07-25 Thread Ido Schimmel
When rules are inserted into the A-TCAM they are associated with a mask, which is part of the lookup key: { masked key, mask ID, region ID }. These masks are called rule patterns (RP) and the aggregation of several masks into one (to be introduced in follow-up patch sets) is called an extended RP

[PATCH bpf-next] tools/bpftool: ignore build products

2018-07-25 Thread Taeung Song
For untracked things of tools/bpf, add this. Reviewed-by: Quentin Monnet Signed-off-by: Taeung Song --- tools/bpf/.gitignore | 5 + tools/bpf/bpftool/.gitignore | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 tools/bpf/.gitignore diff --git a/tools/bpf/.gitignore

[PATCH v2 bpf-next] tools/bpftool: ignore build products

2018-07-25 Thread Taeung Song
For untracked things of tools/bpf, add this. Reviewed-by: Jakub Kicinski Signed-off-by: Taeung Song --- tools/bpf/.gitignore | 5 + tools/bpf/bpftool/.gitignore | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 tools/bpf/.gitignore diff --git a/tools/bpf/.gitignore

Re: [PATCH] drivers: net: wlcore: remove duplicate \n for some warnings

2018-07-25 Thread Kalle Valo
"H. Nikolaus Schaller" writes: > wl1271_warning() already appends a \n to the format, > so adding one to the warning string gives empty lines in the log. > > Signed-off-by: H. Nikolaus Schaller "drivers: net:" in the title is unnecessary, but I can remove that. -- Kalle Valo

Re: [patch net-next v4 03/12] net: sched: introduce chain object to uapi

2018-07-25 Thread Jiri Pirko
Wed, Jul 25, 2018 at 01:20:08AM CEST, xiyou.wangc...@gmail.com wrote: >On Tue, Jul 24, 2018 at 3:30 PM Cong Wang wrote: >> >> On Mon, Jul 23, 2018 at 12:25 AM Jiri Pirko wrote: >> > + switch (n->nlmsg_type) { >> > + case RTM_NEWCHAIN: >> > + /* In case the chain was

[PATCH v3] ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest()

2018-07-25 Thread Tan Hu
We came across infinite loop in ipvs when using ipvs in docker env. When ipvs receives new packets and cannot find an ipvs connection, it will create a new connection, then if the dest is unavailable (i.e. IP_VS_DEST_F_AVAILABLE), the packet will be dropped sliently. But if the dropped packet is

Re: Re: [PATCH v2] ipvs: fix race between ip_vs_conn_new() andip_vs_del_dest()

2018-07-25 Thread tan.hu
Thanks, patch-v3 has been sent. please check it again. > Hello, > > On Wed, 25 Jul 2018, Tan Hu wrote: > > > We came across infinite loop in ipvs when using ipvs in docker > > env. > > > > When ipvs receives new packets and cannot find an ipvs connection, > > it will create a new connection,

[PATCH v2] perf build: Build error in libbpf with EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2"

2018-07-25 Thread Thomas Richter
commit a5b8bd47dcc57 ("bpf tools: Collect eBPF programs from their own sections") causes a compiler error when building the perf tool in the linux-next tree. I compile it using a FEDORA 28 installation, my gcc compiler version: gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20) The file that causes

Re: [PATCH v6 13/18] wireless/lib80211: Convert from ahash to shash

2018-07-25 Thread Johannes Berg
On Tue, 2018-07-24 at 09:49 -0700, Kees Cook wrote: > In preparing to remove all stack VLA usage from the kernel[1], this > removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of > the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash > to direct shash. By removing a

[PATCH][v3] netfilter: use kvmalloc_array to allocate memory for hashtable

2018-07-25 Thread Li RongQing
nf_ct_alloc_hashtable is used to allocate memory for conntrack, NAT bysrc and expectation hashtable. Assuming 64k bucket size, which means 7th order page allocation, __get_free_pages, called by nf_ct_alloc_hashtable, will trigger the direct memory reclaim and stall for a long time, when system has

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

2018-07-25 Thread Paolo Abeni
On Tue, 2018-07-24 at 13:50 -0700, Cong Wang wrote: > On Tue, Jul 24, 2018 at 1:38 PM Cong Wang wrote: > > > > On Tue, Jul 24, 2018 at 1:07 PM Paolo Abeni wrote: > > > +static inline void skb_tc_reinject(struct sk_buff *skb, struct > > > tcf_result *res) > > > +{ > > > + struct

Re: [PATCH] drivers: net: wlcore: remove duplicate \n for some warnings

2018-07-25 Thread H. Nikolaus Schaller
> Am 25.07.2018 um 08:40 schrieb Kalle Valo : > > "H. Nikolaus Schaller" writes: > >> wl1271_warning() already appends a \n to the format, >> so adding one to the warning string gives empty lines in the log. >> >> Signed-off-by: H. Nikolaus Schaller > > "drivers: net:" in the title is

Re: [PATCH] Make Surface Dock 3 work again

2018-07-25 Thread Mathias Radtke
Hi, thanks for the feedback on my submission. Here's a corrected version of the submission since Kernel 4.10 the usage of the Surface Dock 3 is broken. The network driver r8152 reports Tx Error -71. The patch removes the dock from the r8152 driver and also removed it from the cdc_ether drivers

Re: [PATCH] drivers: net: wlcore: remove duplicate \n for some warnings

2018-07-25 Thread Kalle Valo
"H. Nikolaus Schaller" writes: >> Am 25.07.2018 um 08:40 schrieb Kalle Valo : >> >> "H. Nikolaus Schaller" writes: >> >>> wl1271_warning() already appends a \n to the format, >>> so adding one to the warning string gives empty lines in the log. >>> >>> Signed-off-by: H. Nikolaus Schaller >>

[Query]: DSA Understanding

2018-07-25 Thread Lad, Prabhakar
Hi, We are trying to integrate a MAC to an external switch as following: +---++--+ || RGMII || |++ KSZ9897 +-- 1000baseT MDI ("LAN1") || PORT 6 |

Re: [PATCH v3 bpf 1/3] bpf: btf: Sync uapi btf.h to tools

2018-07-25 Thread Sergei Shtylyov
On 7/24/2018 6:40 PM, Martin KaFai Lau wrote: This patch sync the uapi btf.h to tools/ Fixes: 36fc3c8c282c bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h Should be: Fixes: 36fc3c8c282c ("bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h") Signed-off-by: Martin KaFai Lau Acked-by:

[PATCH ipsec-next] xfrm: fix 'passing zero to ERR_PTR()' warning

2018-07-25 Thread YueHaibing
Fix a static code checker warning: net/xfrm/xfrm_policy.c:1836 xfrm_resolve_and_create_bundle() warn: passing zero to 'ERR_PTR' xfrm_tmpl_resolve return 0 just means no xdst found, return NULL instead of passing zero to ERR_PTR. Fixes: d809ec895505 ("xfrm: do not assume that template

Re: [PATCH 1/4] docs: bpf: Rename README.rst to index.rst

2018-07-25 Thread Sergei Shtylyov
Hello! On 7/25/2018 5:29 AM, Tobin C. Harding wrote: Recently bpf/ docs were converted to us RST format. 'README.rst' was s/us/use/? created but in order to fit in with the Sphinx build system this file should be named 'index.rst'. Rename file, fixes to integrate into Sphinx build

Re: [PATCH net-next 0/6] virtio_net: Add ethtool stat items

2018-07-25 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 11:36:03PM +0900, Toshiaki Makita wrote: > From: Toshiaki Makita > > Add some ethtool stat items useful for performance analysis. > > Signed-off-by: Toshiaki Makita Series: Acked-by: Michael S. Tsirkin Patch 1 seems appropriate for stable, even though it's minor. >

UDP GRO without Merging

2018-07-25 Thread Gauvain Roussel-Tarbouriech
Subject: Hello Netdev, I am working on WireGuard as part of Google Summer of Code and Jason and I are working on adding GRO to WireGuard, on the udp_tunnel side of things. The goal is to inform udp_tunnel’s gro_receive that certain packets are part of the same flow. Then sometime later, we’d

[PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media

2018-07-25 Thread YueHaibing
when tipc_own_id failed to obtain node identity,dev_put should be call before return -EINVAL. Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links") Signed-off-by: YueHaibing --- net/tipc/bearer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tipc/bearer.c

Re: [PATCH net-next v3 5/5] act_mirred: use TC_ACT_REINJECT when possible

2018-07-25 Thread Paolo Abeni
On Tue, 2018-07-24 at 14:15 -0700, Cong Wang wrote: > On Tue, Jul 24, 2018 at 1:07 PM Paolo Abeni wrote: > > + > > + /* let's the caller reinject the packet, if possible */ > > + if (skb_at_tc_ingress(skb)) { > > + res->ingress = want_ingress; > >

Re: [PATCH net-next] bnxt_en: Fix logic of forward the VF MAC address to PF in bnxt_vf_validate_set_mac

2018-07-25 Thread YueHaibing
On 2018/7/25 5:48, Michael Chan wrote: > On Tue, Jul 24, 2018 at 9:01 AM, Vasundhara Volam > wrote: >> On Tue, Jul 24, 2018 at 1:01 PM, Michael Chan >> wrote: >>> >>> On Mon, Jul 23, 2018 at 10:24 PM, YueHaibing wrote: Based on the comments,req->l2addr must match the VF MAC address

Re: [PATCH bpf-next] bpf: add End.DT6 action to bpf_lwt_seg6_action helper

2018-07-25 Thread Mathieu Xhonneux
Indeed, I missed this one. Thanks, sending a v2. 2018-07-25 5:40 GMT+00:00 Daniel Borkmann : > On 07/24/2018 07:14 PM, Martin KaFai Lau wrote: >> On Tue, Jul 24, 2018 at 04:59:54PM +, Mathieu Xhonneux wrote: >>> The seg6local LWT provides the End.DT6 action, which allows to >>> decapsulate an

[PATCH bpf-next v2] bpf: add End.DT6 action to bpf_lwt_seg6_action helper

2018-07-25 Thread Mathieu Xhonneux
The seg6local LWT provides the End.DT6 action, which allows to decapsulate an outer IPv6 header containing a Segment Routing Header (SRH), full specification is available here: https://tools.ietf.org/html/draft-filsfils-spring-srv6-network-programming-05 This patch adds this action now to the

Re: [PATCH] 9p: validate PDU length

2018-07-25 Thread Tomas Bortoli
On 07/25/2018 06:11 AM, Dominique Martinet wrote: > Tomas Bortoli wrote on Mon, Jul 23, 2018: >> diff --git a/net/9p/client.c b/net/9p/client.c >> index 18c5271910dc..92240ccf476b 100644 >> --- a/net/9p/client.c >> +++ b/net/9p/client.c >> @@ -524,6 +525,12 @@ static int p9_check_errors(struct

Re: UDP GRO without Merging

2018-07-25 Thread Steffen Klassert
On Wed, Jul 25, 2018 at 11:53:45AM +0200, Gauvain Roussel-Tarbouriech wrote: > Subject: > > Hello Netdev, > > I am working on WireGuard as part of Google Summer of Code and Jason and > I are working on adding GRO to WireGuard, on the udp_tunnel side of > things. The goal is to inform

[PATCH net-next] bnxt_en: combine 'else if' and 'else' into single branche

2018-07-25 Thread YueHaibing
The else-if branch and else branch set mac_ok to true similarly, so combine the two into single else branch. Aslo add comments to explain the two conditions, which from Michael Chan and Vasundhara Volam. Signed-off-by: YueHaibing --- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 8 ++--

[net-next v1] net/ipv6: allow any source address for sendmsg pktinfo with ip_nonlocal_bind

2018-07-25 Thread Vincent Bernat
When freebind feature is set of an IPv6 socket, any source address can be used when sending UDP datagrams using IPv6 PKTINFO ancillary message. Global non-local bind feature was added in commit 35a256fee52c ("ipv6: Nonlocal bind") for IPv6. This commit also allows IPv6 source address spoofing when

Re: [PATCH v6 10/18] x86/power/64: Remove VLA usage

2018-07-25 Thread Rafael J. Wysocki
On Tue, Jul 24, 2018 at 6:49 PM, Kees Cook wrote: > In the quest to remove all stack VLA usage from the kernel[1], this > removes the discouraged use of AHASH_REQUEST_ON_STACK by switching to > shash directly and allocating the descriptor in heap memory (which should > be fine: the tfm has

Re: [PATCH net-next v3 5/5] act_mirred: use TC_ACT_REINJECT when possible

2018-07-25 Thread Jamal Hadi Salim
On 24/07/18 05:15 PM, Cong Wang wrote: On Tue, Jul 24, 2018 at 1:07 PM Paolo Abeni wrote: + + /* let's the caller reinject the packet, if possible */ + if (skb_at_tc_ingress(skb)) { + res->ingress = want_ingress; +

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

2018-07-25 Thread Jamal Hadi Salim
On 24/07/18 04:06 PM, Paolo Abeni wrote: --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -895,6 +895,11 @@ struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp, } } + if (a->tcfa_action == TC_ACT_REDIRECT) { +

Re: [PATCH net-next v3 0/5] TC: refactor act_mirred packets re-injection

2018-07-25 Thread Jiri Pirko
Tue, Jul 24, 2018 at 10:06:38PM CEST, pab...@redhat.com wrote: >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 3 patches

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

2018-07-25 Thread Jiri Pirko
Tue, Jul 24, 2018 at 10:06:39PM CEST, pab...@redhat.com wrote: >Only cls_bpf and act_bpf can safely use such value. If a generic >action is configured by user space to return TC_ACT_REDIRECT, >the usually visible behavior is passing the skb up the stack - as >for unknown action, but, with complex

Re: [PATCH net-next v3 3/5] tc/act: remove unneeded RCU lock in action callback

2018-07-25 Thread Jamal Hadi Salim
On 24/07/18 04:06 PM, Paolo Abeni wrote: Each lockless action currently does its own RCU locking in ->act(). This is 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 _bh variant, cleans up a bit the

Re: [PATCH net-next v6 1/4] net: vhost: lock the vqs one by one

2018-07-25 Thread Tonghao Zhang
On Sun, Jul 22, 2018 at 11:26 PM Michael S. Tsirkin wrote: > > On Sat, Jul 21, 2018 at 11:03:59AM -0700, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > This patch changes the way that lock all vqs > > at the same, to lock them one by one. It will > > be used for next patch to

Re: [PATCH net-next v3 0/5] TC: refactor act_mirred packets re-injection

2018-07-25 Thread Paolo Abeni
Hi, On Wed, 2018-07-25 at 13:53 +0200, Jiri Pirko wrote: > Could you please send the userspace iproute2 patch and list some > examples of usage along with the next patchset version? There are no iproute2 patches, as TC_ACT_REINJECT is not accessible from user-space: act_mirred will use such

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

2018-07-25 Thread Jamal Hadi Salim
+Cc Shmulik Paolo - please also run the tdc tests (and add anymore if you feel they dont do coverage to your changes) On 24/07/18 04:06 PM, 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

Re: [PATCH net-next v3 0/5] TC: refactor act_mirred packets re-injection

2018-07-25 Thread Jiri Pirko
Wed, Jul 25, 2018 at 02:07:15PM CEST, pab...@redhat.com wrote: >Hi, > >On Wed, 2018-07-25 at 13:53 +0200, Jiri Pirko wrote: >> Could you please send the userspace iproute2 patch and list some >> examples of usage along with the next patchset version? > >There are no iproute2 patches, as

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

2018-07-25 Thread Jamal Hadi Salim
On 25/07/18 04:29 AM, Paolo Abeni wrote: On Tue, 2018-07-24 at 13:50 -0700, Cong Wang wrote: [..] I fail to understand why overlimit is increased in your case here. I guess you want to increase 'drops' instead. Hmm, actually the current mirred code increases overlimit too. But I still don't

Re: [PATCH net-next v3 2/5] net/sched: user-space can't set unknown tcfa_action values

2018-07-25 Thread Jiri Pirko
Tue, Jul 24, 2018 at 10:06:40PM CEST, pab...@redhat.com wrote: >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

  1   2   3   >