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

2018-07-24 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 succ

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

2018-07-24 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

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

2018-07-24 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 b/too

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

2018-07-24 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 b/too

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

2018-07-24 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 explain

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

2018-07-24 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 introduc

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

2018-07-24 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 ca

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

2018-07-24 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 net-next 14/17] mlxsw: spectrum_acl: Add A-TCAM region initialization

2018-07-24 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 --- .../mellanox/ml

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

2018-07-24 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-24 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 T

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

2018-07-24 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 --- .../net/ethe

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

2018-07-24 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 a/drivers/net/ethernet/mellanox/mlx

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

2018-07-24 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 the

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

2018-07-24 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 b/drivers/ne

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

2018-07-24 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 b/dri

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

2018-07-24 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-24 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 on

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

2018-07-24 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 Review

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

2018-07-24 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-24 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 differe

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

2018-07-24 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 --- drivers/net/ethernet/

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

2018-07-24 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 zerocopy_from_i

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

2018-07-24 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(-)

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

2018-07-24 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 a/drivers/net/wireless

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

2018-07-24 Thread Wei Yongjun
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 --- net/ipv4/tcp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/

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

2018-07-24 Thread Wei Yongjun
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 --- net/ipv4/igmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 5

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

2018-07-24 Thread Julian Anastasov
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, then if the dest is unavailable > (i.e. IP_VS_DEST_F_AVAILABLE), t

Re: [PATCH v2] bpf: Add Python 3 support to selftests scripts for bpf

2018-07-24 Thread Daniel Borkmann
On 07/24/2018 09:53 PM, Jeremy Cline wrote: > Adjust tcp_client.py and tcp_server.py to work with Python 3 by using > the print function, marking string literals as bytes, and using the > newer exception syntax. This should be functionally equivalent and > supports Python 3+. > > Signed-off-by: Je

Re: [PATCH bpf-next] samples/bpf: xdpsock: order memory on AArch64

2018-07-24 Thread Daniel Borkmann
On 07/24/2018 03:33 PM, Brian Brooks wrote: > Signed-off-by: Brian Brooks Please respin with proper commit message instead of empty one. Thanks, Daniel

RE: [net-next v6 1/2] net/tls: Use socket data_ready callback on record availability

2018-07-24 Thread Vakul Garg
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, July 25, 2018 1:43 AM > To: Vakul Garg > Cc: netdev@vger.kernel.org; bor...@mellanox.com; > avia...@mellanox.com; davejwat...@fb.com > Subject: Re: [net-next v6 1/2] net/tls: Use socket data_ready

答复: [PATCH][v2] netfilter: use kvzalloc to allocate memory for hashtable

2018-07-24 Thread Li,Rongqing
> -邮件原件- > 发件人: Eric Dumazet [mailto:eric.duma...@gmail.com] > 发送时间: 2018年7月25日 13:45 > 收件人: Li,Rongqing ; netdev@vger.kernel.org; > pa...@netfilter.org; kad...@blackhole.kfki.hu; f...@strlen.de; netfilter- > de...@vger.kernel.org; coret...@netfilter.org; eduma...@google.com > 主题: Re: [PA

Re: [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR

2018-07-24 Thread Daniel Borkmann
On 07/24/2018 04:55 AM, YueHaibing wrote: > Fix inconsistent IS_ERR and PTR_ERR in get_btf, > the proper pointer to be passed as argument is '*btf' > > This issue was detected with the help of Coccinelle. > > Fixes: 2d3feca8c44f ("bpf: btf: print map dump and lookup with btf info") > Signed-off-b

Re: [PATCH][v2] netfilter: use kvzalloc to allocate memory for hashtable

2018-07-24 Thread Eric Dumazet
On 07/24/2018 10:34 PM, Li RongQing wrote: > 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 memo

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

2018-07-24 Thread 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 outer IPv6 header containing a Segment Routing Header >> (SRH), full specification is available her

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

2018-07-24 Thread Leon Romanovsky
On Tue, Jul 24, 2018 at 02:13:00PM -0600, Jason Gunthorpe wrote: > On Tue, Jul 24, 2018 at 08:56:09AM +0300, Leon Romanovsky wrote: > > On Mon, Jul 23, 2018 at 08:42:36PM -0600, Jason Gunthorpe wrote: > > > On Mon, Jul 23, 2018 at 03:25:04PM +0300, Leon Romanovsky wrote: > > > > From: Leon Romanovs

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

2018-07-24 Thread Daniel Borkmann
On 07/24/2018 05:10 PM, Thomas Richter wrote: > commit a5b8bd47dcc57 ("bpf tools: Collect eBPF programs from their own > sections") > > cause 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.

[PATCH][v2] netfilter: use kvzalloc to allocate memory for hashtable

2018-07-24 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

答复: 答复: [PATCH] netfilter: avoid stalls in nf_ct_alloc_hashtable

2018-07-24 Thread Li,Rongqing
> > On 07/24/2018 02:50 AM, Li,Rongqing wrote: > > > Thanks, Your patch fixes my issue; > > > > My patch may be able to reduce stall when modprobe nf module in > memory > > stress, Do you think this patch has any value? > > Only if you make it use kvzalloc()/kvfree() > > Thanks. I will send v

Re: selftests/bpf test_sockmap failure

2018-07-24 Thread Yonghong Song
On 7/24/18 5:49 PM, Prashant Bhole wrote: On 7/25/2018 8:02 AM, Yonghong Song wrote: On 7/24/18 3:40 PM, John Fastabend wrote: On 07/24/2018 08:45 AM, Yonghong Song wrote: In one of our production machines, tools/testing/selftests/bpf test_sockmap failed randomly like below: ... [TEST

Re: [PATCH v3 bpf 0/3] Introduce BPF_ANNOTATE_KV_PAIR

2018-07-24 Thread Daniel Borkmann
On 07/24/2018 05:40 PM, Martin KaFai Lau wrote: > The series allows the BPF loader to figure out > the btf_key_id and btf_value_id from a map's name > by using BPF_ANNOTATE_KV_PAIR. It also removes > the old 'typedef' way which requires two separate > typedefs (one for the key and one for the valu

Re: [PATCH 2/5] rhashtable: don't hold lock on first table throughout insertion.

2018-07-24 Thread NeilBrown
On Tue, Jul 24 2018, Paul E. McKenney wrote: > On Tue, Jul 24, 2018 at 07:52:03AM +1000, NeilBrown wrote: >> On Mon, Jul 23 2018, Paul E. McKenney wrote: >> >> > On Mon, Jul 23, 2018 at 09:13:43AM +1000, NeilBrown wrote: >> >> On Sun, Jul 22 2018, Paul E. McKenney wrote: >> >> > >> >> > One issue

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

2018-07-24 Thread Toshiaki Makita
On 2018/07/25 4:10, Jakub Kicinski wrote: > On Tue, 24 Jul 2018 18:39:09 +0900, Toshiaki Makita wrote: >> On 2018/07/24 10:56, Toshiaki Makita wrote: >>> On 2018/07/24 9:27, Jakub Kicinski wrote: On Mon, 23 Jul 2018 00:13:03 +0900, Toshiaki Makita wrote: > From: Toshiaki Makita >

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

2018-07-24 Thread Jianbo Liu
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 net/sched/cls_flower.c:1356:36: got restricted __be16 [usertype] vlan_tpid Si

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

2018-07-24 Thread Neal Cardwell
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 tail latencies started after commit > 3759824da87b30ce7a35b4873b62b0

Re: [PATCH net-next] net/tls: Do not call msg_data_left() twice

2018-07-24 Thread Vakul Garg
From: Al Viro Sent: Wednesday, 25 July, 7:19 AM Subject: Re: [PATCH net-next] net/tls: Do not call msg_data_left() twice To: Vakul Garg Cc: netdev@vger.kernel.org, bor...@mellanox.com, avia...@mellanox.com, davejwat...@fb.com, da...@davemloft.net On Tue, Jul 24, 2018 at 04:41:18PM +0530, Vaku

Re: [PATCH net-next] net/tls: Do not call msg_data_left() twice

2018-07-24 Thread Al Viro
On Tue, Jul 24, 2018 at 04:41:18PM +0530, Vakul Garg wrote: > In function tls_sw_sendmsg(), msg_data_left() needs to be called only > once. The second invocation of msg_data_left() for assigning variable > try_to_copy can be removed and merged with the first one. You do realize that msg_data_left(

Re: selftests/bpf test_sockmap failure

2018-07-24 Thread Prashant Bhole
On 7/25/2018 8:02 AM, Yonghong Song wrote: On 7/24/18 3:40 PM, John Fastabend wrote: On 07/24/2018 08:45 AM, Yonghong Song wrote: In one of our production machines, tools/testing/selftests/bpf test_sockmap failed randomly like below: ... [TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx

Re: [net-next V2 12/12] net/mlx5e: Use PARTIAL_GSO for UDP segmentation

2018-07-24 Thread Saeed Mahameed
On Tue, Jul 24, 2018 at 7:53 AM, Alexander Duyck wrote: > On Mon, Jul 23, 2018 at 3:11 PM, Saeed Mahameed wrote: >> From: Boris Pismenny >> >> This patch removes the splitting of UDP_GSO_L4 packets in the driver, >> and exposes UDP_GSO_L4 as a PARTIAL_GSO feature. Thus, the network stack >> is n

Re: [PATCH bpf] bpf: Use option "help" in the llvm-objcopy test

2018-07-24 Thread Yonghong Song
On 7/20/18 1:37 AM, Daniel Borkmann wrote: On 07/20/2018 07:34 AM, Martin KaFai Lau wrote: I noticed the "--version" option of the llvm-objcopy command has recently disappeared from the master llvm branch. It is currently used as a BTF support test in tools/testing/selftests/bpf/Makefile. T

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Jon Olson
On Tue, Jul 24, 2018 at 3:46 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > > > >From the above linke

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 6:46 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > > > >From the above linke

Re: [PATCH net v2] ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull

2018-07-24 Thread David Miller
From: Willem de Bruijn Date: Mon, 23 Jul 2018 19:36:48 -0400 > From: Willem de Bruijn > > Syzbot reported a read beyond the end of the skb head when returning > IPV6_ORIGDSTADDR: ... > This logic and its ipv4 counterpart read the destination port from > the packet at skb_transport_offset(skb)

Re: [PATCH] Make Surface Dock 3 work again

2018-07-24 Thread David Miller
From: Mathias Radtke Date: Tue, 24 Jul 2018 12:08:45 +0200 > 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 blacklist. Therefore the c

Re: [PATCH net 1/1] bnx2x: Fix invalid memory access in rss hash config path.

2018-07-24 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Tue, 24 Jul 2018 02:43:52 -0700 > Rx hash/filter table configuration uses rss_conf_obj to configure filters > in the hardware. This object is initialized only when the interface is > brought up. > This patch adds driver changes to configure rss params only when

Re: [PATCH net] net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper

2018-07-24 Thread David Miller
From: Tariq Toukan Date: Tue, 24 Jul 2018 14:27:55 +0300 > From: Jack Morgenstein > > Function mlx4_RST2INIT_QP_wrapper saved the qp number passed in the qp > context, rather than the one passed in the input modifier. > > However, the qp number in the qp context is not defined as a > required

Re: [RFC iproute2-next v1 5/5] tc: Add support for configuring the taprio scheduler

2018-07-24 Thread Vinicius Costa Gomes
Hi, Vinicius Costa Gomes writes: > Hi, > > Stephen Hemminger writes: > [...] >> >> Why not just use batch mode? Introducing another input mode in tc that is >> only in one qdisc seems like a bad idea. > > Seems that I have missed batch mode. I am going to play with it a little > and see how t

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

2018-07-24 Thread Cong Wang
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 successfully added, take a > > reference > > +* to the chain. T

Re: selftests/bpf test_sockmap failure

2018-07-24 Thread Yonghong Song
On 7/24/18 3:40 PM, John Fastabend wrote: On 07/24/2018 08:45 AM, Yonghong Song wrote: In one of our production machines, tools/testing/selftests/bpf test_sockmap failed randomly like below: ... [TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx thread exited with err 1. FAILED ... ... [TES

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Tue, Jul 24, 2018 at 06:31:54PM -0400, Willem de Bruijn wrote: > On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > > >From the above linked patch, I understand that there are yet > > > other special cases in p

Re: selftests/bpf test_sockmap failure

2018-07-24 Thread John Fastabend
On 07/24/2018 08:45 AM, Yonghong Song wrote: > In one of our production machines, tools/testing/selftests/bpf > test_sockmap failed randomly like below: > > ... > [TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx thread exited with > err 1. FAILED > ... > > ... > [TEST 80]: (2, 1024, 256, sendms

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 6:23 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > > >From the above linked patch, I understand that there are yet > > other special cases in production, such as a hard cap on #tx queues to > > 32 regardless of number o

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

2018-07-24 Thread Cong Wang
On Mon, Jul 23, 2018 at 12:25 AM Jiri Pirko wrote: > + switch (n->nlmsg_type) { > + case RTM_NEWCHAIN: > + /* In case the chain was successfully added, take a reference > +* to the chain. This ensures that an empty chain > +* does not disap

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Tue, Jul 24, 2018 at 04:52:53PM -0400, Willem de Bruijn wrote: > >From the above linked patch, I understand that there are yet > other special cases in production, such as a hard cap on #tx queues to > 32 regardless of number of vcpus. I don't think upstream kernels have this limit - we can now

Re: [PATCH v5 net-next] net/sched: add skbprio scheduler

2018-07-24 Thread David Miller
From: Nishanth Devarajan Date: Mon, 23 Jul 2018 19:37:41 +0530 > net/sched: add skbprio scheduler Applied to net-next, thank you.

Re: [PATCH v2 net-next] net: phy: add GBit master / slave error detection

2018-07-24 Thread David Miller
From: Heiner Kallweit Date: Sat, 21 Jul 2018 15:48:47 +0200 > Certain PHY's have issues when operating in GBit slave mode and can > be forced to master mode. Examples are RTL8211C, also the Micrel PHY > driver has a DT setting to force master mode. > If two such chips are link partners the autone

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

2018-07-24 Thread David Miller
From: David Miller Date: Tue, 24 Jul 2018 14:38:02 -0700 (PDT) > From: Doron Roberts-Kedes > Date: Fri, 20 Jul 2018 11:19:00 -0700 > >> 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

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

2018-07-24 Thread David Miller
From: Doron Roberts-Kedes Date: Fri, 20 Jul 2018 11:19:00 -0700 > 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://

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

2018-07-24 Thread Cong Wang
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; > + res->qstats = this_cpu_ptr(m->common.cpu

Re: [PATCH net] r8169: restore previous behavior to accept BIOS WoL settings

2018-07-24 Thread David Miller
From: Heiner Kallweit Date: Tue, 24 Jul 2018 22:21:04 +0200 > Commit 7edf6d314cd0 tried to resolve an inconsistency (BIOS WoL > settings are accepted, but device isn't wakeup-enabled) resulting > from a previous broken-BIOS workaround by making disabled WoL the > default. > This however had some

your photos

2018-07-24 Thread Roland
I would like to speak with the person that managing photos for your company? We provide image editing like – photos cutting out and retouching. Enhancing your images is just a part of what we can do for your business. Whether you’re an ecommerce store or portrait photographer, real estate profes

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Willem de Bruijn
On Tue, Jul 24, 2018 at 2:39 PM Michael S. Tsirkin wrote: > > On Tue, Jul 24, 2018 at 10:01:39AM -0400, Willem de Bruijn wrote: > > On Tue, Jul 24, 2018 at 6:44 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Jul 23, 2018 at 04:11:19PM -0700, Caleb Raitto wrote: > > > > From: Caleb Raitto > > >

Re: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-24 Thread Steve Wise
On 7/24/2018 10:24 AM, Steve Wise wrote: > > On 7/19/2018 8:25 PM, Max Gurtovoy wrote: > [ 2032.194376] nvme nvme0: failed to connect queue: 9 ret=-18 queue 9 is not mapped (overlap). please try the bellow: >>> This seems to work.  Here are three mapping cases:  each vector on

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

2018-07-24 Thread Cong Wang
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 gnet_stats_queue *stats = res->qstats; > > + int ret; > > + > > +

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

2018-07-24 Thread Cong Wang
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 gnet_stats_queue *stats = res->qstats; > + int ret; > + > + if (res->ingress) > + ret = netif_receive_skb(skb); >

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

2018-07-24 Thread Jason Gunthorpe
On Tue, Jul 24, 2018 at 02:13:00PM -0600, Jason Gunthorpe wrote: > diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h > b/drivers/infiniband/hw/mlx5/mlx5_ib.h > index 5f08b69f8a4f60..ec8410d3c4eb2a 100644 > +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h > @@ -1232,11 +1232,9 @@ int mlx5_ib_devx_create

[PATCH net] r8169: restore previous behavior to accept BIOS WoL settings

2018-07-24 Thread Heiner Kallweit
Commit 7edf6d314cd0 tried to resolve an inconsistency (BIOS WoL settings are accepted, but device isn't wakeup-enabled) resulting from a previous broken-BIOS workaround by making disabled WoL the default. This however had some side effects, most likely due to a broken BIOS some systems don't proper

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

2018-07-24 Thread Doron Roberts-Kedes
On Tue, Jul 24, 2018 at 05:13:26AM +, Vakul Garg wrote: > > > -Original Message- > > From: Doron Roberts-Kedes [mailto:doro...@fb.com] > > Sent: Tuesday, July 24, 2018 3:50 AM > > @@ -811,6 +809,7 @@ int tls_sw_recvmsg(struct sock *sk, > > likely(!(flags & MSG_P

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

2018-07-24 Thread Jason Gunthorpe
On Tue, Jul 24, 2018 at 08:56:09AM +0300, Leon Romanovsky wrote: > On Mon, Jul 23, 2018 at 08:42:36PM -0600, Jason Gunthorpe wrote: > > On Mon, Jul 23, 2018 at 03:25:04PM +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > Changelog: > > > v1->v2: > > > * Fix matcher to use the

Re: [net-next v6 1/2] net/tls: Use socket data_ready callback on record availability

2018-07-24 Thread David Miller
From: Vakul Garg Date: Tue, 24 Jul 2018 15:44:02 +0530 > On receipt of a complete tls record, use socket's saved data_ready > callback instead of state_change callback. > > Signed-off-by: Vakul Garg I don't think this is correct. Here, the stream parser has given us a complete TLS record. Bu

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

2018-07-24 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 th

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

2018-07-24 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 t

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

2018-07-24 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_REINJECT 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 pat

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

2018-07-24 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 3 patches introduce some cleanup and safeguards to allow extending tca_result

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

2018-07-24 Thread Paolo Abeni
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 configuration, more random results can be obtained. This patch forc

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

2018-07-24 Thread Paolo Abeni
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 surronding code and documents the RCU status in

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

2018-07-24 Thread Jakub Kicinski
On Tue, 24 Jul 2018 13:31:28 +0300, Eran Ben Elisha wrote: > On 7/19/2018 4:49 AM, Jakub Kicinski wrote: > > On Wed, 18 Jul 2018 18:01:01 -0700, Saeed Mahameed wrote: > >> +static const struct devlink_param mlx5_devlink_params[] = { > >> + DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_CONGESTION_AC

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

2018-07-24 Thread Jakub Kicinski
On Tue, 24 Jul 2018 18:39:09 +0900, Toshiaki Makita wrote: > On 2018/07/24 10:56, Toshiaki Makita wrote: > > On 2018/07/24 9:27, Jakub Kicinski wrote: > >> On Mon, 23 Jul 2018 00:13:03 +0900, Toshiaki Makita wrote: > >>> From: Toshiaki Makita > >>> > >>> All oversized packets including GSO pac

Re: [PATCH net-next] virtio_net: force_napi_tx module param.

2018-07-24 Thread Michael S. Tsirkin
On Tue, Jul 24, 2018 at 10:01:39AM -0400, Willem de Bruijn wrote: > On Tue, Jul 24, 2018 at 6:44 AM Michael S. Tsirkin wrote: > > > > On Mon, Jul 23, 2018 at 04:11:19PM -0700, Caleb Raitto wrote: > > > From: Caleb Raitto > > > > > > The driver disables tx napi if it's not certain that completions

Re: [PATCH net-next v2] net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc

2018-07-24 Thread David Miller
From: Tariq Toukan Date: Tue, 24 Jul 2018 13:53:00 +0300 > The cited patch added a call to dev_change_tx_queue_len in > SIOCSIFTXQLEN case. > This obsoletes the new len comparison check done before the function call. > Remove it here. > > For the desicion of keep/remove the negative value check,

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread David Ahern
On 7/24/18 11:55 AM, Xin Long wrote: > INFO: bc_forwarding disabled on r1 => > INFO: h1 -> net2: reply from r1 (not forwarding) > TEST: ping 198.51.100.255, expected reply from 192.0.2.1[PASS] > INFO: h1 -> net3: reply from r1 (not forwarding) > TEST: ping 198.51.200.255, expected reply

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread Xin Long
On Wed, Jul 25, 2018 at 1:37 AM, David Ahern wrote: > On 7/24/18 11:24 AM, Xin Long wrote: >> On Mon, Jul 23, 2018 at 11:17 PM, David Ahern wrote: >>> On 7/23/18 5:51 AM, Xin Long wrote: +ping_ipv4() +{ + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 + + bc_fo

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

2018-07-24 Thread Lawrence Brakmo
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 tail latencies started after commit 3759824da87b30ce7a35b4873b62b0ba38905ef5 in Jul 2015, which triggered the bugs/features we a

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread David Ahern
On 7/24/18 11:24 AM, Xin Long wrote: > On Mon, Jul 23, 2018 at 11:17 PM, David Ahern wrote: >> On 7/23/18 5:51 AM, Xin Long wrote: >>> +ping_ipv4() >>> +{ >>> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >>> + >>> + bc_forwarding_disable >>> + ping_test_from $h1 198.51.100.255 1

Re: [PATCH net-next 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-07-24 Thread Marcelo Ricardo Leitner
On Tue, Jul 24, 2018 at 06:35:35PM +0300, Konstantin Khorenko wrote: > Hi Marcelo, > > pity to abandon Oleg's attempt to avoid high order allocations and use > flex_array instead, so i tried to do the performance measurements with > options you kindly suggested. Nice, thanks! ... > As we can see

[iproute PATCH] lib/namespace: avoid double-mounting a /sys

2018-07-24 Thread Lubomir Rintel
This partly reverts 8f0807023d067e2bb585a2ae8da93e59689d10f1, bringing back the umount(/sys) attempt. In a LXC container we're unable to umount the sysfs instance, nor mount a read-write one. We still are able to create a new read-only instance. Nevertheless, it still makes sense to attempt the u

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

2018-07-24 Thread Eric Dumazet
On 07/24/2018 10:12 AM, Neal Cardwell wrote: > On Tue, Jul 24, 2018 at 1:07 PM Yuchung Cheng wrote: >> >> On Mon, Jul 23, 2018 at 7:23 PM, Daniel Borkmann >> wrote: >>> Should this go to net tree instead where all the other fixes went? >> I am neutral but this feels more like a feature improv

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread Xin Long
On Mon, Jul 23, 2018 at 11:17 PM, David Ahern wrote: > On 7/23/18 5:51 AM, Xin Long wrote: >> +ping_ipv4() >> +{ >> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >> + >> + bc_forwarding_disable >> + ping_test_from $h1 198.51.100.255 192.0.2.1 >> + ping_test_from $h1 198.51.20

Re: [PATCH net] net/ipv6: Fix linklocal to global address with VRF

2018-07-24 Thread David Ahern
On 7/21/18 8:32 PM, David Miller wrote: > > Applied and queued up for -stable. > >> Dave: I can look at the backports to stable if needed. > > Please do, that will help me a lot. > It applies cleanly to 4.17 and 4.14. I tested 4.14 it is fine. Since 4.18 and 4.14 work I have no reason to belie

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

2018-07-24 Thread Martin KaFai Lau
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 outer IPv6 header containing a Segment Routing Header > (SRH), full specification is available here: > > https://urldefense.proofpoint.com/v2/url?u=ht

  1   2   >