RE: [PATCH net-next 3/4] qed: Adapter flash update support.

2018-03-27 Thread Kalluru, Sudarsana
-Original Message- From: Yuval Mintz [mailto:yuv...@mellanox.com] Sent: 27 March 2018 19:07 To: Kalluru, Sudarsana Cc: da...@davemloft.net; netdev@vger.kernel.org; Elior, Ariel Subject: Re: [PATCH net-next 3/4] qed: Adapter flash update support. On Mon, Mar 26, 2018 at 03:13:47AM -07

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Benjamin Herrenschmidt
On Wed, 2018-03-28 at 06:53 +, Linus Torvalds wrote: > > > On Tue, Mar 27, 2018, 20:43 Benjamin Herrenschmidt ing.org> wrote: > > > > > > Of course, you'd have to be pretty odd to want to start a DMA > > with a > > > read anyway - partly exactly because it's bad for performance > > since > >

[PATCH v2] staging: fsl-dpaa2/ethsw: Fix tag control information value overwrite

2018-03-27 Thread Razvan Stefanescu
The tag control information (TCI) part of the VLAN header contains several fields, including PCP (priority code point) and PVID (port VLAN id). Current implementation uses function ethsw_port_set_tci() to set the PVID value and mistakenly overwrites the rest of the TCI fields with 0, including PCP

RE: [PATCH] staging: fsl-dpaa2/ethsw: Fix TCI values overwrite

2018-03-27 Thread Razvan Stefanescu
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Andrew Lunn > Sent: Tuesday, March 27, 2018 4:38 PM > To: Razvan Stefanescu > Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; linux- > ker...@vger.kerne

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Benjamin Herrenschmidt
On Tue, 2018-03-27 at 20:26 -1000, Linus Torvalds wrote: > On Tue, Mar 27, 2018 at 6:33 PM, Benjamin Herrenschmidt > wrote: > > > > This is why, I want (with your agreement) to define clearly and once > > and for all, that the Linux semantics of writel are that it is ordered > > with previous wri

Re: [PATCH] vhost-net: add time limitation for tx polling(Internet mail)

2018-03-27 Thread Jason Wang
On 2018年03月28日 12:01, haibinzhang(张海斌) wrote: On 2018年03月27日 19:26, Jason wrote On 2018年03月27日 17:12, haibinzhang wrote: handle_tx() will delay rx for a long time when busy tx polling udp packets with short length(ie: 1byte udp payload), because setting VHOST_NET_WEIGHT takes into account only

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Linus Torvalds
On Tue, Mar 27, 2018 at 6:33 PM, Benjamin Herrenschmidt wrote: > > This is why, I want (with your agreement) to define clearly and once > and for all, that the Linux semantics of writel are that it is ordered > with previous writes to coherent memory (*) Honestly, I think those are the sane seman

Re: [PATCH bpf-next] bpf: sockmap: initialize sg table entries properly

2018-03-27 Thread Prashant Bhole
On 3/27/2018 6:05 PM, Daniel Borkmann wrote: On 03/27/2018 10:41 AM, Prashant Bhole wrote: On 3/27/2018 12:15 PM, John Fastabend wrote: On 03/25/2018 11:54 PM, Prashant Bhole wrote: When CONFIG_DEBUG_SG is set, sg->sg_magic is initialized to SG_MAGIC, when sg table is initialized using sg_in

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-27 Thread Jiri Pirko
Wed, Mar 28, 2018 at 07:02:34AM CEST, step...@networkplumber.org wrote: >On Thu, 22 Mar 2018 11:55:10 +0100 >Jiri Pirko wrote: > >> From: Jiri Pirko >> >> This patchset resolves 2 issues we have right now: >> 1) There are many netdevices / ports in the system, for port, pf, vf >>represenatat

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Linus Torvalds
On Tue, Mar 27, 2018 at 5:24 PM, Sinan Kaya wrote: > > Basically changing it to > > dma_buffer->foo = 1;/* WB */ > wmb() > writel_relaxed(KICK, DMA_KICK_REGISTER);/* UC */ > mmiowb() Why? Why not just remove the wmb(), and keep the barrier in the writel()? The above

Re: [PATCH net 0/2] Fix vlan untag and insertion for bridge and vlan with reorder_hdr off

2018-03-27 Thread Eric Dumazet
On 03/16/2018 07:05 AM, David Miller wrote: > From: Toshiaki Makita > Date: Tue, 13 Mar 2018 14:51:26 +0900 > >> As Brandon Carpenter reported[1], sending non-vlan-offloaded packets from >> bridge devices ends up with corrupted packets. He narrowed down this problem >> and found that the root c

Re: [PATCH 4/6] rhashtable: allow a walk of the hash table without missing objects.

2018-03-27 Thread Herbert Xu
On Wed, Mar 28, 2018 at 08:54:41AM +1100, NeilBrown wrote: > > Possibly. > I particularly want the interface to require that you pass the > previously returned object to _continue. That makes it easy to see that > the object is still being used. If someone changes to code to delete > the object be

Re: [PATCH 5/6] rhashtable: support guaranteed successful insertion.

2018-03-27 Thread Herbert Xu
On Wed, Mar 28, 2018 at 08:34:19AM +1100, NeilBrown wrote: > > It is easy to get an -EBUSY insertion failure when .disable_count is > enabled, and I did get that. Blindly propagating that up caused lustre > to get terribly confused - not too surprising really. Right, so this failure mode is speci

Re: [PATCH 1/2] af_key: Use DIV_ROUND_UP() instead of open-coded equivalent

2018-03-27 Thread Steffen Klassert
On Mon, Mar 26, 2018 at 07:39:16AM -0400, Kevin Easton wrote: > Several places use (x + 7) / 8 to convert from a number of bits to a number > of bytes. Replace those with DIV_ROUND_UP(x, 8) instead, for consistency > with other parts of the same file. > > Signed-off-by: Kevin Easton Is this a f

Re: possible deadlock in rtnl_lock (5)

2018-03-27 Thread Dmitry Vyukov
Please keep the Reported-by notice, and reproducer will probably be useful too: IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+a46d6abf9d56b1365...@syzkaller.appspotmail.com It will help syzbot understand when the bug is fixed. See footer for details

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-27 Thread Stephen Hemminger
On Thu, 22 Mar 2018 11:55:10 +0100 Jiri Pirko wrote: > From: Jiri Pirko > > This patchset resolves 2 issues we have right now: > 1) There are many netdevices / ports in the system, for port, pf, vf >represenatation but the user has no way to see which is which There already are a lot of at

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Benjamin Herrenschmidt
On Tue, 2018-03-27 at 23:24 -0400, Sinan Kaya wrote: > On 3/27/2018 10:51 PM, Linus Torvalds wrote: > > > The discussion at hand is about > > > > > > dma_buffer->foo = 1;/* WB */ > > > writel(KICK, DMA_KICK_REGISTER);/* UC */ > > > > Yes. That certainly

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Benjamin Herrenschmidt
On Tue, 2018-03-27 at 16:51 -1000, Linus Torvalds wrote: > On Tue, Mar 27, 2018 at 3:03 PM, Benjamin Herrenschmidt > wrote: > > > > The discussion at hand is about > > > > dma_buffer->foo = 1;/* WB */ > > writel(KICK, DMA_KICK_REGISTER);/* UC */ > > Y

Re: [PATCH v13 net-next 01/12] tls: support for Inline tls record

2018-03-27 Thread Atul Gupta
On 3/27/2018 11:53 PM, Stefano Brivio wrote: > On Tue, 27 Mar 2018 23:06:30 +0530 > Atul Gupta wrote: > >> +static struct tls_context *create_ctx(struct sock *sk) >> +{ >> +struct inet_connection_sock *icsk = inet_csk(sk); >> +struct tls_context *ctx; >> + >> +/* allocate tls context

Re: [PATCH V5 net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-27 Thread Shannon Nelson
On 3/27/2018 4:56 PM, Saeed Mahameed wrote: From: Ilya Lesokhin This patch adds a generic infrastructure to offload TLS crypto to a network device. It enables the kernel TLS socket to skip encryption and authentication operations on the transmit side of the data path. Leaving those computationa

Re: [PATCH] vhost-net: add time limitation for tx polling(Internet mail)

2018-03-27 Thread 张海斌
On 2018年03月27日 19:26, Jason wrote On 2018年03月27日 17:12, haibinzhang wrote: >> handle_tx() will delay rx for a long time when busy tx polling udp packets >> with short length(ie: 1byte udp payload), because setting VHOST_NET_WEIGHT >> takes into account only sent-bytes but no time. > >Interesting. >

[PATCH v2 bpf-next 6/9] bpf: Hooks for sys_connect

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov == The problem == See description of the problem in the initial patch of this patch set. == The solution == The patch provides much more reliable in-kernel solution for the 2nd part of the problem: making outgoing connecttion from desired IP. It adds new attach types `BPF

[PATCH v2 bpf-next 1/9] bpf: Check attach type at prog load time

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov == The problem == There are use-cases when a program of some type can be attached to multiple attach points and those attach points must have different permissions to access context or to call helpers. E.g. context structure may have fields for both IPv4 and IPv6 but it doe

[PATCH v2 bpf-next 2/9] libbpf: Support expected_attach_type at prog load

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov Support setting `expected_attach_type` at prog load time in both `bpf/bpf.h` and `bpf/libbpf.h`. Since both headers already have API to load programs, new functions are added not to break backward compatibility for existing ones: * `bpf_load_program_xattr()` is added to `bpf

[PATCH v2 bpf-next 9/9] selftests/bpf: Selftest for sys_bind post-hooks.

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov Add selftest for attach types `BPF_CGROUP_INET4_POST_BIND` and `BPF_CGROUP_INET6_POST_BIND`. The main things tested are: * prog load behaves as expected (valid/invalid accesses in prog); * prog attach behaves as expected (load- vs attach-time attach types); * `BPF_CGROUP_INE

[PATCH v2 bpf-next 3/9] bpf: Hooks for sys_bind

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov == The problem == There is a use-case when all processes inside a cgroup should use one single IP address on a host that has multiple IP configured. Those processes should use the IP for both ingress and egress, for TCP and UDP traffic. So TCP/UDP servers should be bound to

[PATCH v2 bpf-next 8/9] bpf: Post-hooks for sys_bind

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov "Post-hooks" are hooks that are called right before returning from sys_bind. At this time IP and port are already allocated and no further changes to `struct sock` can happen before returning from sys_bind but BPF program has a chance to inspect the socket and change sys_bind

[PATCH v2 bpf-next 4/9] selftests/bpf: Selftest for sys_bind hooks

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov Add selftest to work with bpf_sock_addr context from `BPF_PROG_TYPE_CGROUP_SOCK_ADDR` programs. Try to bind(2) on IP:port and apply: * loads to make sure context can be read correctly, including narrow loads (byte, half) for IP and full-size loads (word) for all fields; *

[PATCH v2 bpf-next 0/9] bpf: introduce cgroup-bpf bind, connect, post-bind hooks

2018-03-27 Thread Alexei Starovoitov
v1->v2: - support expected_attach_type at prog load time so that prog (incl. context accesses and calls to helpers) can be validated with regard to specific attach point it is supposed to be attached to. Later, at attach time, attach type is checked so that it must be same as at load time i

[PATCH v2 bpf-next 5/9] net: Introduce __inet_bind() and __inet6_bind

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov Refactor `bind()` code to make it ready to be called from BPF helper function `bpf_bind()` (will be added soon). Implementation of `inet_bind()` and `inet6_bind()` is separated into `__inet_bind()` and `__inet6_bind()` correspondingly. These function can be used from both `sk

[PATCH v2 bpf-next 7/9] selftests/bpf: Selftest for sys_connect hooks

2018-03-27 Thread Alexei Starovoitov
From: Andrey Ignatov Add selftest for BPF_CGROUP_INET4_CONNECT and BPF_CGROUP_INET6_CONNECT attach types. Try to connect(2) to specified IP:port and test that: * remote IP:port pair is overridden; * local end of connection is bound to specified IP. All combinations of IPv4/IPv6 and TCP/UDP are

Re: [PATCH v13 net-next 08/12] crypto : chtls - CPL handler definition

2018-03-27 Thread Atul Gupta
On 3/27/2018 11:12 PM, Stefano Brivio wrote: > On Tue, 27 Mar 2018 23:06:37 +0530 > Atul Gupta wrote: > >> Exchange messages with hardware to program the TLS session >> CPL handlers for messages received from chip. >> >> Signed-off-by: Atul Gupta >> Signed-off-by: Michael Werner >> Reviewed-by

Re: [V9fs-developer] [PATCH] net/9p: fix potential refcnt problem of trans module

2018-03-27 Thread jiangyiwen
On 2018/3/28 10:52, cgxu...@gmx.com wrote: > 在 2018年3月28日,上午10:10,jiangyiwen 写道: >> >> On 2018/3/27 20:49, Chengguang Xu wrote: >>> When specifying trans_mod multiple times in a mount, >>> it may cause inaccurate refcount of trans module. Also, >>> in the error case of option parsing, we should pu

Re: [SPAMMY (6.9)]Re: [PATCH v13 net-next 02/12] ethtool: enable Inline TLS in HW

2018-03-27 Thread Atul Gupta
On 3/28/2018 2:14 AM, Sabrina Dubroca wrote: > 2018-03-27, 23:06:31 +0530, Atul Gupta wrote: >> Ethtool option enables TLS record offload on HW, user >> configures the feature for netdev capable of Inline TLS. >> This allows user to define custom sk_prot for Inline TLS sock >> >> Signed-off-by: A

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Sinan Kaya
On 3/27/2018 10:51 PM, Linus Torvalds wrote: >> The discussion at hand is about >> >> dma_buffer->foo = 1;/* WB */ >> writel(KICK, DMA_KICK_REGISTER);/* UC */ > Yes. That certainly is ordered on x86. In fact, afaik it's ordered > even if that writel() mig

RE: [PATCH] net: fec: set dma_coherent_mask

2018-03-27 Thread Andy Duan
From: Geert Uytterhoeven Sent: 2018年3月27日 20:59 > Hi Greg, > > On Mon, Mar 26, 2018 at 3:36 PM, Greg Ungerer wrote: > > As of commit 205e1b7f51e4 ("dma-mapping: warn when there is no > > coherent_dma_mask") the Freescale FEC driver is issuing the following > > warning on driver initialization on

Re: [V9fs-developer] [PATCH] net/9p: fix potential refcnt problem of trans module

2018-03-27 Thread cgxu...@gmx.com
在 2018年3月28日,上午10:10,jiangyiwen 写道: > > On 2018/3/27 20:49, Chengguang Xu wrote: >> When specifying trans_mod multiple times in a mount, >> it may cause inaccurate refcount of trans module. Also, >> in the error case of option parsing, we should put the >> trans module if we have already got. >>

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Linus Torvalds
On Tue, Mar 27, 2018 at 3:03 PM, Benjamin Herrenschmidt wrote: > > The discussion at hand is about > > dma_buffer->foo = 1;/* WB */ > writel(KICK, DMA_KICK_REGISTER);/* UC */ Yes. That certainly is ordered on x86. In fact, afaik it's ordered even if tha

[PATCH net-next] ipv6: export ip6 fragments sysctl to unprivileged users

2018-03-27 Thread Eric Dumazet
IPv4 was changed in commit 52a773d645e9 ("net: Export ip fragment sysctl to unprivileged users") The only sysctl that is not per-netns is not used : ip6frag_secret_interval Signed-off-by: Eric Dumazet Cc: Nikolay Borisov --- net/ipv6/reassembly.c | 4 1 file changed, 4 deletions(-) diff

[PATCH net-next] liquidio: Prioritize control messages

2018-03-27 Thread Felix Manlunas
From: Intiyaz Basha During heavy tx traffic, control messages (sent by liquidio driver to NIC firmware) sometimes do not get processed in a timely manner. Reason is: the low-level metadata of control messages and that of egress network packets indicate that they have the same priority. Fix it b

[PATCH v7 bpf-next 02/10] net/mediatek: disambiguate mt76 vs mt7601u trace events

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov two trace events defined with the same name and both unused. They conflict in allyesconfig build. Rename one of them. Signed-off-by: Alexei Starovoitov --- drivers/net/wireless/mediatek/mt7601u/trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -

[PATCH v7 bpf-next 10/10] selftests/bpf: test for bpf_get_stackid() from raw tracepoints

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov similar to traditional traceopint test add bpf_get_stackid() test from raw tracepoints and reduce verbosity of existing stackmap test Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_progs.c | 91 1 file changed, 7

[PATCH v7 bpf-next 04/10] net/wireless/iwlwifi: fix iwlwifi_dev_ucode_error tracepoint

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov fix iwlwifi_dev_ucode_error tracepoint to pass pointer to a table instead of all 17 arguments by value. dvm/main.c and mvm/utils.c have 'struct iwl_error_event_table' defined with very similar yet subtly different fields and offsets. tracepoint is still common and using d

[PATCH v7 bpf-next 01/10] treewide: remove large struct-pass-by-value from tracepoint arguments

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov - fix trace_hfi1_ctxt_info() to pass large struct by reference instead of by value - convert 'type array[]' tracepoint arguments into 'type *array', since compiler will warn that sizeof('type array[]') == sizeof('type *array') and later should be used instead The CA

[PATCH v7 bpf-next 09/10] samples/bpf: raw tracepoint test

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov add empty raw_tracepoint bpf program to test overhead similar to kprobe and traditional tracepoint tests Signed-off-by: Alexei Starovoitov --- samples/bpf/Makefile| 1 + samples/bpf/bpf_load.c | 14 ++ samples/bpf/test_

[PATCH v7 bpf-next 08/10] libbpf: add bpf_raw_tracepoint_open helper

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov add bpf_raw_tracepoint_open(const char *name, int prog_fd) api to libbpf Signed-off-by: Alexei Starovoitov --- tools/include/uapi/linux/bpf.h | 11 +++ tools/lib/bpf/bpf.c| 11 +++ tools/lib/bpf/bpf.h| 1 + 3 files changed, 23 i

[PATCH v7 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov compute number of arguments passed into tracepoint at compile time and store it as part of 'struct tracepoint'. The number is necessary to check safety of bpf program access that is coming in subsequent patch. Signed-off-by: Alexei Starovoitov Reviewed-by: Steven Rosted

[PATCH v7 bpf-next 03/10] net/mac802154: disambiguate mac80215 vs mac802154 trace events

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov two trace events defined with the same name and both unused. They conflict in allyesconfig build. Rename one of them. Signed-off-by: Alexei Starovoitov --- net/mac802154/trace.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/mac802154/t

[PATCH v7 bpf-next 00/10] bpf, tracing: introduce bpf raw tracepoints

2018-03-27 Thread Alexei Starovoitov
v6->v7: - adopted Steven's bpf_raw_tp_map section approach to find tracepoint and corresponding bpf probe function instead of kallsyms approach. dropped kernel_tracepoint_find_by_name() patch v5->v6: - avoid changing semantics of for_each_kernel_tracepoint() function, instead introduce kerne

[PATCH v7 bpf-next 05/10] macro: introduce COUNT_ARGS() macro

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov move COUNT_ARGS() macro from apparmor to generic header and extend it to count till twelve. COUNT() was an alternative name for this logic, but it's used for different purpose in many other places. Similarly for CONCATENATE() macro. Suggested-by: Linus Torvalds Signed

[PATCH v7 bpf-next 07/10] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce BPF_PROG_TYPE_RAW_TRACEPOINT bpf program type to access kernel internal arguments of the tracepoints in their raw form. >From bpf program point of view the access to the arguments look like: struct bpf_raw_tracepoint_args { __u64 args[0]; }; int bpf_pro

Re: [V9fs-developer] [PATCH] net/9p: fix potential refcnt problem of trans module

2018-03-27 Thread jiangyiwen
On 2018/3/27 20:49, Chengguang Xu wrote: > When specifying trans_mod multiple times in a mount, > it may cause inaccurate refcount of trans module. Also, > in the error case of option parsing, we should put the > trans module if we have already got. > > Signed-off-by: Chengguang Xu > --- > net/9

Re: [PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink

2018-03-27 Thread Jakub Kicinski
On Tue, 27 Mar 2018 18:22:00 -0700, David Ahern wrote: > +void nsim_devlink_setup(struct netdevsim *ns) > +{ > + struct net *net = nsim_to_net(ns); > + bool *reg_devlink = net_generic(net, nsim_devlink_id); > + struct devlink *devlink; > + int err = -ENOMEM; > + > + /* only one

[PATCH net-next 1/6] net: Fix fib notifer to return errno

2018-03-27 Thread David Ahern
Notifier handlers use notifier_from_errno to convert any potential error to an encoded format. As a consequence the other side, call_fib_notifier{s} in this case, needs to use notifier_to_errno to return the error from the handler back to its caller. Signed-off-by: David Ahern --- net/core/fib_n

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Benjamin Herrenschmidt
On Tue, 2018-03-27 at 16:10 +0100, Will Deacon wrote: > To clarify: are you saying that on x86 you need a wmb() prior to a writel > if you want that writel to be ordered after prior writes to memory? Is this > specific to WC memory or some other non-standard attribute? > > The only reason we have

[PATCH net-next 4/6] net/ipv4: Allow notifier to fail route replace

2018-03-27 Thread David Ahern
Add checking to call to call_fib_entry_notifiers for IPv4 route replace. Allows a notifier handler to fail the replace. Signed-off-by: David Ahern --- net/ipv4/fib_trie.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index

[PATCH net-next 2/6] net: Move call_fib_rule_notifiers up in fib_nl_newrule

2018-03-27 Thread David Ahern
Move call_fib_rule_notifiers up in fib_nl_newrule to the point right before the rule is inserted into the list. At this point there are no more failure paths within the core rule code, so if the notifier does not fail then the rule will be inserted into the list. Signed-off-by: David Ahern --- n

[PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink

2018-03-27 Thread David Ahern
Add devlink support to netdevsim and use it to implement a simple, profile based resource controller. Only one controller is needed per namespace, so the first netdevsim netdevice in a namespace registers with devlink. If that device is deleted, the resource settings are deleted. The resource cont

[PATCH net-next 0/6] net: Allow FIB notifiers to fail add and replace

2018-03-27 Thread David Ahern
I wanted to revisit how resource overload is handled for hardware offload of FIB entries and rules. At the moment, the in-kernel fib notifier can tell a driver about a route or rule add, replace, and delete, but the notifier can not affect the action. Specifically, in the case of mlxsw if a route o

[PATCH net-next 5/6] net/ipv6: Move call_fib6_entry_notifiers up for route adds

2018-03-27 Thread David Ahern
Move call to call_fib6_entry_notifiers for new IPv6 routes to right before the insertion into the FIB. At this point notifier handlers can decide the fate of the new route with a clean path to delete the potential new entry if the notifier returns non-0. Signed-off-by: David Ahern --- net/ipv6/i

[PATCH net-next 3/6] net/ipv4: Move call_fib_entry_notifiers up for new routes

2018-03-27 Thread David Ahern
Move call to call_fib_entry_notifiers for new IPv4 routes to right before the call to fib_insert_alias. At this point the only remaining failure path is memory allocations in fib_insert_node. Handle that very unlikely failure with a call to call_fib_entry_notifiers to tell drivers about it. At thi

[PATCH iproute2-next 0/2] more JSON support

2018-03-27 Thread Stephen Hemminger
From: Stephen Hemminger Add JSON to ILA and L2TP display Stephen Hemminger (2): ip/ila: support json and color ip/l2tp: add JSON support ip/ipila.c | 76 +++--- ip/ipl2tp.c | 152 2 files changed, 140 in

[PATCH iproute2-next 2/2] ip/l2tp: add JSON support

2018-03-27 Thread Stephen Hemminger
From: Stephen Hemminger Convert ip l2tp to use JSON output routines. Signed-off-by: Stephen Hemminger --- ip/ipl2tp.c | 152 1 file changed, 103 insertions(+), 49 deletions(-) diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c index 8aaee747e29

[PATCH iproute2-next 1/2] ip/ila: support json and color

2018-03-27 Thread Stephen Hemminger
From: Stephen Hemminger Use json print to enhance ila output. Signed-off-by: Stephen Hemminger --- ip/ipila.c | 76 ++ 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/ip/ipila.c b/ip/ipila.c index 9a324296ffd6..370385c

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Benjamin Herrenschmidt
On Tue, 2018-03-27 at 14:39 -1000, Linus Torvalds wrote: > On Tue, Mar 27, 2018 at 11:33 AM, Benjamin Herrenschmidt > wrote: > > > > Well, we need to clarify that once and for all, because as I wrote > > earlier, it was decreed by Linus more than a decade ago that writel > > would be fully ordere

[Resend Patch 2/3] Netvsc: Use the vmbus functiton to calculate ring buffer percentage

2018-03-27 Thread Long Li
From: Long Li In Vmbus, we have defined a function to calculate available ring buffer percentage to write. Use that function and remove netvsc's private version. Signed-off-by: Long Li --- drivers/net/hyperv/hyperv_net.h | 1 - drivers/net/hyperv/netvsc.c | 17 +++-- drivers/

[Resend Patch 3/3] Storvsc: Select channel based on available percentage of ring buffer to write

2018-03-27 Thread Long Li
From: Long Li This is a best effort for estimating on how busy the ring buffer is for that channel, based on available buffer to write in percentage. It is still possible that at the time of actual ring buffer write, the space may not be available due to other processes may be writing at the time

[Resend Patch 1/3] Vmbus: Add function to report available ring buffer to write in total ring size percentage

2018-03-27 Thread Long Li
From: Long Li Netvsc has a function to calculate how much ring buffer in percentage is available to write. This function is also useful for storvsc and other vmbus devices. Define a similar function in vmbus to be used by other vmbus devices. Signed-off-by: Long Li --- drivers/hv/ring_buffer.

Re: [PATCH v6 bpf-next 08/11] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-27 Thread Alexei Starovoitov
On 3/27/18 5:44 PM, Mathieu Desnoyers wrote: - On Mar 27, 2018, at 8:00 PM, Alexei Starovoitov a...@fb.com wrote: On 3/27/18 4:13 PM, Mathieu Desnoyers wrote: - On Mar 27, 2018, at 6:48 PM, Alexei Starovoitov a...@fb.com wrote: On 3/27/18 2:04 PM, Steven Rostedt wrote: +#ifdef CONF

Re: [PATCH 1/6] rhashtable: improve documentation for rhashtable_walk_peek()

2018-03-27 Thread NeilBrown
On Wed, Mar 28 2018, Andreas Grünbacher wrote: > Neil, > > 2018-03-27 1:33 GMT+02:00 NeilBrown : >> The documentation for rhashtable_walk_peek() wrong. It claims to >> return the *next* entry, whereas it in fact returns the *previous* >> entry. >> However if no entries have yet been returned - or

Re: [RFC PATCH 00/24] Introducing AF_XDP support

2018-03-27 Thread William Tu
> Indeed. Intel iommu has least effect on RX because of premap/recycle. > But TX dma map and unmap is really expensive! > >> >> Basically the IOMMU can make creating/destroying a DMA mapping really >> expensive. The easiest way to work around it in the case of the Intel >> IOMMU is to boot with "io

[net-next 07/15] net/mlx5e: Remove rq_headroom field from params

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan It can be derived from other params, calculate it via the dedicated function when needed. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 +

[net-next 08/15] net/mlx5e: Do not reset Receive Queue params on every type change

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan Do not implicit a call to mlx5e_init_rq_type_params() upon every change in RQ type. It should be called only on channels creation. Fixes: 2fc4bfb7250d ("net/mlx5e: Dynamic RQ type infrastructure") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/eth

[net-next 12/15] mlx5_{ib,core}: Add query SQ state helper function

2018-03-27 Thread Saeed Mahameed
From: Eran Ben Elisha Move query SQ state function from mlx5_ib to mlx5_core in order to have it in shared code. It will be used in a downstream patch from mlx5e. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/qp.c| 14 +---

[net-next 05/15] net/mlx5e: Use no-offset function in skb header copy

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan In copying skb header to skb->data, replace the call to skb_copy_to_linear_data_offset() with a zero offset with the call to the no-offset function skb_copy_to_linear_data(). Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/co

Re: [PATCH v6 bpf-next 08/11] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-27 Thread Mathieu Desnoyers
- On Mar 27, 2018, at 8:00 PM, Alexei Starovoitov a...@fb.com wrote: > On 3/27/18 4:13 PM, Mathieu Desnoyers wrote: >> - On Mar 27, 2018, at 6:48 PM, Alexei Starovoitov a...@fb.com wrote: >> >>> On 3/27/18 2:04 PM, Steven Rostedt wrote: +#ifdef CONFIG_BPF_EVENTS +#define BPF

[net-next 10/15] net/mlx5e: Remove unused max inline related code

2018-03-27 Thread Saeed Mahameed
From: Gal Pressman Commit 58d522912ac7 ("net/mlx5e: Support TX packet copy into WQE") introduced the max inline WQE as an ethtool tunable. One commit later, that functionality was made dependent on BlueFlame. Commit 6982ab609768 ("net/mlx5e: Xmit, no write combining") removed BlueFlame support,

[net-next 01/15] net/mlx5e: Unify slow PCI heuristic

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan Get the link/pci speed query and logic into a single function. Unify the heuristics and use a single PCI threshold (16G) for all. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31 ++ ..

[net-next 11/15] net/mlx5e: Move all TX timeout logic to be under state lock

2018-03-27 Thread Saeed Mahameed
From: Eran Ben Elisha Driver callback for handling TX timeout should access some internal resources (SQ, CQ) in order to decide if the tx timeout work should be scheduled. These resources might be unavailable if channels are closed in parallel (ifdown for example). The state lock is the mechani

[net-next 06/15] net/mlx5e: Remove RQ MPWQE fields from params

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan Introduce functions to calculate them when needed. They can be derived from other params. This will simplify transition between RQ configurations. In general, any parameter that is not explicitly set or controlled, but derived from other parameters, should not have a control-p

[net-next 02/15] net/mlx5e: Disable Striding RQ when PCI is slower than link

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan We turn the feature off for servers with PCI BW bounded by a threshold (16G) and lower than MAX LINK BW. This improves the effectiveness of CQE compression feature, that is defaulted to ON for the same case. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- driv

[net-next 09/15] net/mlx5e: Add ethtool priv-flag for Striding RQ

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan Add a control private flag in ethtool to enable/disable Striding RQ feature. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 38 +

[net-next 03/15] net/mlx5e: Remove unused define MLX5_MPWRQ_STRIDES_PER_PAGE

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan Clean it up as it's not in use. Fixes: d9d9f156f380 ("net/mlx5e: Expand WQE stride when CQE compression is enabled") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- 1 file changed, 2 deletions(-) diff --gi

[net-next 15/15] net/mlx5e: Recover Send Queue (SQ) from error state

2018-03-27 Thread Saeed Mahameed
From: Eran Ben Elisha An error TX completion (CQE) which arrived on a specific SQ indicates that this SQ got moved by the hardware to error state, which means all pending and incoming TX requests are dropped or will be dropped and no further "Good" CQEs will be generated for that SQ. Before this

[net-next 13/15] mlx5: Move dump error CQE function out of mlx5_ib for code sharing

2018-03-27 Thread Saeed Mahameed
From: Eran Ben Elisha Move mlx5_ib dump error CQE implementation to mlx5 CQ header file in order to use it in a downstream patch from mlx5e. In addition, use print_hex_dump instead of manual dumping of the buffer. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/infin

[net-next 04/15] net/mlx5e: Separate dma base address and offset in dma_sync call

2018-03-27 Thread Saeed Mahameed
From: Tariq Toukan Pass the base dma address and offset to dma_sync_single_range_for_cpu(), instead of doing the pre-calculation. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 6 ++ 1 file changed, 2 insertions(+), 4 deleti

[net-next 14/15] net/mlx5e: Dump xmit error completions

2018-03-27 Thread Saeed Mahameed
From: Eran Ben Elisha Monitor and dump xmit error completions. In addition, add err_cqe counter to track the number of error completion per send queue. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 +++ drivers/net/eth

[pull request][net-next 00/15] Mellanox, mlx5 mlx5-updates-2018-03-27

2018-03-27 Thread Saeed Mahameed
Hi Dave, This series contains Misc updates and cleanups for mlx5e rx path and SQ recovery feature for tx path. For more information please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit 5d22d47b9ed96eddb35821dc2cc4f

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Linus Torvalds
On Tue, Mar 27, 2018 at 11:33 AM, Benjamin Herrenschmidt wrote: > > Well, we need to clarify that once and for all, because as I wrote > earlier, it was decreed by Linus more than a decade ago that writel > would be fully ordered by itself vs. previous memory stores (at least > on UC memory). Yes

Re: [PATCH net] net: fix possible out-of-bound read in skb_network_protocol()

2018-03-27 Thread Pravin Shelar
On Mon, Mar 26, 2018 at 8:08 AM, Eric Dumazet wrote: > skb mac header is not necessarily set at the time skb_network_protocol() > is called. Use skb->data instead. > > BUG: KASAN: slab-out-of-bounds in skb_network_protocol+0x46b/0x4b0 > net/core/dev.c:2739 > Read of size 2 at addr 8801b3097a0

RE: [Intel-wired-lan] [next-queue PATCH v5 7/9] igb: Add MAC address support for ethtool nftuple filters

2018-03-27 Thread Vinicius Costa Gomes
Hi Aaron, "Brown, Aaron F" writes: [...] > And watching the rx_queue counters continues to be spread across the > different queues. This is with Jeff Kirsher's next queue, kernel > 4.16.0-rc4_next-queue_dev-queue_e31d20a, which has the series of 8 igb > patches applied. > > When I go back

Re: [RFC PATCH 00/24] Introducing AF_XDP support

2018-03-27 Thread William Tu
On Tue, Mar 27, 2018 at 2:37 AM, Jesper Dangaard Brouer wrote: > On Mon, 26 Mar 2018 14:58:02 -0700 > William Tu wrote: > >> > Again high count for NMI ?!? >> > >> > Maybe you just forgot to tell perf that you want it to decode the >> > bpf_prog correctly? >> > >> > https://prototype-kernel.readt

Re: [PATCH v6 bpf-next 08/11] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-27 Thread Alexei Starovoitov
On 3/27/18 4:13 PM, Mathieu Desnoyers wrote: - On Mar 27, 2018, at 6:48 PM, Alexei Starovoitov a...@fb.com wrote: On 3/27/18 2:04 PM, Steven Rostedt wrote: +#ifdef CONFIG_BPF_EVENTS +#define BPF_RAW_TP() . = ALIGN(8); \ Given that the section consists of a 16-bytes structure

[PATCH V5 net-next 00/14] TLS offload, netdev & MLX5 support

2018-03-27 Thread Saeed Mahameed
Hi Dave, The following series from Ilya and Boris provides TLS TX inline crypto offload. v1->v2: - Added IS_ENABLED(CONFIG_TLS_DEVICE) and a STATIC_KEY for icsk_clean_acked - File license fix - Fix spelling, comment by DaveW - Move memory allocations out of tls_set_device_offload and

[PATCH V5 net-next 04/14] net: Add TLS offload netdev ops

2018-03-27 Thread Saeed Mahameed
From: Ilya Lesokhin Add new netdev ops to add and delete tls context Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- include/linux/netdevice.h | 24 1 file changed, 24 insertions(+) diff --g

[PATCH V5 net-next 12/14] net/mlx5e: TLS, Add error statistics

2018-03-27 Thread Saeed Mahameed
From: Ilya Lesokhin Add statistics for rare TLS related errors. Since the errors are rare we have a counter per netdev rather then per SQ. Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +-

[PATCH V5 net-next 11/14] net/mlx5e: TLS, Add Innova TLS TX offload data path

2018-03-27 Thread Saeed Mahameed
From: Ilya Lesokhin Implement the TLS tx offload data path according to the requirements of the TLS generic NIC offload infrastructure. Special metadata ethertype is used to pass information to the hardware. Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Saeed Maham

[PATCH V5 net-next 10/14] net/mlx5e: TLS, Add Innova TLS TX support

2018-03-27 Thread Saeed Mahameed
From: Ilya Lesokhin Add NETIF_F_HW_TLS_TX capability and expose tlsdev_ops to work with the TLS generic NIC offload infrastructure. The NETIF_F_HW_TLS_TX capability will be added in the next patch. Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed --- d

[PATCH V5 net-next 03/14] net: Add Software fallback infrastructure for socket dependent offloads

2018-03-27 Thread Saeed Mahameed
From: Ilya Lesokhin With socket dependent offloads we rely on the netdev to transform the transmitted packets before sending them to the wire. When a packet from an offloaded socket is rerouted to a different device we need to detect it and do the transformation in software. Signed-off-by: Ilya

[PATCH V5 net-next 07/14] net/tls: Support TLS device offload with IPv6

2018-03-27 Thread Saeed Mahameed
From: Ilya Lesokhin Previously get_netdev_for_sock worked only with IPv4. Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed --- net/tls/tls_device.c | 51 ++- 1 file changed, 50 insertions(+), 1 deletion(-

  1   2   3   4   5   >