[PATCH net-next v2] net: sched: flower: refactor reoffload for concurrent access

2019-04-23 Thread Vlad Buslov
Recent changes that introduced unlocked flower did not properly account for case when reoffload is initiated concurrently with filter updates. To fix the issue, extend flower with 'hw_filters' list that is used to store filters that don't have 'skip_hw' flag set. Filter is added to the list when it

[PATCH 1/1] net: rds: exchange of 8K and 1M pool

2019-04-23 Thread Zhu Yanjun
Before the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), when the dirty_count is greater than 9/10 of max_items of 8K pool, 1M pool is used, Vice versa. After the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), the above is removed. When we make the following tests

Re: [PATCH] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX

2019-04-23 Thread Y Song
On Tue, Apr 23, 2019 at 6:02 PM Daniel T. Lee wrote: > > Oh, I've found what's the problem. > About the files you've mentioned, nothing seems to matter on my system. > But the problem is the order of the '-I' option matters. > > user@host:~/linux/samples/bpf $ make -n > > gcc -Wp,-MD,./sam

Re: [PATCH 1/1] be2net: Detach interface for avoiding a system crash

2019-04-23 Thread Firo
On 4/20/19 6:31 AM, Saeed Mahameed wrote: > On Fri, 2019-04-19 at 21:07 +0800, Firo wrote: >> >> On 4/19/19 2:17 AM, Saeed Mahameed wrote: >>> On Thu, 2019-04-18 at 15:05 +0800, Firo wrote: On 4/2/19 12:25 AM, Saeed Mahameed wrote: > On Mon, 2019-04-01 at 20:24 +0800, Firo Yang wrote: >

Re: [PATCH net-next] ipv6: Use result arg in fib_lookup_arg consistently

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 18:05:33 -0700 > From: David Ahern > > arg.result is sometimes used as fib6_result and sometimes used to > hold the rt6_info. Add rt6_info to fib6_result and make the use > of arg.result consistent through ipv6 rules. > > The rt6 entry is filled in for

Re: [PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 18:06:30 -0700 > From: David Ahern > > fib rule actions should return -EAGAIN for the rules to continue to the > next one. A recent change overwrote err with the lookup always returning > 0 (future change will make it more like IPv4) which means the rule

RE: [PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled

2019-04-23 Thread Bai, Haiqing
Actually I know this clearly, just bring your attention on this issue , I think this is a mechanism issue. Though we have no good idea to fix this, but I believe firmly that you kernel experts must have some smart and beautiful solution. Thanks. -Original Message- From: David Miller [m

Re: [PATCH v2 net-next] mlxsw: spectrum_router: Prevent ipv6 gateway with v4 route via replace and append

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 16:03:29 -0700 > From: David Ahern > > mlxsw currently does not support v6 gateways with v4 routes. Commit > 19a9d136f198 ("ipv4: Flag fib_info with a fib_nh using IPv6 gateway") > prevents a route from being added, but nothing stops the replace or > app

Re: [PATCH net-next v2 0/5] Taprio qdisc fixes

2019-04-23 Thread David Miller
From: Andre Guedes Date: Tue, 23 Apr 2019 12:44:19 -0700 > I'm re-sending this series, now with the "net-next" prefix in the subject. > > The only change from the previous version is in patch 3. As suggested by Cong > Wang, it removes the !entry check within should_restart_cycle() since it is >

Re: [PATCH net-next] net: Change nhc_flags to unsigned char

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 08:48:09 -0700 > From: David Ahern > > nhc_flags holds the RTNH_F flags for a given nexthop (fib{6}_nh). > All of the RTNH_F_ flags fit in an unsigned char, and since the API to > userspace (rtnh_flags and lower byte of rtm_flags) is 1 byte it can not >

Re: [PATCH net-next] lwtunnel: Pass encap and encap type attributes to lwtunnel_fill_encap

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 08:23:41 -0700 > From: David Ahern > > Currently, lwtunnel_fill_encap hardcodes the encap and encap type > attributes as RTA_ENCAP and RTA_ENCAP_TYPE, respectively. The nexthop > objects want to re-use this code but the encap attributes passed to > users

Re: [PATCH 1/1, v2] net: socionext: replace napi_alloc_frag with the netdev variant on init

2019-04-23 Thread David Miller
From: Ilias Apalodimas Date: Tue, 23 Apr 2019 09:01:41 +0300 > The netdev variant is usable on any context since it disables interrupts. > The napi variant of the call should only be used within softirq context. > Replace napi_alloc_frag on driver init with the correct netdev_alloc_frag > call >

Re: [PATCH 0/5] isdn: deprecate non-mISDN drivers

2019-04-23 Thread David Miller
From: Arnd Bergmann Date: Tue, 23 Apr 2019 17:11:32 +0200 > When isdn4linux came up in the context of another patch series, I > remembered that we had discussed removing it a while ago. This seems long overdue to me. Could you please respin against net-next and I'll just apply this? Thank you.

Re: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers

2019-04-23 Thread David Ahern
On 4/23/19 12:36 AM, Ido Schimmel wrote: > From: Ido Schimmel > > With current number of spaces the output is mangled if the shared buffer > is congested. > > Before: > > # devlink sb occupancy show swp32 > swp32: > pool: 0:10220112/10222128 1: 0/0 2: 0/0 >

Re: [PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled

2019-04-23 Thread David Miller
From: Haiqing Bai Date: Tue, 23 Apr 2019 17:00:23 +0800 > diff --git a/net/socket.c b/net/socket.c > index 8255f5bda0aa..7927c2bcad65 100644 > --- a/net/socket.c > +++ b/net/socket.c > @@ -1339,6 +1339,11 @@ int __sock_create(struct net *net, int family, int > type, int protocol, > if (typ

Re: [Patch net v2 1/3] bluetooth: validate HCI_EVENT_PKT packet carefully

2019-04-23 Thread Cong Wang
On Tue, Apr 23, 2019 at 12:42 PM Marcel Holtmann wrote: > > Hi Cong, > > > hci_event_packet() blindly assumes all packets are sane, at least > > for packets allocated via vhci_get_user() path this is not true. > > We have to check if we access skb data out-of-bound with > > pskb_may_pull() before

[PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN

2019-04-23 Thread David Ahern
From: David Ahern fib rule actions should return -EAGAIN for the rules to continue to the next one. A recent change overwrote err with the lookup always returning 0 (future change will make it more like IPv4) which means the rules stopped at the first (e.g., local table lookup only). Catch and re

[PATCH net-next] ipv6: Use result arg in fib_lookup_arg consistently

2019-04-23 Thread David Ahern
From: David Ahern arg.result is sometimes used as fib6_result and sometimes used to hold the rt6_info. Add rt6_info to fib6_result and make the use of arg.result consistent through ipv6 rules. The rt6 entry is filled in for lookups returning a dst_entry, but not for direct fib_lookups that just

Re: [PATCH] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX

2019-04-23 Thread Daniel T. Lee
Oh, I've found what's the problem. About the files you've mentioned, nothing seems to matter on my system. But the problem is the order of the '-I' option matters. user@host:~/linux/samples/bpf $ make -n gcc -Wp,-MD,./samples/bpf/.sockex3_user.o.d -Wall -Wmissing-prototypes -Wstrict-proto

[PATCH v3 net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-23 Thread Eric Dumazet
After commit 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook"), rxrpc_input_packet() is directly called from lockless UDP receive path, under rcu_read_lock() protection. It must therefore use RCU rules : - udp_sk->sk_user_data can be cleared at any point in this function. rcu_dereference_sk_us

Re: [PATCH v2 net-next 11/16] net: aquantia: extract timer cb into work job

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 13:17:55 +, Igor Russkikh wrote: > Service timer callback fetches statistics from FW and that may cause > a long delay in error cases. We also now need to use fw mutex > to prevent concurrent access to FW, thus - extract that logic > from timer callback into the job in the s

Re: [PATCH net-next 0/3] ipv6: fib6_ref conversion to refcount_t

2019-04-23 Thread David Miller
From: Eric Dumazet Date: Mon, 22 Apr 2019 18:35:00 -0700 > We are chasing use-after-free in IPv6 that could have their origin > in fib6_ref 0 -> 1 transitions. > > This patch series should help finding the root causes if these > illegal transitions ever happen. Series applied, thanks Eric.

Re: [PATCH v2 net-next 00/14] Make DSA tag drivers kernel modules

2019-04-23 Thread David Miller
From: Andrew Lunn Date: Tue, 23 Apr 2019 02:22:43 +0200 > istorically, DSA tag drivers have been compiled into the kernel as > part of the DSA core. With the growing number of tag drivers, it makes > sense to allow this driver code to be compiled as a module, and loaded > on demand. > > v2 > --

Re: [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-23 Thread Stanislav Fomichev
On 04/23, Jakub Kicinski wrote: > On Tue, 23 Apr 2019 16:22:00 -0700, Stanislav Fomichev wrote: > > +static int query_flow_dissector(struct bpf_attach_info *attach_info) > > +{ > > + __u32 prog_ids[1] = {0}; > > + __u32 prog_cnt = ARRAY_SIZE(prog_ids); > > + __u32 attach_flags; > > + int fd

Re: [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-23 Thread Stanislav Fomichev
On 04/23, Jakub Kicinski wrote: > On Tue, 23 Apr 2019 16:21:59 -0700, Stanislav Fomichev wrote: > > + rcu_read_lock(); > > + attached = rcu_dereference(net->flow_dissector_prog); > > + if (attached) { > > + cnt = 1; > > + if (prog_ids && > > + copy_to_user(pr

Re: [pull request][net-next V2 00/13] Mellanox, mlx5 RX and XDP improvements

2019-04-23 Thread David Miller
From: Jakub Kicinski Date: Tue, 23 Apr 2019 16:25:38 -0700 > On Tue, 23 Apr 2019 12:14:47 -0700, Saeed Mahameed wrote: >> Hi Dave, >> >> This series includes updates to mlx5e driver RX data path and some >> significant XDP RX/TX improvements to overcome/mitigate HW and PCIE >> bottlenecks. >> >

Re: [PATCH v2 net-next 00/14] Make DSA tag drivers kernel modules

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 02:22:43 +0200, Andrew Lunn wrote: > istorically, DSA tag drivers have been compiled into the kernel as H^ > part of the DSA core. With the growing number of tag drivers, it makes > sense to allow this driver code to be compiled as a module, and loaded > on demand. Other than

Re: [PATCH v2 net-next 06/14] dsa: Add boilerplate helper to register DSA tag driver modules

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 02:22:49 +0200, Andrew Lunn wrote: > +/** > + * module_dsa_tag_drivers() - Helper macro for registering DSA tag > + * drivers > + * @__ops_array: Array of tag driver strucutres > + * > + * Helper macro for DSA tag drivers which do not do anything special > + * in module init/exi

Re: [PATCH 4.19 stable v2 0/3] net: ip6 defrag: backport fixes

2019-04-23 Thread Sasha Levin
On Tue, Apr 23, 2019 at 10:25:30AM -0700, Peter Oskolkov wrote: Lars Persson reported that a label was unused in the 4.14 version of this patchset, and the issue was present in the 4.19 patchset as well, so I'm sending a v2 that fixes it. The original 4.19 patchset queued for stable is OK, and

Re: [PATCH bpf-next v2 0/2] update skb->protocol in bpf_skb_net_grow

2019-04-23 Thread Daniel Borkmann
On 04/23/2019 08:43 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Expand the tc tunnel encap support with protocols that convert the > network layer protocol, such as 6in4. This is analogous to existing > support in bpf_skb_proto_6_to_4. > > Patch 1 implements the straightforward logi

Re: [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 16:22:00 -0700, Stanislav Fomichev wrote: > +static int query_flow_dissector(struct bpf_attach_info *attach_info) > +{ > + __u32 prog_ids[1] = {0}; > + __u32 prog_cnt = ARRAY_SIZE(prog_ids); > + __u32 attach_flags; > + int fd; > + int err; reverse christmas

Re: [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 16:21:59 -0700, Stanislav Fomichev wrote: > + rcu_read_lock(); > + attached = rcu_dereference(net->flow_dissector_prog); > + if (attached) { > + cnt = 1; > + if (prog_ids && > + copy_to_user(prog_ids, &attached->aux->id, sizeof

Re: [PATCH] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX

2019-04-23 Thread Y Song
On Tue, Apr 23, 2019 at 1:26 PM Daniel T. Lee wrote: > > Currently, building bpf samples will cause the following error. > > ./tools/lib/bpf/bpf.h:132:27: error: 'UINT32_MAX' undeclared here (not in > a function) .. > #define BPF_LOG_BUF_SIZE (UINT32_MAX >> 8) /* verifier maximum in > k

Re: [pull request][net-next V2 00/13] Mellanox, mlx5 RX and XDP improvements

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 12:14:47 -0700, Saeed Mahameed wrote: > Hi Dave, > > This series includes updates to mlx5e driver RX data path and some > significant XDP RX/TX improvements to overcome/mitigate HW and PCIE > bottlenecks. > > For more information please see tag log below. > > Please pull and

Re: [PATCH bpf-next 0/2] Two libbpf fixes

2019-04-23 Thread Andrii Nakryiko
On Tue, Apr 23, 2019 at 3:46 PM Daniel Borkmann wrote: > > Two small fixes in relation to global data handling. Thanks! > > Daniel Borkmann (2): > bpf, libbpf: handle old kernels more graceful wrt global data sections > bpf, libbpf: fix segfault in bpf_object__init_maps' pr_debug statement > >

[PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

2019-04-23 Thread Stanislav Fomichev
target_fd is target namespace. If there is a flow dissector BPF program attached to that namespace, its (single) id is returned. Signed-off-by: Stanislav Fomichev --- include/linux/skbuff.h| 8 kernel/bpf/syscall.c | 2 ++ net/core/flow_dissector.c | 36 ++

[PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-23 Thread Stanislav Fomichev
Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \ /sys/fs/bpf/flow type flow_dissector \

[PATCH v2 net-next] mlxsw: spectrum_router: Prevent ipv6 gateway with v4 route via replace and append

2019-04-23 Thread David Ahern
From: David Ahern mlxsw currently does not support v6 gateways with v4 routes. Commit 19a9d136f198 ("ipv4: Flag fib_info with a fib_nh using IPv6 gateway") prevents a route from being added, but nothing stops the replace or append. Add a catch for them too. $ ip ro add 172.16.2.0/24 via 10.9

[PATCH bpf-next 1/2] bpf, libbpf: handle old kernels more graceful wrt global data sections

2019-04-23 Thread Daniel Borkmann
Andrii reported a corner case where e.g. global static data is present in the BPF ELF file in form of .data/.bss/.rodata section, but without any relocations to it. Such programs could be loaded before commit d859900c4c56 ("bpf, libbpf: support global data/bss/rodata sections"), whereas afterwards

[PATCH bpf-next 0/2] Two libbpf fixes

2019-04-23 Thread Daniel Borkmann
Two small fixes in relation to global data handling. Thanks! Daniel Borkmann (2): bpf, libbpf: handle old kernels more graceful wrt global data sections bpf, libbpf: fix segfault in bpf_object__init_maps' pr_debug statement tools/lib/bpf/libbpf.c | 105 +++

[PATCH bpf-next 2/2] bpf, libbpf: fix segfault in bpf_object__init_maps' pr_debug statement

2019-04-23 Thread Daniel Borkmann
Ran into it while testing; in bpf_object__init_maps() data can be NULL in the case where no map section is present. Therefore we simply cannot access data->d_size before NULL test. Move the pr_debug() where it's safe to access. Fixes: d859900c4c56 ("bpf, libbpf: support global data/bss/rodata sect

Re: [PATCH v2 net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-23 Thread Eric Dumazet
On 04/23/2019 03:06 PM, David Howells wrote: > Eric Dumazet wrote: > >> @@ -1161,19 +1161,15 @@ int rxrpc_extract_header(struct rxrpc_skb_priv *sp, >> struct sk_buff *skb) >> * handle data received on the local endpoint >> * - may be called in interrupt context >> * >> - * The socket is

Re: [PATCH v2 net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-23 Thread David Howells
Eric Dumazet wrote: > @@ -1161,19 +1161,15 @@ int rxrpc_extract_header(struct rxrpc_skb_priv *sp, > struct sk_buff *skb) > * handle data received on the local endpoint > * - may be called in interrupt context > * > - * The socket is locked by the caller and this prevents the socket from be

Re: [PATCH bpf-next v2 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-23 Thread Yonghong Song
On 4/23/19 11:43 AM, Willem de Bruijn wrote: > From: Willem de Bruijn > > So far, all BPF tc tunnel testcases encapsulate in the same network > protocol. Add an encap testcase that requires updating skb->protocol. > > The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel. > Verify

[PATCH net-next v2 3/5] net: sched: taprio: Remove should_restart_cycle()

2019-04-23 Thread Andre Guedes
The 'entry' argument from should_restart_cycle() cannot be NULL since it is already checked by the caller so the WARN_ON() within should_ restart_cycle() could be removed. By doing that, that function becomes a dummy wrapper on list_is_last() so this patch simply gets rid of it and call list_is_la

[PATCH net-next v2 1/5] net: sched: taprio: Remove pointless variable assigment

2019-04-23 Thread Andre Guedes
This patch removes a pointless variable assigment in taprio_change(). The 'err' variable is not used from this assignment to the next one so this patch removes it. Signed-off-by: Andre Guedes --- net/sched/sch_taprio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/sched/sch_taprio.c b/n

[PATCH net-next v2 4/5] net: sched: taprio: Fix taprio_peek()

2019-04-23 Thread Andre Guedes
While traversing taprio's children qdisc list, if the gate is closed for a given traffic class, we should continue traversing the list since the remaining qdiscs may have skb ready for transmission. This patch also takes this opportunity and changes the function to use the TAPRIO_ALL_GATES_OPEN ma

[PATCH net-next v2 2/5] net: sched: taprio: Refactor taprio_get_start_time()

2019-04-23 Thread Andre Guedes
This patch does a code refactoring to taprio_get_start_time() function to improve readability and report error properly. If 'base' time is later than 'now', the start time is equal to 'base' and taprio_get_start_time() is done. That's the natural case so we move that code to the beginning of the f

[PATCH net-next v2 0/5] Taprio qdisc fixes

2019-04-23 Thread Andre Guedes
Hi all, I'm re-sending this series, now with the "net-next" prefix in the subject. The only change from the previous version is in patch 3. As suggested by Cong Wang, it removes the !entry check within should_restart_cycle() since it is already checked by the caller. As a side effect, that functi

[PATCH net-next v2 5/5] net: sched: taprio: Fix taprio_dequeue()

2019-04-23 Thread Andre Guedes
In case we don't have 'guard' or 'budget' to transmit the skb, we should continue traversing the qdisc list since the remaining guard/budget might be enough to transmit a skb from other children qdiscs. Fixes: 5a781ccbd19e (“tc: Add support for configuring the taprio scheduler”) Signed-off-by: And

[PATCH v2] net: mvneta: Switch to using devm_alloc_etherdev_mqs

2019-04-23 Thread Rosen Penev
It allows some of the code to be simplified. Tested on Turris Omnia. Signed-off-by: Rosen Penev --- drivers/net/ethernet/marvell/mvneta.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta

[PATCH] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX

2019-04-23 Thread Daniel T. Lee
Currently, building bpf samples will cause the following error. ./tools/lib/bpf/bpf.h:132:27: error: 'UINT32_MAX' undeclared here (not in a function) .. #define BPF_LOG_BUF_SIZE (UINT32_MAX >> 8) /* verifier maximum in kernels <= 5.1 */ ^ ./samples/bpf

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Alexander Duyck
On Tue, Apr 23, 2019 at 11:25 AM Jesper Dangaard Brouer wrote: > > On Tue, 23 Apr 2019 10:27:32 -0700 > Alexander Duyck wrote: > > > On Tue, Apr 23, 2019 at 9:42 AM Saeed Mahameed wrote: > > > > > > On Tue, 2019-04-23 at 08:21 -0700, Alexander Duyck wrote: > > > > On Tue, Apr 23, 2019 at 6:23 AM

Re: [PATCH net-next 1/3] ipv6: fib6_info_destroy_rcu() cleanup

2019-04-23 Thread David Ahern
On 4/23/19 11:40 AM, Eric Dumazet wrote: > I believe we have a problem with f6i->rt6i_pcpu rules : > > It seems concurrent lookups can happily use it while > the call_rcu() is ongoing before fib6_info_destroy_rcu() is finally called. > > We lack proper RCU rules here. Concurrent lookups should be

Re: [Patch net v2 1/3] bluetooth: validate HCI_EVENT_PKT packet carefully

2019-04-23 Thread Marcel Holtmann
Hi Cong, > hci_event_packet() blindly assumes all packets are sane, at least > for packets allocated via vhci_get_user() path this is not true. > We have to check if we access skb data out-of-bound with > pskb_may_pull() before each skb->data dereference on RX path. > > Reported-and-tested-by: sy

Re: [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-23 Thread Cong Wang
On Tue, Apr 23, 2019 at 12:21 PM Guedes, Andre wrote: > > > > On Apr 22, 2019, at 12:36 PM, Cong Wang wrote: > > Yeah, so we can just remove it. :) > > Fine by me. In that case, the function should_restart_cycle() will be just a > dummy wrapper on list_is_last() so we should probably get rid of

Re: [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-23 Thread Guedes, Andre
> On Apr 22, 2019, at 12:36 PM, Cong Wang wrote: > > On Mon, Apr 22, 2019 at 12:24 PM Guedes, Andre wrote: >> >> >>> On Apr 22, 2019, at 11:07 AM, Cong Wang wrote: >>> >>> On Mon, Apr 22, 2019 at 11:04 AM Cong Wang wrote: On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes wrot

Re: [PATCH v2 net-next 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-23 Thread Andrew Lunn
> +static u32 aq_hwmon_temp_config[] = { > + HWMON_T_INPUT | HWMON_T_LABEL, > + 0, It would be nice to also have HWMON_T_MAX | HWMON_T_MIN | HWMON_T_CRIT | HWMON_T_LCRIT | which the PHY probably has. At gives some degree of context. A temperature on its own of say 65C is

[net-next V2 07/13] net/mlx5e: Report mlx5e_xdp_set errors

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy If the channels fail to reopen after setting an XDP program, return the error code instead of 0. A proper fix is still needed, as now any error while reopening the channels brings the interface down. This patch only adds error reporting. Signed-off-by: Maxim Mikityanskiy

[net-next V2 05/13] net/mlx5e: XDP, Inline small packets into the TX MPWQE in XDP xmit flow

2019-04-23 Thread Saeed Mahameed
From: Shay Agroskin Upon high packet rate with multiple CPUs TX workloads, much of the HCA's resources are spent on prefetching TX descriptors, thus affecting transmission rates. This patch comes to mitigate this problem by moving some workload to the CPU and reducing the HW data prefetch overhea

[net-next V2 13/13] net/mlx5e: Use #define for the WQE wait timeout constant

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy Create a #define for the timeout of mlx5e_wait_for_min_rx_wqes to clarify the meaning of a magic number. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++--- 1

[net-next V2 06/13] net/mlx5e: Remove unused parameter

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy params is unused in mlx5e_init_di_list. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/e

[net-next V2 12/13] net/mlx5e: Remove unused rx_page_reuse stat

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy Remove the no longer used page_reuse stat of RQs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 -- 2 fi

[net-next V2 09/13] net/mlx5e: Add an underflow warning comment

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy mlx5e_mpwqe_get_log_rq_size calculates the number of WQEs (N) based on the requested number of frames in the RQ (F) and the number of packets per WQE (P). It ensures that N is not less than the minimum number of WQEs in an RQ (N_min). Arithmetically, it means that F / P >

[net-next V2 10/13] net/mlx5e: Remove unused parameter

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy mdev is unused in mlx5e_rx_is_linear_skb. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 7 +++ drivers/net/ethernet/mellanox/mlx5/core/en/params.h | 3 +-- dri

[net-next V2 08/13] net/mlx5e: Move parameter calculation functions to en/params.c

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy This commit moves the parameter calculation functions to a separate file for better modularity and code sharing with future features. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Mak

[net-next V2 11/13] net/mlx5e: Take HW interrupt trigger into a function

2019-04-23 Thread Saeed Mahameed
From: Maxim Mikityanskiy mlx5e_trigger_irq posts a NOP to the ICO SQ just to trigger an IRQ and enter the NAPI poll on the right CPU according to the affinity. Use it in mlx5e_activate_rq. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/n

[net-next V2 03/13] net/mlx5e: XDP, Enhance RQ indication for XDP redirect flush

2019-04-23 Thread Saeed Mahameed
From: Tariq Toukan The XDP redirect flush indication belongs to the receive queue, not to its XDP send queue. For this, use a new bit on rq->flags. Signed-off-by: Tariq Toukan Reviewed-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +

[net-next V2 04/13] net/mlx5e: XDP, Add TX MPWQE session counter

2019-04-23 Thread Saeed Mahameed
From: Shay Agroskin This counter tracks how many TX MPWQE sessions are started in XDP SQ in XDP TX/REDIRECT flow. It counts per-channel and global stats. Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++ drivers/net/ether

[net-next V2 02/13] net/mlx5e: XDP, Fix shifted flag index in RQ bitmap

2019-04-23 Thread Saeed Mahameed
From: Tariq Toukan Values in enum mlx5e_rq_flag are used as bit indixes. Intention was to use them with no BIT(i) wrapping. No functional bug fix here, as the same (shifted)flag bit is used for all set, test, and clear operations. Fixes: 121e89275471 ("net/mlx5e: Refactor RQ XDP_TX indication")

[pull request][net-next V2 00/13] Mellanox, mlx5 RX and XDP improvements

2019-04-23 Thread Saeed Mahameed
Hi Dave, This series includes updates to mlx5e driver RX data path and some significant XDP RX/TX improvements to overcome/mitigate HW and PCIE bottlenecks. 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 wit

[net-next V2 01/13] net/mlx5e: RX, Support multiple outstanding UMR posts

2019-04-23 Thread Saeed Mahameed
From: Tariq Toukan The buffers mapping of the Multi-Packet WQEs (of Striding RQ) is done via UMR posts, one UMR WQE per an RX MPWQE. A single MPWQE is capable of serving many incoming packets, usually larger than the budget of a single napi cycle. Hence, posting a single UMR WQE per napi cycle (

Re: [patch net-next v2 15/16] netdevsim: move netdev creation/destruction to dev probe

2019-04-23 Thread Jiri Pirko
Tue, Apr 23, 2019 at 07:05:28PM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 23 Apr 2019 09:20:14 +0200, Jiri Pirko wrote: >> Mon, Apr 22, 2019 at 09:31:33PM CEST, jakub.kicin...@netronome.com wrote: >> >On Sat, 20 Apr 2019 12:29:21 +0200, Jiri Pirko wrote: >> >> diff --git a/tools/testing/

Re: [PATCH v2 net-next 01/16] net: aquantia: add infrastructure to readout chip temperature

2019-04-23 Thread Andrew Lunn
On Tue, Apr 23, 2019 at 01:17:29PM +, Igor Russkikh wrote: > From: Yana Esina > > Ability to read the chip temperature from memory > via hwmon interface > > Signed-off-by: Yana Esina > Signed-off-by: Nikita Danilov > Signed-off-by: Igor Russkikh > --- > .../net/ethernet/aquantia/atlantic

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-23 Thread Jiri Pirko
Tue, Apr 23, 2019 at 07:06:42PM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 23 Apr 2019 08:29:23 +0200, Jiri Pirko wrote: >> Mon, Apr 22, 2019 at 09:23:02PM CEST, jakub.kicin...@netronome.com wrote: >> >On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: >> >> +static ssize_t del_device_

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Saeed Mahameed
On Tue, 2019-04-23 at 20:24 +0200, Jesper Dangaard Brouer wrote: > On Tue, 23 Apr 2019 10:27:32 -0700 > Alexander Duyck wrote: > > > On Tue, Apr 23, 2019 at 9:42 AM Saeed Mahameed > > wrote: > > > On Tue, 2019-04-23 at 08:21 -0700, Alexander Duyck wrote: > > > > On Tue, Apr 23, 2019 at 6:23 AM

[PATCH bpf-next v2 1/2] bpf: update skb->protocol in bpf_skb_net_grow

2019-04-23 Thread Willem de Bruijn
From: Willem de Bruijn Some tunnels, like sit, change the network protocol of packet. If so, update skb->protocol to match the new type. Signed-off-by: Willem de Bruijn Reviewed-by: Alan Maguire Acked-by: Yonghong Song --- net/core/filter.c | 8 1 file changed, 8 insertions(+) diff

[PATCH bpf-next v2 0/2] update skb->protocol in bpf_skb_net_grow

2019-04-23 Thread Willem de Bruijn
From: Willem de Bruijn Expand the tc tunnel encap support with protocols that convert the network layer protocol, such as 6in4. This is analogous to existing support in bpf_skb_proto_6_to_4. Patch 1 implements the straightforward logic Patch 2 tests it with a 6in4 tunnel Changes v1->v2 - impr

Re: [PATCH net-next 10/19] net: ethernet: ti: ale: use define for host port in cpsw_ale_set_allmulti()

2019-04-23 Thread Andrew Lunn
On Tue, Apr 23, 2019 at 04:09:01PM +0300, Grygorii Strashko wrote: > Use ALE_PORT_HOST define for host port in cpsw_ale_set_allmulti() instead > of constants. > > Signed-off-by: Grygorii Strashko Reviewed-by: Andrew Lunn Andrew

[PATCH bpf-next v2 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-23 Thread Willem de Bruijn
From: Willem de Bruijn So far, all BPF tc tunnel testcases encapsulate in the same network protocol. Add an encap testcase that requires updating skb->protocol. The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel. Verify that bpf_skb_net_grow correctly updates skb->protocol to sele

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Jesper Dangaard Brouer
On Tue, 23 Apr 2019 10:27:32 -0700 Alexander Duyck wrote: > On Tue, Apr 23, 2019 at 9:42 AM Saeed Mahameed wrote: > > > > On Tue, 2019-04-23 at 08:21 -0700, Alexander Duyck wrote: > > > On Tue, Apr 23, 2019 at 6:23 AM Jesper Dangaard Brouer > > > wrote: > > > > On Mon, 22 Apr 2019 19:46:47

Re: [PATCH net] packet: validate address length if non-zero

2019-04-23 Thread Willem de Bruijn
On Tue, Apr 23, 2019 at 1:21 PM Willem de Bruijn wrote: > > On Tue, Apr 23, 2019 at 1:04 PM Willem de Bruijn > wrote: > > > > On Tue, Apr 23, 2019 at 11:52 AM David Laight > > wrote: > > > > > > From: Willem de Bruijn > > > > Sent: 23 April 2019 16:08 > > > > On Tue, Apr 23, 2019 at 5:59 AM Dav

[PATCH 4.14 stable v2 5/5] net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

2019-04-23 Thread Peter Oskolkov
[ Upstream commit 997dd96471641e147cb2c33ad54284000d0f5e35 ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.14 stable v2 3/5] ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

2019-04-23 Thread Peter Oskolkov
From: Florian Westphal [ Upstream commit 70b095c84326640eeacfd69a411db8fc36e8ab1a ] IPV6=m DEFRAG_IPV6=m CONNTRACK=y yields: net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get': net/netfilter/nf_conntrack_proto.c:802: undefined reference to `nf_defrag_ipv6_enable' net/netfilte

[PATCH 4.14 stable v2 4/5] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-04-23 Thread Peter Oskolkov
[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.14 stable v2 2/5] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-23 Thread Peter Oskolkov
[ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] This is a refactoring patch: without changing runtime behavior, it moves rbtree-related code from IPv4-specific files/functions into .h/.c defrag files shared with IPv6 defragmentation code. v2: make handling of overlapping packets matc

Re: [PATCH v8 0/2] net: phy: mscc: Improvements to VSC8514 PHY driver.

2019-04-23 Thread David Miller
From: Date: Mon, 22 Apr 2019 11:49:58 + > The VSC8514 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX, > 1000BASE-X, can communicate with the MAC via QSGMII. > The MAC interface protocol for each port within QSGMII can > be either 1000BASE-X or SGMII, if the QSGMII

[PATCH 4.14 stable v2 0/5] net: ip6 defrag: backport fixes

2019-04-23 Thread Peter Oskolkov
Lars Persson reported that a label was unused in the previous version of this patchset, so I'm sending a v2 that fixes it. Sorry for the mess/v2. v2 changes: handle overlapping fragments the way it is done upstream. This is a backport of a 5.1rc patchset: https://patchwork.ozlabs.org/cover/10

[PATCH 4.14 stable v2 1/5] ipv6: frags: fix a lockdep false positive

2019-04-23 Thread Peter Oskolkov
From: Eric Dumazet [ Upstream commit 415787d7799f4fccbe8d49cb0b8e5811be6b0389 ] lockdep does not know that the locks used by IPv4 defrag and IPv6 reassembly units are of different classes. It complains because of following chains : 1) sch_direct_xmit()(lock txq->_xmit_lock) dev_har

Re: [PATCH 2/2] spi: ST ST95HF NFC: declare missing of table

2019-04-23 Thread David Miller
From: Daniel Gomez Date: Mon, 22 Apr 2019 21:08:04 +0200 > Add missing table for SPI driver relying on SPI > device match since compatible is in a DT binding or in a DTS. > > Before this patch: > modinfo drivers/nfc/st95hf/st95hf.ko | grep alias > alias: spi:st95hf > > After this patc

Re: [PATCH 1/2] spi: Micrel eth switch: declare missing of table

2019-04-23 Thread David Miller
From: Daniel Gomez Date: Mon, 22 Apr 2019 21:08:03 +0200 > Add missing table for SPI driver relying on SPI > device match since compatible is in a DT binding or in a DTS. > > Before this patch: > modinfo drivers/net/phy/spi_ks8995.ko | grep alias > alias: spi:ksz8795 > alias:

Re: [PATCH net-next 1/3] ipv6: fib6_info_destroy_rcu() cleanup

2019-04-23 Thread Eric Dumazet
On Tue, Apr 23, 2019 at 9:33 AM David Ahern wrote: > > On 4/22/19 7:35 PM, Eric Dumazet wrote: > > We do not need to clear f6i->rt6i_exception_bucket right before > > freeing f6i. > > > > Note that f6i->rt6i_exception_bucket is properly protected by > > f6i->exception_bucket_flushed being set to o

Re: [PATCH 1/2] spi: Micrel eth switch: declare missing of table

2019-04-23 Thread Heiner Kallweit
On 23.04.2019 14:28, Andrew Lunn wrote: >> I wonder why this SPI driver is under drivers/net/phy. Just because >> the SPI IP is found on an ethernet switch chip? And even then it >> would be wrong, I see no link to a PHY at all. I'd say the driver >> belongs to drivers/spi. Shouldn't we move it? >

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Alexander Duyck
On Tue, Apr 23, 2019 at 9:42 AM Saeed Mahameed wrote: > > On Tue, 2019-04-23 at 08:21 -0700, Alexander Duyck wrote: > > On Tue, Apr 23, 2019 at 6:23 AM Jesper Dangaard Brouer > > wrote: > > > On Mon, 22 Apr 2019 19:46:47 -0700 > > > Jakub Kicinski wrote: > > > > > > > On Mon, 22 Apr 2019 15:32:5

Re: ipsec tunnel performance degrade

2019-04-23 Thread David Miller
From: Florian Westphal Date: Tue, 23 Apr 2019 18:25:21 +0200 > Vakul Garg wrote: >> > Vakul Garg wrote: >> > > > Do you use xfrm interfaces? >> > > >> > > I don't think so. I use setkey to create policies/SAs. >> > > Can you please give me some hint about it? >> > >> > Then you're not using ip

[PATCH 4.19 stable v2 3/3] net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

2019-04-23 Thread Peter Oskolkov
[ Upstream commit 997dd96471641e147cb2c33ad54284000d0f5e35 ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.19 stable v2 1/3] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-23 Thread Peter Oskolkov
[ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] This is a refactoring patch: without changing runtime behavior, it moves rbtree-related code from IPv4-specific files/functions into .h/.c defrag files shared with IPv6 defragmentation code. v2: make handling of overlapping packets matc

[PATCH 4.19 stable v2 2/3] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-04-23 Thread Peter Oskolkov
[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.19 stable v2 0/3] net: ip6 defrag: backport fixes

2019-04-23 Thread Peter Oskolkov
Lars Persson reported that a label was unused in the 4.14 version of this patchset, and the issue was present in the 4.19 patchset as well, so I'm sending a v2 that fixes it. The original 4.19 patchset queued for stable is OK, and can be used as is, but this v2 is a bit better: it fixes the unuse

Re: [PATCH net] packet: validate address length if non-zero

2019-04-23 Thread Willem de Bruijn
On Tue, Apr 23, 2019 at 1:04 PM Willem de Bruijn wrote: > > On Tue, Apr 23, 2019 at 11:52 AM David Laight wrote: > > > > From: Willem de Bruijn > > > Sent: 23 April 2019 16:08 > > > On Tue, Apr 23, 2019 at 5:59 AM David Laight > > > wrote: > > > > > > > > From: Willem de Bruijn > > > > > Sent:

  1   2   >