[PATCH 2/2] forcedeth: disable recv cache by default

2019-07-04 Thread Zhu Yanjun
The recv cache is to allocate 125MiB memory to reserve for NIC. In the past time, this recv cache works very well. When the memory is not enough, this recv cache reserves memory for NIC. And the communications through this NIC is not affected by the memory shortage. And the performance of NIC is be

[PATCH 1/2] forcedeth: add recv cache make nic work steadily

2019-07-04 Thread Zhu Yanjun
A recv cache is added. The size of recv cache is 1000Mb / skb_length. When the system memory is not enough, this recv cache can make nic work steadily. When nic is up, this recv cache and work queue are created. When nic is down, this recv cache will be destroyed and delayed workqueue is canceled.

[PATCH 0/2] forcedeth: recv cache support

2019-07-04 Thread Zhu Yanjun
This recv cache is to make NIC work steadily when the system memory is not enough. >From long time testing, the NIC worked very well when the system memory is not enough. And the NIC performance is better from about 920M to about 940M. Some simple tests are made: ip link set forcedeth_nic down/u

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-04 Thread Y Song
On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet wrote: > > Add a new "bpftool prog run" subcommand to run a loaded program on input > data (and possibly with input context) passed by the user. > > Print output data (and output context if relevant) into a file or into > the console. Print return valu

[PATCH] net: bpfilter: print umh messages to /dev/kmsg

2019-07-04 Thread Gary Lin
bpfilter_umh currently printed all messages to /dev/console and this might interfere the user activity(*). This commit changes the output device to /dev/kmsg so that the messages from bpfilter_umh won't show on the console directly. (*) https://bugzilla.suse.com/show_bug.cgi?id=1140221 Signed-of

[PATCH net-next] gve: Fix error return code in gve_alloc_qpls()

2019-07-04 Thread Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/google/gve/gve_main.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 14/15 net-next,v2] net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*

2019-07-04 Thread Pablo Neira Ayuso
Not tc specific anymore, rename this. Suggested-by: Jiri Pirko Signed-off-by: Pablo Neira Ayuso --- v2: Actually a new patch (no previous v1), requested by Jiri. drivers/net/ethernet/mellanox/mlx5/core/en_rep.c| 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- drivers/ne

[PATCH 12/15 net-next,v2] net: flow_offload: make flow block callback list per-driver

2019-07-04 Thread Pablo Neira Ayuso
Remove the global flow_block_cb_list, replace it by per-driver list of flow block objects. This will make it easier later on to support for policy hardware offload of multiple subsystems. Suggested-by: Jiri Pirko Signed-off-by: Pablo Neira Ayuso --- v2: new patch, no previous v1. Introduce p

[PATCH 10/15 net-next,v2] net: flow_offload: add flow_block_cb API

2019-07-04 Thread Pablo Neira Ayuso
This patch renames: * struct tcf_block_cb to flow_block_cb. * struct tc_block_offload to flow_block_offload. And it exposes the flow_block_cb API through net/flow_offload.h. This renames the existing codebase to adapt it to this name. This patch also adds flow_block_cb_splice(). Signed-off-by:

[PATCH 15/15 net-next,v2] netfilter: nf_tables: add hardware offload support

2019-07-04 Thread Pablo Neira Ayuso
This patch adds hardware offload support for nftables through the existing netdev_ops->ndo_setup_tc() interface, the TC_SETUP_CLSFLOWER classifier and the flow rule API. This hardware offload support is available for the NFPROTO_NETDEV family and the ingress hook. Each nftables expression has a ne

[PATCH 07/15 net-next,v2] net: use tcf_block_setup() infrastructure

2019-07-04 Thread Pablo Neira Ayuso
This allows us to register / unregister tcf_block_cb objects from the core. The idea is to allocate and to set up the tcf_block_cb objects from the driver, attach them to the tc_block_offload->cb_list, then the core iterates over this block list to registers them. Signed-off-by: Pablo Neira Ayuso

[PATCH 08/15 net-next,v2] net: cls_api: do not expose tcf_block to drivers

2019-07-04 Thread Pablo Neira Ayuso
Expose the block_shared flag which is what drivers. Signed-off-by: Pablo Neira Ayuso --- v2: fix incorrect correction of block_shared in net/sched/cls_api.c drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 2 +- include/net/pkt_cl

[PATCH 09/15 net-next,v2] net: sched: remove tcf_block_cb_{register,unregister}()

2019-07-04 Thread Pablo Neira Ayuso
Now replaced by the tcf_block_setup() core registration, remove this. Signed-off-by: Pablo Neira Ayuso --- v2: no changes. include/net/pkt_cls.h | 41 +-- net/sched/cls_api.c | 59 --- 2 files changed, 1 insertion

[PATCH 06/15 net-next,v2] net: sched: add tcf_setup_block_offload()

2019-07-04 Thread Pablo Neira Ayuso
Most drivers do the same thing to set up the block, add a helper function to do this. Signed-off-by: Pablo Neira Ayuso --- v2: no changes. drivers/net/ethernet/broadcom/bnxt/bnxt.c | 26 - drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 28 -- drivers

[PATCH 13/15 net-next,v2] net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND

2019-07-04 Thread Pablo Neira Ayuso
Not tc specific anymore, rename this. Suggested-by: Jiri Pirko Signed-off-by: Pablo Neira Ayuso --- v2: Actually a new patch (no previous v1), requested by Jiri. drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- drivers/

[PATCH 11/15 net-next,v2] net: flow_offload: don't allow subsystem to reuse blocks

2019-07-04 Thread Pablo Neira Ayuso
Drivers need to be updated to support this, return EBUSY by now. Signed-off-by: Pablo Neira Ayuso --- v2: no changes. net/core/flow_offload.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c index 0b8d088d822e..8c20f4740800 100644 --- a

[PATCH 04/15 net-next,v2] net: sched: add tcf_block_setup()

2019-07-04 Thread Pablo Neira Ayuso
This new function allows us to handle tcf_block_cb registrations / unregistrations from the core, in order to remove a dependency with the tcf_block object and the .reoffload cls_api callback. The tcf_block_cb_add() call places the tcf_block_cb object, which has been set up by the driver, in the t

[PATCH 02/15 net-next,v2] net: sched: add tcf_block_cb_alloc()

2019-07-04 Thread Pablo Neira Ayuso
Add a new helper function to allocate tcf_block_cb objects. Signed-off-by: Pablo Neira Ayuso --- v2: return -EOPNOTSUPP if sched/cls_api is disabled, per Marcelo Ricardo Leitner . include/net/pkt_cls.h | 8 net/sched/cls_api.c | 27 +-- 2 files changed, 29 i

[PATCH 05/15 net-next,v2] net: sched: add release callback to struct tcf_block_cb

2019-07-04 Thread Pablo Neira Ayuso
Call it on tcf_block_cb object to release the driver private block area. Signed-off-by: Pablo Neira Ayuso --- v2: no changes. include/net/pkt_cls.h | 6 -- net/sched/cls_api.c | 10 -- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/net/pkt_cls.h b/include

[PATCH 00/15 net-next,v2] netfilter: add hardware offload infrastructure

2019-07-04 Thread Pablo Neira Ayuso
Hi, This patchset adds support for Netfilter hardware offloads. This patchset reuses the existing block infrastructure, the netdev_ops->ndo_setup_tc() interface, TC_SETUP_CLSFLOWER classifier and the flow rule API. Patch #1 moves tcf_block_cb code before the indirect block infrastructur

[PATCH 03/15 net-next,v2] net: sched: add tcf_block_cb_free()

2019-07-04 Thread Pablo Neira Ayuso
Just a stub to release tcf_block_cb objects, follow up patch extends it to have a release callback in it for the private data. Signed-off-by: Pablo Neira Ayuso --- v2: no changes. include/net/pkt_cls.h | 5 + net/sched/cls_api.c | 6 ++ 2 files changed, 11 insertions(+) diff --git a/

[PATCH 01/15 net-next,v2] net: sched: move tcf_block_cb before indr_block

2019-07-04 Thread Pablo Neira Ayuso
The indr_block infrastructure will depend on the tcf_block_cb object, move this code on top to avoid forward declarations. Signed-off-by: Pablo Neira Ayuso --- v2: no changes. net/sched/cls_api.c | 484 ++-- 1 file changed, 242 insertions(+), 242

Re: bug: tpacket_snd can cause data corruption

2019-07-04 Thread Willem de Bruijn
> > Can you reproduce the issue when running the modified test in a > > network namespace (./in_netns.sh ./txring_overwrite)? > But even when running the test with ./in_netns.sh it shows > "wrong pattern", this time without length mismatches: > > wrong pattern: 0x62 != 0x61 > wrong pattern: 0x62 !

Re: [PATCH net-next v2 4/4] qed*: Add devlink support for configuration attributes.

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 06:20:11 -0700, Sudarsana Reddy Kalluru wrote: > This patch adds implementation for devlink callbacks for reading and > configuring the device attributes. > > Signed-off-by: Sudarsana Reddy Kalluru > Signed-off-by: Ariel Elior > --- > Documentation/networking/devlink-params-q

NEIGH: BUG, double timer add, state is 8

2019-07-04 Thread Marek Majkowski
Morning, I found a way to hit an obscure BUG in the net/core/neighbour.c:neigh_add_timer(), by piping two carefully crafted messages into AF_NETLINK socket. https://github.com/torvalds/linux/blob/v5.2-rc7/net/core/neighbour.c#L259 if (unlikely(mod_timer(&n->timer, when))) { printk("N

Re: [PATCH net-next v3 1/4] net/sched: Introduce action ct

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 14:53:50 +0300, Paul Blakey wrote: > +static const struct nla_policy ct_policy[TCA_CT_MAX + 1] = { > + [TCA_CT_ACTION] = { .type = NLA_U16 }, Please use strict checking in all new policies. attr 0 must have .strict_start_type set.

[PATCH net 0/2] net/tls: fix poll() wake up

2019-07-04 Thread Jakub Kicinski
Hi! This small fix + selftest series is very similar to the previous commit 04b25a5411f9 ("net/tls: fix no wakeup on partial reads"). This time instead of recvmsg we're fixing poll wake up. Jakub Kicinski (2): net/tls: fix poll ignoring partially copied records selftests/tls: add test for pol

[PATCH net 1/2] net/tls: fix poll ignoring partially copied records

2019-07-04 Thread Jakub Kicinski
David reports that RPC applications which use epoll() occasionally get stuck, and that TLS ULP causes the kernel to not wake applications, even though read() will return data. This is indeed true. The ctx->rx_list which holds partially copied records is not consulted when deciding whether socket i

[PATCH net 2/2] selftests/tls: add test for poll() with data in TLS ULP

2019-07-04 Thread Jakub Kicinski
Add a test which checks if leftover record data in TLS layer correctly wakes up poll(). Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- tools/testing/selftests/net/tls.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tools/testing/selftests/net

Re: [net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 18:16:15 +, Saeed Mahameed wrote: > +struct sk_buff *mlx5e_ktls_handle_tx_skb(struct net_device *netdev, > + struct mlx5e_txqsq *sq, > + struct sk_buff *skb, > + str

[RFC bpf-next 4/8] bpf: migrate convert_ctx_accesses to list patching infra

2019-07-04 Thread Jiong Wang
This patch migrate convert_ctx_accesses to new list patching infrastructure. pre-patch is used for generating prologue, because what we really want to do is insert the prog before prog start without touching the first insn. Signed-off-by: Jiong Wang --- kernel/bpf/verifier.c | 98 +++

[RFC bpf-next 5/8] bpf: migrate fixup_bpf_calls to list patching infra

2019-07-04 Thread Jiong Wang
This patch migrate fixup_bpf_calls to new list patching infrastructure. Signed-off-by: Jiong Wang --- kernel/bpf/verifier.c | 94 +++ 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c inde

[RFC bpf-next 8/8] bpf: delete all those code around old insn patching infrastructure

2019-07-04 Thread Jiong Wang
This patch delete all code around old insn patching infrastructure. Signed-off-by: Jiong Wang --- include/linux/bpf_verifier.h | 1 - include/linux/filter.h | 4 - kernel/bpf/core.c| 169 - kernel/bpf/verifier.c| 221 +

[RFC bpf-next 6/8] bpf: migrate zero extension opt to list patching infra

2019-07-04 Thread Jiong Wang
This patch migrate 32-bit zero extension insertion to new list patching infrastructure. Signed-off-by: Jiong Wang --- kernel/bpf/verifier.c | 45 + 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verif

[RFC bpf-next 3/8] bpf: migrate jit blinding to list patching infra

2019-07-04 Thread Jiong Wang
List linerization function will figure out the new jump destination of patched/blinded jumps. No need of destination adjustment inside bpf_jit_blind_insn any more. Signed-off-by: Jiong Wang --- kernel/bpf/core.c | 76 ++- 1 file changed, 36 ins

[RFC bpf-next 2/8] bpf: extend list based insn patching infra to verification layer

2019-07-04 Thread Jiong Wang
Verification layer also needs to handle auxiliar info as well as adjusting subprog start. At this layer, insns inside patch buffer could be jump, but they should have been resolved, meaning they shouldn't jump to insn outside of the patch buffer. Lineration function for this layer won't touch insn

[RFC bpf-next 7/8] bpf: migrate insn remove to list patching infra

2019-07-04 Thread Jiong Wang
This patch migrate dead code remove pass to new list patching infrastructure. Signed-off-by: Jiong Wang --- kernel/bpf/verifier.c | 59 +-- 1 file changed, 19 insertions(+), 40 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.

[RFC bpf-next 0/8] bpf: accelerate insn patching speed

2019-07-04 Thread Jiong Wang
This is an RFC based on latest bpf-next about acclerating insn patching speed, it is now near the shape of final PATCH set, and we could see the changes migrating to list patching would brings, so send out for comments. Most of the info are in cover letter. I splitted the code in a way to show API

[RFC bpf-next 1/8] bpf: introducing list based insn patching infra to core layer

2019-07-04 Thread Jiong Wang
This patch introduces list based bpf insn patching infra to bpf core layer which is lower than verification layer. This layer has bpf insn sequence as the solo input, therefore the tasks to be finished during list linerization is: - copy insn - relocate jumps - relocation line info. Suggest

Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query

2019-07-04 Thread Saeed Mahameed
On Thu, Jul 4, 2019 at 4:50 PM David Miller wrote: > > From: Saeed Mahameed > Date: Wed, 3 Jul 2019 16:07:11 -0700 > > > Or just wait for my next pull request. > > Please resubmit this series once I pull your pull request in. > Done just submitted: "[pull request][net-next V2 0/2] Mellanox, mlx

[net-next V2 1/2] net/mlx5: Added fw version query command

2019-07-04 Thread Saeed Mahameed
From: Shay Agroskin Using the MCQI and MCQS registers, we query the running and pending fw version of the HCA. The MCQS is queried with sequentially increasing component index, until a component of type BOOT_IMG is found. Querying this component's version using the MCQI register yields the runnin

[pull request][net-next V2 0/2] Mellanox, mlx5 updates 2019-07-04

2019-07-04 Thread Saeed Mahameed
Hi Dave, This series adds the support for devlink fw query in mlx5 Please pull and let me know if there is any problem. Please note that the series starts with a merge of mlx5-next branch, to resolve and avoid dependency with rdma tree. This what was actually missing from my previous submission

[net-next V2 2/2] net/mlx5: Added devlink info callback

2019-07-04 Thread Saeed Mahameed
From: Shay Agroskin The callback is invoked using 'devlink dev info ' command and returns the running and pending firmware version of the HCA and the name of the kernel driver. If there is a pending firmware version (a new version is burned but the HCA still runs with the previous) it is returne

Re: [net-next 05/14] net/mlx5: Add crypto library to support create/destroy encryption key

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 18:15:55 +, Saeed Mahameed wrote: > + /* avoid leaking key on the stack */ > + memset(in, 0, sizeof(in)); memzero_explicit() ?

Re: pull-request: bpf-next 2019-07-03

2019-07-04 Thread David Miller
From: Daniel Borkmann Date: Thu, 4 Jul 2019 00:47:40 +0200 > The following pull-request contains BPF updates for your *net-next* tree. > > There is a minor merge conflict in mlx5 due to 8960b38932be ("linux/dim: > Rename externally used net_dim members") which has been pulled into your > tree i

Re: [PATCH net-next 0/2] Mellanox, mlx5 devlink versions query

2019-07-04 Thread David Miller
From: Saeed Mahameed Date: Wed, 3 Jul 2019 16:07:11 -0700 > Or just wait for my next pull request. Please resubmit this series once I pull your pull request in. Thanks.

Re: [net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 16:30:21 -0400, Saeed Mahameed wrote: > > > + { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, > > > tx_ktls_ooo_drop_no_sync_data) }, > > > + { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, > > > tx_ktls_ooo_drop_bypass_req) }, > > > + { MLX5E_DECLARE_STAT(struct mlx5e_sw_s

Re: [PATCH] tools bpftool: Fix json dump crash on powerpc

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 10:58:56 +0200, Jiri Olsa wrote: > Michael reported crash with by bpf program in json mode on powerpc: > > # bpftool prog -p dump jited id 14 > [{ > "name": "0xda9aa760", > "insns": [{ > "pc": "0x0", > "operation": "no

Re: [net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-04 Thread Saeed Mahameed
On Thu, Jul 4, 2019 at 4:12 PM Jakub Kicinski wrote: > > On Thu, 4 Jul 2019 18:16:15 +, Saeed Mahameed wrote: > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > > b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > > index 483d321d2151..6854f132d505 100644 > > --- a/driv

Re: [PATCH v2 net-next 3/3] tc-testing: introduce scapyPlugin for basic traffic

2019-07-04 Thread Alexander Aring
Hi, On Wed, Jul 03, 2019 at 08:45:02PM -0400, Lucas Bates wrote: > The scapyPlugin allows for simple traffic generation in tdc to > test various tc features. It was tested with scapy v2.4.2, but > should work with any successive version. > > In order to use the plugin's functionality, scapy must

Re: [PATCH v2 net-next 1/3] tc-testing: Add JSON verification to tdc

2019-07-04 Thread Alexander Aring
Hi, On Wed, Jul 03, 2019 at 08:45:00PM -0400, Lucas Bates wrote: > This patch allows tdc to process JSON output to perform secondary > verification of the command under test. If the verifyCmd generates > JSON, one can provide the 'matchJSON' key to process it > instead of a regex. > > matchJSON h

Re: [net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-04 Thread Jakub Kicinski
On Thu, 4 Jul 2019 18:16:15 +, Saeed Mahameed wrote: > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > index 483d321d2151..6854f132d505 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c > +++ b/drivers/net

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-04 Thread Ido Schimmel
On Thu, Jul 04, 2019 at 12:24:49PM -0700, David Miller wrote: > From: Ido Schimmel > Date: Thu, 4 Jul 2019 19:26:38 +0300 > > > Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer > > or an error pointer, but the code currently checks that the pointer is > > not NULL. > ...

Re: [PATCH net-next v2] net: ethernet: mediatek: Fix overlapping capability bits.

2019-07-04 Thread David Miller
From: René van Dorst Date: Wed, 3 Jul 2019 20:42:04 +0200 > Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10. > > This can causes issues on non-MT7621 devices which has the > MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) and MTK_TRGMII capability set. > The wrong TRGMII setup code can

Re: [PATCH net-next v2] bonding: add an option to specify a delay between peer notifications

2019-07-04 Thread David Miller
From: Vincent Bernat Date: Tue, 2 Jul 2019 19:43:54 +0200 > Currently, gratuitous ARP/ND packets are sent every `miimon' > milliseconds. This commit allows a user to specify a custom delay > through a new option, `peer_notif_delay'. > > Like for `updelay' and `downdelay', this delay should be a

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-04 Thread David Miller
From: Ido Schimmel Date: Thu, 4 Jul 2019 19:26:38 +0300 > Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer > or an error pointer, but the code currently checks that the pointer is > not NULL. ... > @@ -447,7 +447,7 @@ static struct neighbour *ipv4_neigh_lookup(const stru

Re: [PATCH] net: ethernet: sun: remove redundant assignment to variable err

2019-07-04 Thread David Miller
From: Colin King Date: Thu, 4 Jul 2019 13:36:51 +0100 > From: Colin Ian King > > The variable err is being assigned with a value that is never > read and it is being updated in the next statement with a new value. > The assignment is redundant and can be removed. > > Addresses-Coverity: ("Unu

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Ilias Apalodimas
On Thu, Jul 04, 2019 at 08:52:50PM +0300, Ilias Apalodimas wrote: > On Thu, Jul 04, 2019 at 07:39:44PM +0200, Jesper Dangaard Brouer wrote: > > On Thu, 4 Jul 2019 17:46:09 +0300 > > Ilias Apalodimas wrote: > > > > > Quoting Arnd, > > > > > > We have to do a sync_single_for_device /somewhere/ be

Re: [PATCH rdma-next v5 00/17] Statistics counter support

2019-07-04 Thread Leon Romanovsky
On Thu, Jul 04, 2019 at 03:25:29PM -0300, Jason Gunthorpe wrote: > On Tue, Jul 02, 2019 at 01:02:29PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog: > > v4 -> v5: > > * Patch #6 and #14 - consolidated many counter release functions, > >removed mutex lock protectio

Re: [PATCH rdma-next v5 00/17] Statistics counter support

2019-07-04 Thread Jason Gunthorpe
On Tue, Jul 02, 2019 at 01:02:29PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > v4 -> v5: > * Patch #6 and #14 - consolidated many counter release functions, >removed mutex lock protection from dealloc_counter() call >and simplified kref_put/kref_get operations

Re: [PATCH rdma-next v5 11/17] RDMA/netlink: Implement counter dumpit calback

2019-07-04 Thread Leon Romanovsky
On Thu, Jul 04, 2019 at 03:07:16PM -0300, Jason Gunthorpe wrote: > On Tue, Jul 02, 2019 at 01:02:40PM +0300, Leon Romanovsky wrote: > > diff --git a/include/uapi/rdma/rdma_netlink.h > > b/include/uapi/rdma/rdma_netlink.h > > index 0cb47d23fd86..22c5bc7a82dd 100644 > > +++ b/include/uapi/rdma/rdma_

Re: [PATCH mlx5-next 4/5] net/mlx5: Introduce TLS TX offload hardware bits and structures

2019-07-04 Thread Leon Romanovsky
On Thu, Jul 04, 2019 at 01:21:04PM -0400, Saeed Mahameed wrote: > On Thu, Jul 4, 2019 at 1:15 PM Leon Romanovsky wrote: > > > > On Thu, Jul 04, 2019 at 01:06:58PM -0400, Saeed Mahameed wrote: > > > On Wed, Jul 3, 2019 at 5:27 AM wrote: > > > > > > > > On Wed, Jul 03, 2019 at 07:39:32AM +, Sae

[net-next 08/14] net/mlx5e: Tx, Enforce L4 inline copy when needed

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan When ctrl->tisn field exists, this indicates an operation (HW offload) on the TCP payload. For such WQEs, inline the headers up to L4. This is in preparation for kTLS HW offload support, added in a downstream patch. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed

[net-next 09/14] net/mlx5e: Tx, Make SQ WQE fetch function type generic

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Change mlx5e_sq_fetch_wqe to be agnostic to the Work Queue Element (WQE) type. Before this patch, it was specific for struct mlx5e_tx_wqe. In order to allow the change, the function now returns the generic void pointer, and gets the WQE size to do the zero memset. Signed-off-

[net-next 11/14] net/mlx5e: Tx, Unconstify SQ stop room

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Use an SQ field for stop_room, and use the larger value only if TLS is supported. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 14 ++ .../net

[net-next 01/14] net/mlx5: Added fw version query command

2019-07-04 Thread Saeed Mahameed
From: Shay Agroskin Using the MCQI and MCQS registers, we query the running and pending fw version of the HCA. The MCQS is queried with sequentially increasing component index, until a component of type BOOT_IMG is found. Querying this component's version using the MCQI register yields the runnin

[net-next 07/14] net/mlx5e: Move helper functions to a new txrx datapath header

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Take datapath helper functions to a new header file en/txrx.h. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 102 --- .../net/ethernet/mellanox/mlx5/core/en/txrx.h | 163

[net-next 02/14] net/mlx5: Added devlink info callback

2019-07-04 Thread Saeed Mahameed
From: Shay Agroskin The callback is invoked using 'devlink dev info ' command and returns the running and pending firmware version of the HCA and the name of the kernel driver. If there is a pending firmware version (a new version is burned but the HCA still runs with the previous) it is returne

[net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Add support for transmit side kernel-TLS acceleration. Offload the crypto encryption to HW. Per TLS connection: - Use a separate TIS to maintain the HW context. - Use a separate encryption key. - Maintain static and progress HW contexts by posting the proper WQEs at creation

[net-next 10/14] net/mlx5e: Tx, Don't implicitly assume SKB-less wqe has one WQEBB

2019-07-04 Thread Saeed Mahameed
From: Eran Ben Elisha When polling a CQE of an SKB-less WQE, don't assume it consumed only one WQEBB. Use wi->num_wqebbs directly instead. In the downstream patch, SKB-less WQEs might have more the one WQEBB, thus this change is needed. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan

[net-next 06/14] net/mlx5: Accel, Add core TLS support for the Connect-X family

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Add support for the new TLS implementation of the Connect-X family. Introduce a new compilation flag MLX5_TLS for it. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Kconfig | 13 - .../

[net-next 13/14] net/mlx5e: Introduce a fenced NOP WQE posting function

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Similar to the existing mlx5e_post_nop(), but marks a fence in the WQE control segment. Added as a separate new function to not hurt the performance of the common case. To be used in a downstream patch of the series. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny

[net-next 12/14] net/mlx5e: Re-work TIS creation functions

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Let the EN TIS creation function (mlx5e_create_tis) be responsible for applying common mdev related fields. Other specific fields must be set by the caller and passed within the inbox. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed ---

[net-next 04/14] net/mlx5: Kconfig, Better organize compilation flags

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Always contain all acceleration functions declarations in 'accel' files, independent to the flags setting. For this, introduce new flags CONFIG_FPGA_{IPSEC/TLS} and use stubs where needed. This obsoletes the need for stubs in 'fpga' files. Remove them. Also use the new flags

[net-next 03/14] net/mlx5: Accel, Expose accel wrapper for IPsec FPGA function

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Do not directly call fpga version of IPsec function from main.c. Wrap it by an accel version, and call the wrapper. This will allow deprecating the FPGA IPsec stubs in downstream patch. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed -

[net-next 05/14] net/mlx5: Add crypto library to support create/destroy encryption key

2019-07-04 Thread Saeed Mahameed
From: Tariq Toukan Encryption key create / destroy is done via CREATE_GENERAL_OBJECT / DESTROY_GENERAL_OBJECT commands. To be used in downstream patches by TLS API wrappers, to configure the TIS context with the encryption key. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed

[pull request][net-next 00/14] Mellanox, mlx5 updates 2019-07-04

2019-07-04 Thread Saeed Mahameed
Hi Dave, This series adds two features to mlx5 driver. 1) From Shay, add the support for devlink fw query 2) From Tariq and Eran, KTLS tx support. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts with a merge

Re: [PATCH rdma-next v5 06/17] RDMA/counter: Add "auto" configuration mode support

2019-07-04 Thread Jason Gunthorpe
On Tue, Jul 02, 2019 at 01:02:35PM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > In auto mode all QPs belong to one category are bind automatically to > a single counter set. Currently only "qp type" is supported. > > In this mode the qp counter is set in RST2INIT modification, and when >

Re: [PATCH rdma-next v5 11/17] RDMA/netlink: Implement counter dumpit calback

2019-07-04 Thread Jason Gunthorpe
On Tue, Jul 02, 2019 at 01:02:40PM +0300, Leon Romanovsky wrote: > diff --git a/include/uapi/rdma/rdma_netlink.h > b/include/uapi/rdma/rdma_netlink.h > index 0cb47d23fd86..22c5bc7a82dd 100644 > +++ b/include/uapi/rdma/rdma_netlink.h > @@ -283,6 +283,8 @@ enum rdma_nldev_command { > > RDMA_

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Ilias Apalodimas
On Thu, Jul 04, 2019 at 07:39:44PM +0200, Jesper Dangaard Brouer wrote: > On Thu, 4 Jul 2019 17:46:09 +0300 > Ilias Apalodimas wrote: > > > Quoting Arnd, > > > > We have to do a sync_single_for_device /somewhere/ before the > > buffer is given to the device. On a non-cache-coherent machine with

Re: "local" interfaces, in forwarding state, are mutually "blind", and fail to connect

2019-07-04 Thread Andrew Lunn
On Thu, Jul 04, 2019 at 11:11:21AM -0600, James Feeney wrote: > I have a question - maybe someone can point me in the right direction? > > When there exist two or more "local" interfaces Hi James What exactly do you mean by a 'local' interface? The IP address on the interface has scope local?

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Jesper Dangaard Brouer
On Thu, 4 Jul 2019 17:46:09 +0300 Ilias Apalodimas wrote: > Quoting Arnd, > > We have to do a sync_single_for_device /somewhere/ before the > buffer is given to the device. On a non-cache-coherent machine with > a write-back cache, there may be dirty cache lines that get written back > after th

Re: [PATCH] tools bpftool: Fix json dump crash on powerpc

2019-07-04 Thread Quentin Monnet
2019-07-04 10:58 UTC+0200 ~ Jiri Olsa > Michael reported crash with by bpf program in json mode on powerpc: > > # bpftool prog -p dump jited id 14 > [{ > "name": "0xda9aa760", > "insns": [{ > "pc": "0x0", > "operation": "nop", >

Re: [PATCH v2 bpf-next] selftests/bpf: fix "alu with different scalars 1" on s390

2019-07-04 Thread Y Song
On Thu, Jul 4, 2019 at 1:52 AM Ilya Leoshkevich wrote: > > BPF_LDX_MEM is used to load the least significant byte of the retrieved > test_val.index, however, on big-endian machines it ends up retrieving > the most significant byte. > > Use the correct least significant byte offset on big-endian ma

Contract Offer

2019-07-04 Thread SAKI NISHIYO
We’d like to contract your services for a period of 12 months. Please advise if you are open to new opportunities. Regards, SAKI NISHIYO

Re: [PATCH mlx5-next 4/5] net/mlx5: Introduce TLS TX offload hardware bits and structures

2019-07-04 Thread Saeed Mahameed
On Thu, Jul 4, 2019 at 1:15 PM Leon Romanovsky wrote: > > On Thu, Jul 04, 2019 at 01:06:58PM -0400, Saeed Mahameed wrote: > > On Wed, Jul 3, 2019 at 5:27 AM wrote: > > > > > > On Wed, Jul 03, 2019 at 07:39:32AM +, Saeed Mahameed wrote: > > > > From: Eran Ben Elisha > > > > > > > > Add TLS of

"local" interfaces, in forwarding state, are mutually "blind", and fail to connect

2019-07-04 Thread James Feeney
I have a question - maybe someone can point me in the right direction? When there exist two or more "local" interfaces on the "host" system, where sysctl "net.ipv4.conf..forwarding=1" has been set, and where each interface has an IP address on a different subnet, then, when a frame arrives at a

Re: [PATCH mlx5-next 0/5] Mellanox, mlx5 low level updates 2019-07-02

2019-07-04 Thread Leon Romanovsky
On Thu, Jul 04, 2019 at 05:10:25PM +, Saeed Mahameed wrote: > On Wed, 2019-07-03 at 07:39 +, Saeed Mahameed wrote: > > Hi All, > > > > This series includes some low level updates to mlx5 driver, required > > for > > shared mlx5-next branch. > > > > Tariq extends the WQE control fields names

Re: [PATCH mlx5-next 4/5] net/mlx5: Introduce TLS TX offload hardware bits and structures

2019-07-04 Thread Leon Romanovsky
On Thu, Jul 04, 2019 at 01:06:58PM -0400, Saeed Mahameed wrote: > On Wed, Jul 3, 2019 at 5:27 AM wrote: > > > > On Wed, Jul 03, 2019 at 07:39:32AM +, Saeed Mahameed wrote: > > > From: Eran Ben Elisha > > > > > > Add TLS offload related IFC structs, layouts and enumerations. > > > > > > Signed

Re: [PATCH mlx5-next 0/5] Mellanox, mlx5 low level updates 2019-07-02

2019-07-04 Thread Saeed Mahameed
On Wed, 2019-07-03 at 07:39 +, Saeed Mahameed wrote: > Hi All, > > This series includes some low level updates to mlx5 driver, required > for > shared mlx5-next branch. > > Tariq extends the WQE control fields names. > Eran adds the required HW definitions and structures for upcoming TLS > su

Re: [PATCH mlx5-next 4/5] net/mlx5: Introduce TLS TX offload hardware bits and structures

2019-07-04 Thread Saeed Mahameed
On Wed, Jul 3, 2019 at 5:27 AM wrote: > > On Wed, Jul 03, 2019 at 07:39:32AM +, Saeed Mahameed wrote: > > From: Eran Ben Elisha > > > > Add TLS offload related IFC structs, layouts and enumerations. > > > > Signed-off-by: Eran Ben Elisha > > Signed-off-by: Tariq Toukan > > Signed-off-by: Sa

[PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-04 Thread Ido Schimmel
From: Ido Schimmel Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer or an error pointer, but the code currently checks that the pointer is not NULL. Fix this by checking that the pointer is not an error pointer, as this can result in a NULL pointer dereference [1]. Specif

Re: i.mx6ul with DSA in multi chip addressing mode - no MDIO access

2019-07-04 Thread Andrew Lunn
> &mdio0 { > interrupt-parent = <&gpio1>; > interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; > > switch0: switch0@2 { > compatible = "marvell,mv88e6190"; > reg = <2>; > pinctrl-0 = <&pinctrl_gpios>; > reset-gpios = <&gpio

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Arnd Bergmann
On Thu, Jul 4, 2019 at 4:46 PM Ilias Apalodimas wrote: > diff --git a/drivers/net/ethernet/socionext/netsec.c > b/drivers/net/ethernet/socionext/netsec.c > index 5544a722543f..ada7626bf3a2 100644 > --- a/drivers/net/ethernet/socionext/netsec.c > > + dma_start = page_pool_get_dma_addr(page);

Re: bonded active-backup ethernet-wifi drops packets

2019-07-04 Thread Brian J. Murrell
On Tue, 2019-06-18 at 14:57 -0400, Brian J. Murrell wrote: > Hi. > > I have an active-backup bonded connection on a 5.1.6 kernel where the > slaves are an Ethernet interface and a wifi interface. The goal is > to > have network transparent (i.e. same and IP address on both > interfaces) > interfa

[net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Ilias Apalodimas
Quoting Arnd, We have to do a sync_single_for_device /somewhere/ before the buffer is given to the device. On a non-cache-coherent machine with a write-back cache, there may be dirty cache lines that get written back after the device DMA's data into it (e.g. from a previous memset from before the

Re: i.mx6ul with DSA in multi chip addressing mode - no MDIO access

2019-07-04 Thread Benjamin Beckmeyer
> On Thu, Jul 04, 2019 at 10:54:47AM +0200, Benjamin Beckmeyer wrote: >> On 03.07.19 17:55, Andrew Lunn wrote: >>> On Wed, Jul 03, 2019 at 03:10:34PM +0200, Benjamin Beckmeyer wrote: Hey folks, I'm having a problem with a custom i.mx6ul board. When DSA is loaded I can't g

[PATCH net-next v6 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-04 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- tools/testing/selftests/tc-testing/config | 1 + .../tc-testing/tc-tests/actions/mpls.json | 812 ++

[PATCH net-next v6 4/5] net: sched: add mpls manipulation actions to TC

2019-07-04 Thread John Hurley
Currently, TC offers the ability to match on the MPLS fields of a packet through the use of the flow_dissector_key_mpls struct. However, as yet, TC actions do not allow the modification or manipulation of such fields. Add a new module that registers TC action ops to allow manipulation of MPLS. Thi

[PATCH net-next v6 0/5] Add MPLS actions to TC

2019-07-04 Thread John Hurley
This patchset introduces a new TC action module that allows the manipulation of the MPLS headers of packets. The code impliments functionality including push, pop, and modify. Also included are tests for the new funtionality. Note that these will require iproute2 changes to be submitted soon. NOT

  1   2   >