packet deadline and process scheduling

2020-08-27 Thread S.V.R.Anand
Hi, In the control loop application I am trying to build, an incoming message from the network will have a deadline before which it should be delivered to the receiver process. This essentially calls for a way of scheduling this process based on the deadline information contained in the message.

[PATCH bpf-next v2 0/2] bpf: avoid iterating duplicated files for task_file iterator

2020-08-27 Thread Yonghong Song
Commit e679654a704e ("bpf: Fix a rcu_sched stall issue with bpf task/task_file iterator") introduced rate limiting in bpf_seq_read() to fix a case where traversing too many tasks and files (tens of millions of files) may cause kernel rcu stall. But rate limiting won't reduce the amount of work to t

[PATCH bpf-next v2 1/2] bpf: avoid iterating duplicated files for task_file iterator

2020-08-27 Thread Yonghong Song
Currently, task_file iterator iterates all files from all tasks. This may potentially visit a lot of duplicated files if there are many tasks sharing the same files, e.g., typical pthreads where these pthreads and the main thread are sharing the same files. This patch changed task_file iterator to

[PATCH bpf-next v2 2/2] selftests/bpf: test task_file iterator without visiting pthreads

2020-08-27 Thread Yonghong Song
Modified existing bpf_iter_test_file.c program to check whether all accessed files from the main thread or not. Modified existing bpf_iter_test_file program to check whether all accessed files from the main thread or not. $ ./test_progs -n 4 ... #4/7 task_file:OK ... #4 bpf_iter:OK Sum

[PATCH][next][v2] iavf: use kvzalloc instead of kzalloc for rx/tx_bi buffer

2020-08-27 Thread Li RongQing
when changes the rx/tx ring to 4096, kzalloc may fail due to a temporary shortage on slab entries. so using kvmalloc to allocate this memory as there is no need that this memory area is physical continuously. and using __GFP_RETRY_MAYFAIL to allocate from kmalloc as far as possible, which can red

Re: [PATCH v2 4/4] xfrm: clone whole liftime_cur structure in xfrm_do_migrate

2020-08-27 Thread Steffen Klassert
On Wed, Aug 26, 2020 at 09:40:40PM +0200, Antony Antony wrote: > When we clone state only add_time was cloned. It missed values like > bytes, packets. Now clone the all members of the structure. > > Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint > address(es)") > Signed-o

[PATCH bpf-next] bpf: make bpf_link_info.iter similar to bpf_iter_link_info

2020-08-27 Thread Yonghong Song
bpf_link_info.iter is used by link_query to return bpf_iter_link_info to user space. Fields may be different ,e.g., map_fd vs. map_id, so we cannot reuse the exact structure. But make them similar, e.g., struct bpf_link_info { /* common fields */ union { struct { ... } raw_trace

Re: [PATCH v2 3/4] xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate

2020-08-27 Thread Steffen Klassert
On Wed, Aug 26, 2020 at 09:40:09PM +0200, Antony Antony wrote: > XFRMA_SEC_CTX was not cloned from the old to the new. > Migrate this attribute during XFRMA_MSG_MIGRATE > > v1->v2: > - return -ENOMEM on error > > Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint > address(e

RE: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-08-27 Thread Parav Pandit
> From: netdev-ow...@vger.kernel.org On > Behalf Of Parav Pandit > Sent: Friday, August 28, 2020 9:57 AM > > > > From: Jakub Kicinski > > Sent: Friday, August 28, 2020 3:12 AM > > > > On Thu, 27 Aug 2020 20:15:01 + Parav Pandit wrote: > > > > From: Jakub Kicinski > > > > > > > > I find

RE: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-08-27 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Friday, August 28, 2020 3:12 AM > > On Thu, 27 Aug 2020 20:15:01 + Parav Pandit wrote: > > > From: Jakub Kicinski > > > > > > I find it strange that you have pfnum 0 everywhere but then > > > different controllers. > > There are multiple PFs, connected to dif

[PATCH net-next v2 2/3] hinic: add support to query rq info

2020-08-27 Thread Luo bin
add debugfs node for querying rq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/RQs/0x0/rq_hw_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch .../net/ethernet/huawei/hinic/hinic_debugfs.c

[PATCH net-next v2 3/3] hinic: add support to query function table

2020-08-27 Thread Luo bin
add debugfs node for querying function table, for example: cat /sys/kernel/debug/hinic/:15:00.0/func_table/valid Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch V1~V2: - remove vlan_id and vlan_mode fr

[PATCH net-next v2 1/3] hinic: add support to query sq info

2020-08-27 Thread Luo bin
add debugfs node for querying sq info, for example: cat /sys/kernel/debug/hinic/:15:00.0/SQs/0x0/sq_pi Signed-off-by: Luo bin --- V0~V1: - remove command interfaces to the read only files - split addition of each object into a separate patch drivers/net/ethernet/huawei/hinic/Makefile|

[PATCH net-next v2 0/3] hinic: add debugfs support

2020-08-27 Thread Luo bin
add debugfs node for querying sq/rq info and function table Luo bin (3): hinic: add support to query sq info hinic: add support to query rq info hinic: add support to query function table drivers/net/ethernet/huawei/hinic/Makefile| 3 +- .../net/ethernet/huawei/hinic/hinic_debugfs.c

Re: [PATCH net-next v1 3/3] hinic: add support to query function table

2020-08-27 Thread luobin (L)
On 2020/8/28 3:44, Jakub Kicinski wrote: > On Thu, 27 Aug 2020 19:13:21 +0800 Luo bin wrote: >> +switch (idx) { >> +case VALID: >> +return funcfg_table_elem->dw0.bs.valid; >> +case RX_MODE: >> +return funcfg_table_elem->dw0.bs.nic_rx_mode; >> +case MTU: >> +

Re: [PATCH] net: dsa: mt7530: fix advertising unsupported

2020-08-27 Thread Florian Fainelli
On 8/27/2020 2:15 AM, Landen Chao wrote: 1000baseT_Half Looks like this part of the commit subject spilled into the commit message. Remove 1000baseT_Half to advertise correct hardware capability in phylink_validate() callback function. Fixes: 38f790a80560 ("net: dsa: mt7530: Add support

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-08-27 Thread Kehuan Feng
Hi Hillf, Unfortunately, above mem barriers don't help. The issue shows up within 1 minute ... Hillf Danton 于2020年8月27日周四 下午8:58写道: > > > On Thu, 27 Aug 2020 14:56:31 +0800 Kehuan Feng wrote: > > > > > Lets see if TCQ_F_NOLOC is making fq_codel different in your testing. > > > > I assume you me

Re: [PATCH] net: dsa: mt7530: fix advertising unsupported

2020-08-27 Thread Andrew Lunn
On Thu, Aug 27, 2020 at 05:15:47PM +0800, Landen Chao wrote: > 1000baseT_Half > > Remove 1000baseT_Half to advertise correct hardware capability in > phylink_validate() callback function. > > Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") > Signed-off-by: Landen Chao Reviewed-

[PATCH v3 bpf-next 2/3] bpf: Relax max_entries check for most of the inner map types

2020-08-27 Thread Martin KaFai Lau
Most of the maps do not use max_entries during verification time. Thus, those map_meta_equal() do not need to enforce max_entries when it is inserted as an inner map during runtime. The max_entries check is removed from the default implementation bpf_map_meta_equal(). The prog_array_map and xsk_m

[PATCH v3 bpf-next 1/3] bpf: Add map_meta_equal map ops

2020-08-27 Thread Martin KaFai Lau
Some properties of the inner map is used in the verification time. When an inner map is inserted to an outer map at runtime, bpf_map_meta_equal() is currently used to ensure those properties of the inserting inner map stays the same as the verification time. In particular, the current bpf_map_meta

[PATCH v3 bpf-next 0/3] bpf: Relax the max_entries check for inner map

2020-08-27 Thread Martin KaFai Lau
v3: - Add map_meta_equal to bpf_map_ops and use it as an explict opt-in support for map-in-map v2: - New BPF_MAP_TYPE_FL to minimize code churns (Alexei) - s/capabilities/properties/ (Andrii) - Describe WHY in commit log (Andrii) People has a use case that starts with a smaller inner map firs

[PATCH v3 bpf-next 3/3] bpf: selftests: Add test for different inner map size

2020-08-27 Thread Martin KaFai Lau
This patch tests the inner map size can be different for reuseport_sockarray but has to be the same for arraymap. A new subtest "diff_size" is added for this. The existing test is moved to a subtest "lookup_update". Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/prog_tests/btf_map_in_ma

Re: [PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-27 Thread Josef Bacik
On 8/27/20 6:01 PM, Alexei Starovoitov wrote: From: Alexei Starovoitov Introduce sleepable BPF programs that can request such property for themselves via BPF_F_SLEEPABLE flag at program load time. In such case they will be able to use helpers like bpf_copy_from_user() that might sleep. At prese

linux-next: manual merge of the net-next tree with the net tree

2020-08-27 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/ipv4/raw.c between commit: 645f08975f49 ("net: Fix some comments") from the net tree and commit: 2bdcc73c88d2 ("net: ipv4: delete repeated words") from the net-next tree. I fixed it up (they each removed a di

Re: [PATCH v3 bpf-next 1/5] mm/error_inject: Fix allow_error_inject function signatures.

2020-08-27 Thread Josef Bacik
On 8/27/20 6:01 PM, Alexei Starovoitov wrote: From: Alexei Starovoitov 'static' and 'static noinline' function attributes make no guarantees that gcc/clang won't optimize them. The compiler may decide to inline 'static' function and in such case ALLOW_ERROR_INJECT becomes meaningless. The compi

[PATCH net] ionic: fix txrx work accounting

2020-08-27 Thread Shannon Nelson
Take the tx accounting out of the work_done calculation to prevent a possible duplicate napi_schedule call when under high Tx stress but low Rx traffic. Fixes: b14e4e95f9ec ("ionic: tx separate servicing") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 13 ++

Re: [PATCH net-next 1/2] ipv6: add ipv6_fragment hook in ipv6_stub

2020-08-27 Thread wenxu
Yes, I check the ipv6_stub->ipv6_fragment. And in the case if there is no ipv6_stub->ipv6_fragment it means no ipv6 fragment support and it should free the skb. Maybe sometimes  not all the calling remember to check with this? So it should add a default one with following? +static int eafnosup

[PATCH v3 net-next 03/12] ionic: use kcalloc for new arrays

2020-08-27 Thread Shannon Nelson
Use kcalloc for allocating arrays of structures. Following along after commit e71642009cbdA ("ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc()") there are a couple more array allocations that can be converted to using devm_kcalloc(). Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pens

[PATCH v3 net-next 06/12] ionic: clean up unnecessary non-static functions

2020-08-27 Thread Shannon Nelson
ionic_open() and ionic_stop() are not referenced outside of their defining file, so make them static. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 ++-- drivers/net/ethernet/pensando/ionic/ionic_lif.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(

[PATCH v3 net-next 02/12] ionic: fix up a couple of debug strings

2020-08-27 Thread Shannon Nelson
Fix the queue name displayed. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 2352

[PATCH v3 net-next 05/12] ionic: rework and simplify handling of the queue stats block

2020-08-27 Thread Shannon Nelson
Use a block of stats structs attached to the lif instead of little ones attached to each qcq. This simplifies our memory management and gets rid of a lot of unnecessary indirection. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 4 +- .../net/ethernet/pensan

[PATCH v3 net-next 08/12] ionic: use index not pointer for queue tracking

2020-08-27 Thread Shannon Nelson
Use index counters rather than pointers for tracking head and tail in the queues to save a little memory and to perhaps slightly faster queue processing. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 6 +- .../net/ethernet/pensando/ionic/ionic_dev.c | 40 ++

[PATCH v3 net-next 04/12] ionic: remove lif list concept

2020-08-27 Thread Shannon Nelson
As we aren't yet supporting multiple lifs, we can remove complexity by removing the list concept and related code, to be re-engineered later when actually needed. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 4 +- .../ethernet/pensando/ionic/ionic_bus_pci.c

[PATCH v3 net-next 01/12] ionic: set MTU floor at ETH_MIN_MTU

2020-08-27 Thread Shannon Nelson
The NIC might tell us its minimum MTU, but let's be sure not to use something smaller than ETH_MIN_MTU. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ioni

[PATCH v3 net-next 11/12] ionic: change queue count with no reset

2020-08-27 Thread Shannon Nelson
Add to our new ionic_reconfigure_queues() to also be able to change the number of queues in use, and to change the queue interrupt layout between split and combined. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 88 --- .../net/ethernet/pensando/ionic/ion

[PATCH v3 net-next 10/12] ionic: change the descriptor ring length without full reset

2020-08-27 Thread Shannon Nelson
The original way of changing ring length was to completely tear down the lif's queue structure and then rebuild it, while running the risk of allocations that might fail in the middle and leave us with a broken driver. Instead, we can set up all the new queue and descriptor allocations first, then

[PATCH v3 net-next 09/12] ionic: change mtu without full queue rebuild

2020-08-27 Thread Shannon Nelson
We really don't need to tear down and rebuild the whole queue structure when changing the MTU; we can simply stop the queues, clean and refill, then restart the queues. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 57 --- 1 file changed, 49 in

[PATCH v3 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Shannon Nelson
Split out the queue descriptor blocks into separate dma allocations to make for smaller blocks. Co-developed-by: Neel Patel Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 23 ++-- .../net/ethernet/pensando/ionic/ionic_lif.c | 100 +++--- .../net

[PATCH v3 net-next 12/12] ionic: pull reset_queues into tx_timeout handler

2020-08-27 Thread Shannon Nelson
Convert tx_timeout handler to not do the full reset. As this was the last user of ionic_reset_queues(), we can drop it. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 39 --- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 - 2 files changed

[PATCH v3 net-next 00/12] ionic memory usage rework

2020-08-27 Thread Shannon Nelson
Previous review comments have suggested [1],[2] that this driver needs to rework how queue resources are managed and reconfigured so that we don't do a full driver reset and to better handle potential allocation failures. This patchset is intended to address those comments. The first few patches

Re: [PATCH v2 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Shannon Nelson
On 8/27/20 2:25 PM, Jakub Kicinski wrote: On Thu, 27 Aug 2020 12:53:17 -0700 Shannon Nelson wrote: On 8/27/20 12:46 PM, Jakub Kicinski wrote: On Thu, 27 Aug 2020 11:07:30 -0700 Shannon Nelson wrote: + q_base = (void *)PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE); The point of PTR_ALIGN

Re: [PATCH net-next 1/2] ipv6: add ipv6_fragment hook in ipv6_stub

2020-08-27 Thread Marcelo Ricardo Leitner
On Thu, Aug 27, 2020 at 07:51:47AM -0700, David Miller wrote: > From: we...@ucloud.cn > Date: Thu, 27 Aug 2020 18:39:51 +0800 > > > From: wenxu > > > > Add ipv6_fragment to ipv6_stub to avoid calling netfilter when > > access ip6_fragment. > > > > Signed-off-by: wenxu > > Please test these ch

[RFC -next 0/3] Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 10:47:53 -0700 Jakub Kicinski wrote: > > Oh, I really thought list_for_each_entry_rcu() was only checking standard > > rcu. > > > > I might have been confused because we do have hlist_for_each_entry_rcu_bh() > > helper. > > > > Anyway, when looking at the patch I was not at

[RFC -next 3/3] net: make sure napi_list is safe for RCU traversal

2020-08-27 Thread Jakub Kicinski
netpoll needs to traverse dev->napi_list under RCU, make sure it uses the right iterator and that removal from this list is handled safely. Signed-off-by: Jakub Kicinski --- net/core/dev.c | 2 +- net/core/netpoll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/c

Re: [PATCH net-next] net/sched: add act_ct_output support

2020-08-27 Thread Marcelo Ricardo Leitner
On Thu, Aug 27, 2020 at 11:30:54AM +0800, wenxu wrote: ... > So only othersolution for solving this problem? Lets wait for Cong's input. LPC is happening and he had a talk there. Marcelo

[RFC -next 2/3] net: manage napi add/del idempotence explicitly

2020-08-27 Thread Jakub Kicinski
To RCUify napi->dev_list we need to replace list_del_init() with list_del_rcu(). There is no _init() version for RCU for obvious reasons. Up until now netif_napi_del() was idempotent so to make sure it remains such add a bit which is set when NAPI is listed, and cleared when it removed. Since we do

[RFC -next 1/3] net: remove napi_hash_del() from driver-facing API

2020-08-27 Thread Jakub Kicinski
We allow drivers to call napi_hash_del() before calling netif_napi_del() to batch RCU grace periods. This makes the API asymmetric and leaks internal implementation details. Soon we will want the grace period to protect more than just the NAPI hash table. Restructure the API and have drivers call

Re: [PATCH v3 bpf-next 3/5] bpf: Add bpf_copy_from_user() helper.

2020-08-27 Thread KP Singh
On Fri, Aug 28, 2020 at 12:01 AM Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > Sleepable BPF programs can now use copy_from_user() to access user memory. > > Signed-off-by: Alexei Starovoitov > Acked-by: Andrii Nakryiko Acked-by: KP Singh

Re: [PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-27 Thread KP Singh
On Fri, Aug 28, 2020 at 12:01 AM Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > Introduce sleepable BPF programs that can request such property for themselves > via BPF_F_SLEEPABLE flag at program load time. In such case they will be able > to use helpers like bpf_copy_from_user() tha

[PATCH] Remove ipvs v6 dependency on iptables

2020-08-27 Thread Lach
This dependency was added in 63dca2c0b0e7a92cb39d1b1ecefa32ffda201975, because this commit had dependency on ipv6_find_hdr, which was located in iptables-specific code But it is no longer required, because f8f626754ebeca613cf1af2e6f890cfde0e74d5b moved them to a more common location --- include

[PATCH v3 bpf-next 5/5] selftests/bpf: Add sleepable tests

2020-08-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Modify few tests to sanity test sleepable bpf functionality. Running 'bench trig-fentry-sleep' vs 'bench trig-fentry' and 'perf report': sleepable with SRCU: 3.86% bench [k] __srcu_read_unlock 3.22% bench [k] __srcu_read_lock 0.92% bench [k] bpf_p

[PATCH v3 bpf-next 4/5] libbpf: support sleepable progs

2020-08-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Pass request to load program as sleepable via ".s" suffix in the section name. If it happens in the future that all map types and helpers are allowed with BPF_F_SLEEPABLE flag "fmod_ret/" and "lsm/" can be aliased to "fmod_ret.s/" and "lsm.s/" to make all lsm and fmod_ret

[PATCH v3 bpf-next 0/5] bpf: Introduce minimal support for sleepable progs

2020-08-27 Thread Alexei Starovoitov
From: Alexei Starovoitov v2->v3: - switched to minimal allowlist approach. Essentially that means that syscall entry, few btrfs allow_error_inject functions, should_fail_bio(), and two LSM hooks: file_mprotect and bprm_committed_creds are the only hooks that allow attaching of sleepable BPF

[PATCH v3 bpf-next 3/5] bpf: Add bpf_copy_from_user() helper.

2020-08-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Sleepable BPF programs can now use copy_from_user() to access user memory. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko --- include/linux/bpf.h| 1 + include/uapi/linux/bpf.h | 8 kernel/bpf/helpers.c | 22

[PATCH v3 bpf-next 2/5] bpf: Introduce sleepable BPF programs

2020-08-27 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce sleepable BPF programs that can request such property for themselves via BPF_F_SLEEPABLE flag at program load time. In such case they will be able to use helpers like bpf_copy_from_user() that might sleep. At present only fentry/fexit/fmod_ret and lsm programs c

[PATCH v3 bpf-next 1/5] mm/error_inject: Fix allow_error_inject function signatures.

2020-08-27 Thread Alexei Starovoitov
From: Alexei Starovoitov 'static' and 'static noinline' function attributes make no guarantees that gcc/clang won't optimize them. The compiler may decide to inline 'static' function and in such case ALLOW_ERROR_INJECT becomes meaningless. The compiler could have inlined __add_to_page_cache_locke

Re: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 20:15:01 + Parav Pandit wrote: > > From: Jakub Kicinski > > > > I find it strange that you have pfnum 0 everywhere but then different > > controllers. > There are multiple PFs, connected to different PCI RC. So device has > same pfnum for both the PFs. > > > For MultiHos

Re: [PATCH v2 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 12:53:17 -0700 Shannon Nelson wrote: > On 8/27/20 12:46 PM, Jakub Kicinski wrote: > > On Thu, 27 Aug 2020 11:07:30 -0700 Shannon Nelson wrote: > >> + q_base = (void *)PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE); > > The point of PTR_ALIGN is to make the casts unnecessary.

Re: [PATCH] Remove ipvs v6 dependency on iptables

2020-08-27 Thread Julian Anastasov
Hello, On Fri, 28 Aug 2020, Lach wrote: > This dependency was added in 63dca2c0b0e7a92cb39d1b1ecefa32ffda201975, > because this commit had dependency on > ipv6_find_hdr, which was located in iptables-specific code > > But it is no longer required, because > f8f626754ebeca613cf1af2e6f

Re: [PATCH] Revert "wlcore: Adding suppoprt for IGTK key in wlcore driver"

2020-08-27 Thread Steve deRosier
Hi Mauro, On Thu, Aug 27, 2020 at 10:42 AM Mauro Carvalho Chehab wrote: > > Em Thu, 27 Aug 2020 08:48:30 -0700 > Steve deRosier escreveu: > > > On Tue, Aug 25, 2020 at 10:49 PM Mauro Carvalho Chehab > > wrote: > > > > > > This patch causes a regression betwen Kernel 5.7 and 5.8 at wlcore: > > >

Re: [PATCH 12/30] net: wireless: cisco: airo: Fix a myriad of coding style issues

2020-08-27 Thread Ondrej Zary
On Thursday 27 August 2020 09:49:12 Kalle Valo wrote: > Ondrej Zary writes: > > > On Monday 17 August 2020 20:27:06 Jesse Brandeburg wrote: > >> On Mon, 17 Aug 2020 16:27:01 +0300 > >> Kalle Valo wrote: > >> > >> > I was surprised to see that someone was using this driver in 2015, so > >> > I'm

Re: [PATCH ipsec-next v3] xfrm: add /proc/sys/core/net/xfrm_redact_secret

2020-08-27 Thread David Miller
From: Antony Antony Date: Thu, 27 Aug 2020 22:15:36 +0200 > If there is a way to set lockdown per net namespace it would be > better than /proc/sys/core/net/xfrm_redact_secret. Lockmode is a whole system attribute. As should any facility that restricts access to keying information stored inside

Re: [PATCH net-next v3 1/2] dt-bindings: net: dp83822: Add TI dp83822 phy

2020-08-27 Thread Andrew Lunn
On Thu, Aug 27, 2020 at 08:45:08AM -0500, Dan Murphy wrote: > Add a dt binding for the TI dp83822 ethernet phy device. > > Reviewed-by: Rob Herring > Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v3 2/2] net: phy: DP83822: Add ability to advertise Fiber connection

2020-08-27 Thread Andrew Lunn
On Thu, Aug 27, 2020 at 08:45:09AM -0500, Dan Murphy wrote: > The DP83822 can be configured to use a Fiber connection. The strap > register is read to determine if the device has been configured to use > a fiber connection. With the fiber connection the PHY can be configured > to detect whether t

Re: [PATCH ipsec-next v3] xfrm: add /proc/sys/core/net/xfrm_redact_secret

2020-08-27 Thread Antony Antony
Hi David, On Mon, Aug 24, 2020 at 08:00:38 +0200, Antony Antony wrote: > On Thu, Aug 20, 2020 at 15:42:22 -0700, David Miller wrote: > > From: Antony Antony > > Date: Thu, 20 Aug 2020 20:35:49 +0200 > > > > > Redacting secret is a FIPS 140-2 requirement. > > > > Why not control this via the ker

RE: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-08-27 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Friday, August 28, 2020 12:02 AM > > On Thu, 27 Aug 2020 04:31:43 + Parav Pandit wrote: > > > > $ devlink port show looks like below without a controller annotation. > > > > pci/:00:08.0/0: type eth netdev eth5 flavour physical > > > > pci/:00:08.0/1:

Re: [PATCH RFC] netlabel: remove unused param from audit_log_format()

2020-08-27 Thread Paul Moore
On Thu, Aug 27, 2020 at 1:20 PM Alex Dewar wrote: > On Thu, Aug 27, 2020 at 06:06:34PM +0100, Alex Dewar wrote: > > On Thu, Aug 27, 2020 at 01:00:58PM -0400, Paul Moore wrote: > > > On Thu, Aug 27, 2020 at 12:39 PM Alex Dewar > > > wrote: > > > > > > > > Commit d3b990b7f327 ("netlabel: fix probl

Re: [PATCH net] rxrpc: Fix memory leak in rxkad_verify_response()

2020-08-27 Thread David Miller
From: David Howells Date: Thu, 27 Aug 2020 16:55:46 +0100 > From: Dinghao Liu > > Fix a memory leak in rxkad_verify_response() whereby the response buffer > doesn't get freed if we fail to allocate a ticket buffer. > > Fixes: ef68622da9cc ("rxrpc: Handle temporary errors better in rxkad > sec

Re: [PATCH net 0/7] rxrpc, afs: Fix probing issues

2020-08-27 Thread David Miller
From: David Howells Date: Thu, 27 Aug 2020 16:03:33 +0100 > > Here are some fixes for rxrpc and afs to fix issues in the RTT measuring in > rxrpc and thence the Volume Location server probing in afs: > > (1) Move the serial number of a received ACK into a local variable to > simplify the

[PATCH] Remove ipvs v6 dependency on iptables

2020-08-27 Thread Lach
This dependency was added in 63dca2c0b0e7a92cb39d1b1ecefa32ffda201975, because this commit had dependency on ipv6_find_hdr, which was located in iptables-specific code But it is no longer required, because f8f626754ebeca613cf1af2e6f890cfde0e74d5b moved them to a more common location --- net/net

Re: [PATCH v2 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Shannon Nelson
On 8/27/20 12:46 PM, Jakub Kicinski wrote: On Thu, 27 Aug 2020 11:07:30 -0700 Shannon Nelson wrote: + q_base = (void *)PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE); The point of PTR_ALIGN is to make the casts unnecessary. Does it not work? Here's what I see from two different compiler

Re: [PATCH v2 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 11:07:30 -0700 Shannon Nelson wrote: > Authored-by: Neel Patel Also - what's Authored-by? :S Do we need a sign-off for this? Perhaps Co-developed-by, which is more standard?

Re: [PATCH v2 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 11:07:30 -0700 Shannon Nelson wrote: > + q_base = (void *)PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE); The point of PTR_ALIGN is to make the casts unnecessary. Does it not work?

Re: [PATCH net-next v1 3/3] hinic: add support to query function table

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 19:13:21 +0800 Luo bin wrote: > + switch (idx) { > + case VALID: > + return funcfg_table_elem->dw0.bs.valid; > + case RX_MODE: > + return funcfg_table_elem->dw0.bs.nic_rx_mode; > + case MTU: > + return funcfg_table_elem->dw1.bs

Re: [PATCH bpf-next v3 2/4] selftests/bpf: add test for freplace program with write access

2020-08-27 Thread Udip Pant
On 8/26/20, 11:05 PM, "Andrii Nakryiko" wrote: On Tue, Aug 25, 2020 at 4:21 PM Udip Pant wrote: >> >> This adds a selftest that tests the behavior when a freplace target program >> attempts to make a write access on a packet. The expectation is that the >> read or write >> access is granted

Re: [PATCH][next] atmel: Use fallthrough pseudo-keyword

2020-08-27 Thread Gustavo A. R. Silva
On Thu, Aug 27, 2020 at 01:09:33PM +, Kalle Valo wrote: > "Gustavo A. R. Silva" wrote: > > > Replace the existing /* fall through */ comments and its variants with > > the new pseudo-keyword macro fallthrough[1]. > > > > [1] > > https://www.kernel.org/doc/html/v5.7/process/deprecated.html?h

Re: [PATCH 6/9] dt-bindings: gpio: renesas,rcar-gpio: Add r8a774e1 support

2020-08-27 Thread Bartosz Golaszewski
On Thu, Aug 27, 2020 at 6:40 PM Lad, Prabhakar wrote: > > Hi Linus and Bartosz, > > On Mon, Jul 13, 2020 at 10:35 PM Lad Prabhakar > wrote: > > > > Document Renesas RZ/G2H (R8A774E1) GPIO blocks compatibility within the > > relevant dt-bindings. > > > > Signed-off-by: Lad Prabhakar > > --- > >

VRRP not working on i40e X722 S2600WFT

2020-08-27 Thread Lennart Sorensen
I have hit a new problem with the X722 chipset (Intel R1304WFT server). VRRP simply does not work. When keepalived registers a vmac interface, and starts transmitting multicast packets with the vrp message, it never receives those packets from the peers, so all nodes think they are the master. tc

Re: [PATCH net-next 2/3] devlink: Consider other controller while building phys_port_name

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 04:31:43 + Parav Pandit wrote: > > > $ devlink port show looks like below without a controller annotation. > > > pci/:00:08.0/0: type eth netdev eth5 flavour physical > > > pci/:00:08.0/1: type eth netdev eth6 flavour pcipf pfnum 0 > > > pci/:00:08.0/2: type eth

Re: [net-next v5 08/15] iecm: Implement vector allocation

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 17:28:29 + Brady, Alan wrote: > > On Mon, 24 Aug 2020 10:32:59 -0700 Tony Nguyen wrote: > > > static void iecm_mb_intr_rel_irq(struct iecm_adapter *adapter) { > > > - /* stub */ > > > + int irq_num; > > > + > > > + irq_num = adapter->msix_entries[0].vector; > > > + synch

Re: [05/16] atmel: convert tasklets to use new tasklet_setup() API

2020-08-27 Thread Kees Cook
On Thu, Aug 27, 2020 at 01:23:20PM +, Kalle Valo wrote: > Allen Pais wrote: > > > From: Allen Pais > > > > In preparation for unconditionally passing the > > struct tasklet_struct pointer to all tasklet > > callbacks, switch to using the new tasklet_setup() > > and from_tasklet() to pass th

Re: [PATCH bpf-next 2/5] bpf: add main_thread_only customization for task/task_file iterators

2020-08-27 Thread Yonghong Song
On 8/26/20 10:07 PM, Andrii Nakryiko wrote: On Wed, Aug 26, 2020 at 5:07 PM Yonghong Song wrote: Currently, task and task_file by default iterates through all tasks. For task_file, by default, all files from all tasks will be traversed. But for a user process, the file_table is shared by a

[PATCH v2 net-next 08/12] ionic: use index not pointer for queue tracking

2020-08-27 Thread Shannon Nelson
Use index counters rather than pointers for tracking head and tail in the queues to save a little memory and to perhaps slightly faster queue processing. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 6 +- .../net/ethernet/pensando/ionic/ionic_dev.c | 40 ++

[PATCH v2 net-next 04/12] ionic: remove lif list concept

2020-08-27 Thread Shannon Nelson
As we aren't yet supporting multiple lifs, we can remove complexity by removing the list concept and related code, to be re-engineered later when actually needed. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 4 +- .../ethernet/pensando/ionic/ionic_bus_pci.c

[PATCH v2 net-next 12/12] ionic: pull reset_queues into tx_timeout handler

2020-08-27 Thread Shannon Nelson
Convert tx_timeout handler to not do the full reset. As this was the last user of ionic_reset_queues(), we can drop it. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 39 --- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 - 2 files changed

[PATCH v2 net-next 06/12] ionic: clean up unnecessary non-static functions

2020-08-27 Thread Shannon Nelson
ionic_open() and ionic_stop() are not referenced outside of their defining file, so make them static. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 ++-- drivers/net/ethernet/pensando/ionic/ionic_lif.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(

[PATCH v2 net-next 07/12] ionic: reduce contiguous memory allocation requirement

2020-08-27 Thread Shannon Nelson
Split out the queue descriptor blocks into separate dma allocations to make for smaller blocks. Authored-by: Neel Patel Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 23 ++-- .../net/ethernet/pensando/ionic/ionic_lif.c | 100 +++--- .../net/eth

[PATCH v2 net-next 10/12] ionic: change the descriptor ring length without full reset

2020-08-27 Thread Shannon Nelson
The original way of changing ring length was to completely tear down the lif's queue structure and then rebuild it, while running the risk of allocations that might fail in the middle and leave us with a broken driver. Instead, we can set up all the new queue and descriptor allocations first, then

[PATCH v2 net-next 11/12] ionic: change queue count with no reset

2020-08-27 Thread Shannon Nelson
Add to our new ionic_reconfigure_queues() to also be able to change the number of queues in use, and to change the queue interrupt layout between split and combined. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 88 --- .../net/ethernet/pensando/ionic/ion

[PATCH v2 net-next 05/12] ionic: rework and simplify handling of the queue stats block

2020-08-27 Thread Shannon Nelson
Use a block of stats structs attached to the lif instead of little ones attached to each qcq. This simplifies our memory management and gets rid of a lot of unnecessary indirection. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 4 +- .../net/ethernet/pensan

[PATCH v2 net-next 03/12] ionic: use kcalloc for new arrays

2020-08-27 Thread Shannon Nelson
Use kcalloc for allocating arrays of structures. Following along after commit e71642009cbdA ("ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc()") there are a couple more array allocations that can be converted to using devm_kcalloc(). Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pens

[PATCH v2 net-next 09/12] ionic: change mtu without full queue rebuild

2020-08-27 Thread Shannon Nelson
We really don't need to tear down and rebuild the whole queue structure when changing the MTU; we can simply stop the queues, clean and refill, then restart the queues. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 57 --- 1 file changed, 49 in

[PATCH v2 net-next 02/12] ionic: fix up a couple of debug strings

2020-08-27 Thread Shannon Nelson
Fix the queue name displayed. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 2352

[PATCH v2 net-next 00/12] ionic memory usage rework

2020-08-27 Thread Shannon Nelson
Previous review comments have suggested [1],[2] that this driver needs to rework how queue resources are managed and reconfigured so that we don't do a full driver reset and to better handle potential allocation failures. This patchset is intended to address those comments. The first few patches

[PATCH v2 net-next 01/12] ionic: set MTU floor at ETH_MIN_MTU

2020-08-27 Thread Shannon Nelson
The NIC might tell us its minimum MTU, but let's be sure not to use something smaller than ETH_MIN_MTU. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ioni

Re: [PATCH] net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()

2020-08-27 Thread Eric Biggers
On Thu, Aug 27, 2020 at 12:23:55PM +0530, Himadri Pandya wrote: > The buffer size is 2 Bytes and we expect to receive the same amount of > data. But sometimes we receive less data and run into uninit-was-stored > issue upon read. Hence modify the error check on the return value to match > with the

Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 08:43:22 -0700 Eric Dumazet wrote: > On 8/27/20 8:10 AM, Jakub Kicinski wrote: > > On Thu, 27 Aug 2020 00:25:31 -0700 Eric Dumazet wrote: > >> On 8/26/20 12:40 PM, Jakub Kicinski wrote: > >>> To ensure memory ordering is correct we need to use RCU accessors. > >> > >>> +

Re: [PATCH] Revert "wlcore: Adding suppoprt for IGTK key in wlcore driver"

2020-08-27 Thread Mauro Carvalho Chehab
Em Thu, 27 Aug 2020 08:48:30 -0700 Steve deRosier escreveu: > On Tue, Aug 25, 2020 at 10:49 PM Mauro Carvalho Chehab > wrote: > > > > This patch causes a regression betwen Kernel 5.7 and 5.8 at wlcore: > > with it applied, WiFi stops working, and the Kernel starts printing > > this message every

[Patch net] net_sched: fix error path in red_init()

2020-08-27 Thread Cong Wang
When ->init() fails, ->destroy() is called to clean up. So it is unnecessary to clean up in red_init(), and it would cause some refcount underflow. Fixes: aee9caa03fc3 ("net: sched: sch_red: Add qevents "early_drop" and "mark"") Reported-and-tested-by: syzbot+b33c1cb0a30ebdc8a...@syzkaller.appspot

RE: [net-next v5 13/15] iecm: Add ethtool

2020-08-27 Thread Brady, Alan
> -Original Message- > From: Michal Kubecek > Sent: Monday, August 24, 2020 2:45 PM > To: Nguyen, Anthony L > Cc: da...@davemloft.net; Michael, Alice ; > netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com; > Kirsher, Jeffrey T ; Brady, Alan > ; Burra, Phani R ; Hay, > Joshua

  1   2   3   >