Re: [PATCH net-next v2 01/11] dt-bindings: net: dsa: convert ksz bindings document to yaml

2020-11-16 Thread Christian Eggers
On Monday, 16 November 2020, 15:37:20 CET, Rob Herring wrote: > On Thu, 12 Nov 2020 16:35:27 +0100, Christian Eggers wrote: > > Convert the bindings document for Microchip KSZ Series Ethernet switches > > from txt to yaml. > > > > Signed-off-by: Christian Eggers > > --- > > > > .../devicetree/b

Re: [FIX bpf,perf] bpf,perf: return EOPNOTSUPP for bpf handler on PERF_COUNT_SW_DUMMY

2020-11-16 Thread Peter Zijlstra
On Mon, Nov 16, 2020 at 01:02:09PM -0800, Martin KaFai Lau wrote: > On Mon, Nov 16, 2020 at 07:37:52PM +0100, Florian Lehner wrote: > > bpf handlers for perf events other than tracepoints, kprobes or uprobes > > are attached to the overflow_handler of the perf event. > > > > Perf events of type so

Re: [PATCH net-next v2 3/3] nfc: s3fwrn5: Change the error code

2020-11-16 Thread k...@kernel.org
On Tue, Nov 17, 2020 at 10:18:50AM +0900, Bongsu Jeon wrote: > ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP. > > Signed-off-by: Bongsu Jeon > --- > drivers/nfc/s3fwrn5/s3fwrn5.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) I already reviewed it. Reviewed-by: Krzyszt

Re: [PATCH net] atl1c: fix error return code in atl1c_probe()

2020-11-16 Thread Chris Snook
The full text of the preceding comment explains the need: /* * The atl1c chip can DMA to 64-bit addresses, but it uses a single * shared register for the high 32 bits, so only a single, aligned, * 4 GB physical address range can be used at a time. * * Supporting 64-bit DMA on this hardware is more

Re: [PATCH net-next v2 1/3] nfc: s3fwrn5: Remove the max_payload

2020-11-16 Thread k...@kernel.org
On Tue, Nov 17, 2020 at 10:16:11AM +0900, Bongsu Jeon wrote: > max_payload is unused. Why did you resend the patch ignoring my review? I already provided you with a tag, so you should include it. https://www.kernel.org/doc/html/latest/process/submitting-patches.html Reviewed-by: Krzysztof Kozlow

Re: [PATCH net-next v2 2/3] nfc: s3fwrn5: Fix the misspelling in a comment

2020-11-16 Thread k...@kernel.org
On Tue, Nov 17, 2020 at 10:17:42AM +0900, Bongsu Jeon wrote: > stucture should be replaced by structure. > > Signed-off-by: Bongsu Jeon I already reviewed it. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [Intel-wired-lan] [PATCH 0/8] New netdev feature flags for XDP

2020-11-16 Thread Magnus Karlsson
On Mon, Nov 16, 2020 at 2:25 PM Toke Høiland-Jørgensen wrote: > > alar...@gmail.com writes: > > > From: Marek Majtyka > > > > Implement support for checking if a netdev has native XDP and AF_XDP zero > > copy support. Previously, there was no way to do this other than to try > > to create an AF_X

[PATCH v6] tcp: fix race condition when creating child sockets from syncookies

2020-11-16 Thread Ricardo Dias
When the TCP stack is in SYN flood mode, the server child socket is created from the SYN cookie received in a TCP packet with the ACK flag set. The child socket is created when the server receives the first TCP packet with a valid SYN cookie from the client. Usually, this packet corresponds to the

Re: [PATCH v4 01/10] Add auxiliary bus support

2020-11-16 Thread Leon Romanovsky
On Tue, Nov 17, 2020 at 08:02:53AM +0100, Greg KH wrote: > On Tue, Nov 17, 2020 at 07:30:00AM +0200, Leon Romanovsky wrote: > > On Fri, Nov 13, 2020 at 08:18:50AM -0800, Dave Ertman wrote: > > > Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. > > > It enables drivers to cr

Re: [PATCH net] atl1c: fix error return code in atl1c_probe()

2020-11-16 Thread Heiner Kallweit
Am 17.11.2020 um 03:55 schrieb Zhang Changzhong: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to 'dma_' API") > Reported-by: Hulk Robot > Signed-off-by: Zhang Chang

Re: [PATCH 6/8] libbpf: add functions to get XSK modes

2020-11-16 Thread kernel test robot
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] [also build test ERROR on bpf/master jkirsher-next-queue/dev-queue linus/master v5.10-rc4 next-20201116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Re: [PATCH v4 01/10] Add auxiliary bus support

2020-11-16 Thread Greg KH
On Tue, Nov 17, 2020 at 07:30:00AM +0200, Leon Romanovsky wrote: > On Fri, Nov 13, 2020 at 08:18:50AM -0800, Dave Ertman wrote: > > Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. > > It enables drivers to create an auxiliary_device and bind an > > auxiliary_driver to it.

Re: [PATCH net-next v5] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-16 Thread Florian Westphal
Randy Dunlap wrote: > The previous Kconfig patch led to some other build errors as > reported by the 0day bot and my own overnight build testing. > > These are all in when KCOV is enabled but > SKB_EXTENSIONS is not enabled, so fix those by combining those conditions > in the header file. Thank

[RFC, net-next] net: qos: introduce a redundancy flow action

2020-11-16 Thread Xiaoliang Yang
This patch introduce a redundancy flow action to implement frame replication and elimination for reliability, which is defined in IEEE P802.1CB. There are two modes for redundancy action: generator and recover mode. Generator mode add redundancy tag and replicate the frame to different egress port

[PATCH net-next] net/nfc/nci: Support NCI 2.x initial sequence

2020-11-16 Thread Bongsu Jeon
implement the NCI 2.x initial sequence to support NCI 2.x NFCC. Since NCI 2.0, CORE_RESET and CORE_INIT sequence have been changed. If NFCEE supports NCI 2.x, then NCI 2.x initial sequence will work. In NCI 1.0, Initial sequence and payloads are as below: (DH) (NFCC) | -- COR

Re: [PATCH 1/2] hwmon: (max127) Add Maxim MAX127 hardware monitoring driver

2020-11-16 Thread Guenter Roeck
On Mon, Nov 16, 2020 at 05:09:43PM -0800, rentao.b...@gmail.com wrote: > From: Tao Ren > > Add hardware monitoring driver for the Maxim MAX127 chip. > > MAX127 min/max range handling code is inspired by the max197 driver. > > Signed-off-by: Tao Ren > --- > drivers/hwmon/Kconfig | 9 ++ > d

Re: [PATCH v4 01/10] Add auxiliary bus support

2020-11-16 Thread Leon Romanovsky
On Fri, Nov 13, 2020 at 08:18:50AM -0800, Dave Ertman wrote: > Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. > It enables drivers to create an auxiliary_device and bind an > auxiliary_driver to it. > > The bus supports probe/remove shutdown and suspend/resume callbacks.

Re: [PATCH bpf-next] libbpf: bpf__find_by_name[_kind] should use btf__get_nr_types()

2020-11-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Sun, 15 Nov 2020 10:46:35 + you wrote: > When operating on split BTF, btf__find_by_name[_kind] will not > iterate over all types since they use btf->nr_types to show > the number of types to iterate over. For split BTF

Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled

2020-11-16 Thread kernel test robot
/davem/net-next.git 70408949a35f1a31c327c69b6a187635cb0305fa config: powerpc64-randconfig-r006-20201116 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin

Re: [PATCH net] net: b44: fix error return code in b44_init_one()

2020-11-16 Thread Michael Chan
On Mon, Nov 16, 2020 at 7:01 PM Zhang Changzhong wrote: > > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 39a6f4bce6b4 ("b44: replace the ssb_dma API with the generic DMA API") > Reported-by: Hulk Robot > Signed-off

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-16 Thread wenxu
On 11/17/2020 3:01 AM, Cong Wang wrote: > On Sun, Nov 15, 2020 at 5:06 AM wenxu wrote: >> >> 在 2020/11/15 2:05, Cong Wang 写道: >>> On Wed, Nov 11, 2020 at 9:44 PM wrote: diff --git a/net/sched/act_frag.c b/net/sched/act_frag.c new file mode 100644 index 000..3a7ab92 --- /

RE: [PATCH net-next 00/13] Add mlx5 subfunction support

2020-11-16 Thread Parav Pandit
> From: Jakub Kicinski > Sent: Tuesday, November 17, 2020 7:28 AM > > On Mon, 16 Nov 2020 16:06:02 -0800 Saeed Mahameed wrote: > > > > Subfunction support is discussed in detail in RFC [1] and [2]. > > > > RFC [1] and extension [2] describes requirements, design, and > > > > proposed plumbing u

[PATCH net v2] net: Have netpoll bring-up DSA management interface

2020-11-16 Thread Florian Fainelli
DSA network devices rely on having their DSA management interface up and running otherwise their ndo_open() will return -ENETDOWN. Without doing this it would not be possible to use DSA devices as netconsole when configured on the command line. These devices also do not utilize the upper/lower link

Re: [PATCH v3 net-next 3/3] net: dsa: tag_dsa: Use a consistent comment style

2020-11-16 Thread Florian Fainelli
On 11/14/2020 3:45 PM, Tobias Waldekranz wrote: > Use a consistent style of one-line/multi-line comments throughout the > file. > > Signed-off-by: Tobias Waldekranz Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v3 net-next 2/3] net: dsa: tag_dsa: Unify regular and ethertype DSA taggers

2020-11-16 Thread Florian Fainelli
On 11/14/2020 3:45 PM, Tobias Waldekranz wrote: > Ethertype DSA encodes exactly the same information in the DSA tag as > the non-ethertype variety. So refactor out the common parts and reuse > them for both protocols. > > This is ensures tag parsing and generation is always consistent across >

Re: [PATCH v3 net-next 1/3] net: dsa: tag_dsa: Allow forwarding of redirected IGMP traffic

2020-11-16 Thread Florian Fainelli
On 11/14/2020 3:45 PM, Tobias Waldekranz wrote: > When receiving an IGMP/MLD frame with a TO_CPU tag, the switch has not > performed any forwarding of it. This means that we should not set the > offload_fwd_mark on the skb, in case a software bridge wants it > forwarded. > > This is a port of:

Re: [PATCH v4 bpf-next 3/5] kbuild: build kernel module BTFs if BTF is enabled and pahole supports it

2020-11-16 Thread David Ahern
On 11/9/20 6:19 PM, Andrii Nakryiko wrote: > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index d7a7bc3b6098..1e78faaf20a5 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -274,6 +274,15 @@ config DEBUG_INFO_BTF > Turning this on expects presence of pahole tool, which

[PATCH bpf-next v6 03/34] mm: introduce page memcg flags

2020-11-16 Thread Roman Gushchin
The lowest bit in page->memcg_data is used to distinguish between struct memory_cgroup pointer and a pointer to a objcgs array. All checks and modifications of this bit are open-coded. Let's formalize it using page memcg flags, defined in enum page_memcg_data_flags. Additional flags might be add

[PATCH bpf-next v6 18/34] bpf: eliminate rlimit-based memory accounting for arraymap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for arraymap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/arraymap.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/kern

[PATCH bpf-next v6 12/34] bpf: refine memcg-based memory accounting for hashtab maps

2020-11-16 Thread Roman Gushchin
Include percpu objects and the size of map metadata into the accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu Reviewed-by: Shakeel Butt --- kernel/bpf/hashtab.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hash

[PATCH bpf-next v6 05/34] bpf: memcg-based memory accounting for bpf progs

2020-11-16 Thread Roman Gushchin
Include memory used by bpf programs into the memcg-based accounting. This includes the memory used by programs itself, auxiliary data, statistics and bpf line info. A memory cgroup containing the process which loads the program is getting charged. Signed-off-by: Roman Gushchin Acked-by: Song Liu

[PATCH bpf-next v6 20/34] bpf: eliminate rlimit-based memory accounting for cpumap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for cpumap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/cpumap.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/kernel/bpf/cpumap

[PATCH bpf-next v6 02/34] mm: memcontrol/slab: use helpers to access slab page's memcg_data

2020-11-16 Thread Roman Gushchin
To gather all direct accesses to struct page's memcg_data field in one place, let's introduce 3 new helpers to use in the slab accounting code: struct obj_cgroup **page_objcgs(struct page *page); struct obj_cgroup **page_objcgs_check(struct page *page); bool set_page_objcgs(struct page *page

[PATCH bpf-next v6 29/34] bpf: eliminate rlimit-based memory accounting for stackmap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for stackmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/stackmap.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/kernel/bpf/s

[PATCH bpf-next v6 11/34] bpf: refine memcg-based memory accounting for devmap maps

2020-11-16 Thread Roman Gushchin
Include map metadata and the node size (struct bpf_dtab_netdev) into the accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/devmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c index 2b5ca93c17de..e7

[PATCH bpf-next v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-16 Thread Roman Gushchin
In the absolute majority of cases if a process is making a kernel allocation, it's memory cgroup is getting charged. Bpf maps can be updated from an interrupt context and in such case there is no process which can be charged. It makes the memory accounting of bpf maps non-trivial. Fortunately, af

[PATCH bpf-next v6 16/34] bpf: refine memcg-based memory accounting for sockmap and sockhash maps

2020-11-16 Thread Roman Gushchin
Include internal metadata into the memcg-based memory accounting. Also include the memory allocated on updating an element. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/sock_map.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/core/sock_map.c b/n

[PATCH bpf-next v6 00/34] bpf: switch to memcg-based memory accounting

2020-11-16 Thread Roman Gushchin
Currently bpf is using the memlock rlimit for the memory accounting. This approach has its downsides and over time has created a significant amount of problems: 1) The limit is per-user, but because most bpf operations are performed as root, the limit has a little value. 2) It's hard to come u

[PATCH bpf-next v6 15/34] bpf: memcg-based memory accounting for bpf local storage maps

2020-11-16 Thread Roman Gushchin
Account memory used by bpf local storage maps: per-socket and per-inode storages. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_local_storage.c | 7 --- net/core/bpf_sk_storage.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/bpf

[PATCH bpf-next v6 09/34] bpf: refine memcg-based memory accounting for cpumap maps

2020-11-16 Thread Roman Gushchin
Include metadata and percpu data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c index c61a23b564aa..563f96cc8a9d 10

[PATCH bpf-next v6 26/34] bpf: eliminate rlimit-based memory accounting for reuseport_array maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for reuseport_array maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/reuseport_array.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ke

[PATCH bpf-next v6 22/34] bpf: eliminate rlimit-based memory accounting for devmap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for devmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/devmap.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/kernel/bpf/dev

[PATCH bpf-next v6 10/34] bpf: memcg-based memory accounting for cgroup storage maps

2020-11-16 Thread Roman Gushchin
Account memory used by cgroup storage maps including metadata structures. Account the percpu memory for the percpu flavor of cgroup storage. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/local_storage.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-)

[PATCH bpf-next v6 01/34] mm: memcontrol: use helpers to read page's memcg data

2020-11-16 Thread Roman Gushchin
Patch series "mm: allow mapping accounted kernel pages to userspace", v6. Currently a non-slab kernel page which has been charged to a memory cgroup can't be mapped to userspace. The underlying reason is simple: PageKmemcg flag is defined as a page type (like buddy, offline, etc), so it takes a b

[PATCH bpf-next v6 27/34] bpf: eliminate rlimit-based memory accounting for bpf ringbuffer

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf ringbuffer. It has been replaced with the memcg-based memory accounting. bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) and a valid pointer, so to simplify the code make it return NULL in the first case. This allows to drop a cou

[PATCH bpf-next v6 04/34] mm: convert page kmemcg type to a page memcg flag

2020-11-16 Thread Roman Gushchin
PageKmemcg flag is currently defined as a page type (like buddy, offline, table and guard). Semantically it means that the page was accounted as a kernel memory by the page allocator and has to be uncharged on the release. As a side effect of defining the flag as a page type, the accounted page c

[PATCH bpf-next v6 21/34] bpf: eliminate rlimit-based memory accounting for cgroup storage maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for cgroup storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/local_storage.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git

[PATCH bpf-next v6 07/34] bpf: memcg-based memory accounting for bpf maps

2020-11-16 Thread Roman Gushchin
This patch enables memcg-based memory accounting for memory allocated by __bpf_map_area_alloc(), which is used by many types of bpf maps for large memory allocations. Following patches in the series will refine the accounting for some of the map types. Signed-off-by: Roman Gushchin Acked-by: Son

[PATCH bpf-next v6 14/34] bpf: memcg-based memory accounting for bpf ringbuffer

2020-11-16 Thread Roman Gushchin
Enable the memcg-based memory accounting for the memory used by the bpf ringbuffer. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/ringbuf.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c index 31cb04a4dd

[PATCH bpf-next v6 08/34] bpf: refine memcg-based memory accounting for arraymap maps

2020-11-16 Thread Roman Gushchin
Include percpu arrays and auxiliary data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/arraymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index c6c81eceb68f.

Re: [PATCH v6 00/34] bpf: switch to memcg-based memory accounting

2020-11-16 Thread Roman Gushchin
On Mon, Nov 16, 2020 at 06:54:55PM -0800, Roman Gushchin wrote: > Currently bpf is using the memlock rlimit for the memory accounting. > This approach has its downsides and over time has created a significant > amount of problems: > I'm sorry, I've missed the "bpf-next" prefix in the subject. Res

[PATCH bpf-next v6 19/34] bpf: eliminate rlimit-based memory accounting for bpf_struct_ops maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf_struct_ops maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_struct_ops.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git

[PATCH bpf-next v6 28/34] bpf: eliminate rlimit-based memory accounting for sockmap and sockhash maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for sockmap and sockhash maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/sock_map.c | 33 ++--- 1 file changed, 6 insertions(+), 27 deletions(-)

[PATCH bpf-next v6 13/34] bpf: memcg-based memory accounting for lpm_trie maps

2020-11-16 Thread Roman Gushchin
Include lpm trie and lpm trie node objects into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/lpm_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index 00e32f2ec3e6.

[PATCH bpf-next v6 25/34] bpf: eliminate rlimit-based memory accounting for queue_stack_maps maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for queue_stack maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/queue_stack_maps.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/k

[PATCH bpf-next v6 30/34] bpf: eliminate rlimit-based memory accounting for xskmap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for xskmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/xdp/xskmap.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/net/xdp/xskmap.c b/net/

[PATCH bpf-next v6 32/34] bpf: eliminate rlimit-based memory accounting infra for bpf maps

2020-11-16 Thread Roman Gushchin
Remove rlimit-based accounting infrastructure code, which is not used anymore. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- include/linux/bpf.h | 12 kernel/bpf/syscall.c | 64 +-- .../selftests/bpf/progs/bpf_iter_b

[PATCH bpf-next v6 23/34] bpf: eliminate rlimit-based memory accounting for hashtab maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for hashtab maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/hashtab.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/kernel/bpf/h

[PATCH bpf-next v6 34/34] bpf: samples: do not touch RLIMIT_MEMLOCK

2020-11-16 Thread Roman Gushchin
Since bpf is not using rlimit memlock for the memory accounting and control, do not change the limit in sample applications. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- samples/bpf/map_perf_test_user.c| 6 -- samples/bpf/offwaketime_user.c | 6 -- samples/bpf/sockex2_u

[PATCH bpf-next v6 24/34] bpf: eliminate rlimit-based memory accounting for lpm_trie maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for lpm_trie maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/lpm_trie.c | 13 - 1 file changed, 13 deletions(-) diff --git a/kernel/bpf/lpm_trie.c b/kernel/b

[PATCH bpf-next v6 33/34] bpf: eliminate rlimit-based memory accounting for bpf progs

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf progs. It has been replaced with memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- include/linux/bpf.h | 11 -- kernel/bpf/core.c| 12 ++- kernel/bpf/syscall.c | 86 ++---

[PATCH bpf-next v6 17/34] bpf: refine memcg-based memory accounting for xskmap maps

2020-11-16 Thread Roman Gushchin
Extend xskmap memory accounting to include the memory taken by the xsk_map_node structure. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/xdp/xskmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c index 49da2b8ace8b..5d11d60d

[PATCH bpf-next v6 31/34] bpf: eliminate rlimit-based memory accounting for bpf local storage maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf local storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_local_storage.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/kernel/bpf/bpf_l

Re: [PATCHv5 iproute2-next 0/5] iproute2: add libbpf support

2020-11-16 Thread David Ahern
On 11/16/20 7:54 AM, Jesper Dangaard Brouer wrote: > When compiled against dynamic libbpf, then I would use 'ldd' command to > see what libbpf lib version is used. When compiled/linked statically > against a custom libbpf version (already supported via LIBBPF_DIR) then > *I* think is difficult to

Re: [PATCHv5 iproute2-next 0/5] iproute2: add libbpf support

2020-11-16 Thread Hangbin Liu
On Mon, Nov 16, 2020 at 06:37:57PM -0800, Alexei Starovoitov wrote: > On Mon, Nov 16, 2020 at 03:54:46PM +0100, Jesper Dangaard Brouer wrote: > > > > Thus, IMHO we MUST move forward and get started with converting > > iproute2 to libbpf, and start on the work to deprecate the build in > > BPF-ELF-

[PATCH net] rsi_91x: fix error return code in rsi_reset_card()

2020-11-16 Thread Zhang Changzhong
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 17ff2c794f39 ("rsi: reset device changes for 9116") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong --- drivers/net/wireless/rsi/rsi_91x_usb.c | 30 +++--

[PATCH v6 19/34] bpf: eliminate rlimit-based memory accounting for bpf_struct_ops maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf_struct_ops maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_struct_ops.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git

[PATCH net] net: b44: fix error return code in b44_init_one()

2020-11-16 Thread Zhang Changzhong
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 39a6f4bce6b4 ("b44: replace the ssb_dma API with the generic DMA API") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong --- drivers/net/ethernet/broadcom/b44.c | 3 ++

[PATCH v6 04/34] mm: convert page kmemcg type to a page memcg flag

2020-11-16 Thread Roman Gushchin
PageKmemcg flag is currently defined as a page type (like buddy, offline, table and guard). Semantically it means that the page was accounted as a kernel memory by the page allocator and has to be uncharged on the release. As a side effect of defining the flag as a page type, the accounted page c

[PATCH v6 23/34] bpf: eliminate rlimit-based memory accounting for hashtab maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for hashtab maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/hashtab.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/kernel/bpf/h

[PATCH v6 03/34] mm: introduce page memcg flags

2020-11-16 Thread Roman Gushchin
The lowest bit in page->memcg_data is used to distinguish between struct memory_cgroup pointer and a pointer to a objcgs array. All checks and modifications of this bit are open-coded. Let's formalize it using page memcg flags, defined in enum page_memcg_data_flags. Additional flags might be add

[PATCH v6 00/34] bpf: switch to memcg-based memory accounting

2020-11-16 Thread Roman Gushchin
Currently bpf is using the memlock rlimit for the memory accounting. This approach has its downsides and over time has created a significant amount of problems: 1) The limit is per-user, but because most bpf operations are performed as root, the limit has a little value. 2) It's hard to come u

[PATCH v6 15/34] bpf: memcg-based memory accounting for bpf local storage maps

2020-11-16 Thread Roman Gushchin
Account memory used by bpf local storage maps: per-socket and per-inode storages. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_local_storage.c | 7 --- net/core/bpf_sk_storage.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/bpf

[PATCH v6 02/34] mm: memcontrol/slab: use helpers to access slab page's memcg_data

2020-11-16 Thread Roman Gushchin
To gather all direct accesses to struct page's memcg_data field in one place, let's introduce 3 new helpers to use in the slab accounting code: struct obj_cgroup **page_objcgs(struct page *page); struct obj_cgroup **page_objcgs_check(struct page *page); bool set_page_objcgs(struct page *page

[PATCH v6 24/34] bpf: eliminate rlimit-based memory accounting for lpm_trie maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for lpm_trie maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/lpm_trie.c | 13 - 1 file changed, 13 deletions(-) diff --git a/kernel/bpf/lpm_trie.c b/kernel/b

[PATCH v6 12/34] bpf: refine memcg-based memory accounting for hashtab maps

2020-11-16 Thread Roman Gushchin
Include percpu objects and the size of map metadata into the accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu Reviewed-by: Shakeel Butt --- kernel/bpf/hashtab.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hash

[PATCH v6 21/34] bpf: eliminate rlimit-based memory accounting for cgroup storage maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for cgroup storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/local_storage.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git

[PATCH v6 08/34] bpf: refine memcg-based memory accounting for arraymap maps

2020-11-16 Thread Roman Gushchin
Include percpu arrays and auxiliary data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/arraymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index c6c81eceb68f.

[PATCH v6 30/34] bpf: eliminate rlimit-based memory accounting for xskmap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for xskmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/xdp/xskmap.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/net/xdp/xskmap.c b/net/

[PATCH v6 33/34] bpf: eliminate rlimit-based memory accounting for bpf progs

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf progs. It has been replaced with memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- include/linux/bpf.h | 11 -- kernel/bpf/core.c| 12 ++- kernel/bpf/syscall.c | 86 ++---

[PATCH v6 10/34] bpf: memcg-based memory accounting for cgroup storage maps

2020-11-16 Thread Roman Gushchin
Account memory used by cgroup storage maps including metadata structures. Account the percpu memory for the percpu flavor of cgroup storage. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/local_storage.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-)

[PATCH v6 11/34] bpf: refine memcg-based memory accounting for devmap maps

2020-11-16 Thread Roman Gushchin
Include map metadata and the node size (struct bpf_dtab_netdev) into the accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/devmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c index 2b5ca93c17de..e7

[PATCH v6 31/34] bpf: eliminate rlimit-based memory accounting for bpf local storage maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf local storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/bpf_local_storage.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/kernel/bpf/bpf_l

[PATCH v6 32/34] bpf: eliminate rlimit-based memory accounting infra for bpf maps

2020-11-16 Thread Roman Gushchin
Remove rlimit-based accounting infrastructure code, which is not used anymore. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- include/linux/bpf.h | 12 kernel/bpf/syscall.c | 64 +-- .../selftests/bpf/progs/bpf_iter_b

[PATCH v6 06/34] bpf: prepare for memcg-based memory accounting for bpf maps

2020-11-16 Thread Roman Gushchin
In the absolute majority of cases if a process is making a kernel allocation, it's memory cgroup is getting charged. Bpf maps can be updated from an interrupt context and in such case there is no process which can be charged. It makes the memory accounting of bpf maps non-trivial. Fortunately, af

[PATCH v6 27/34] bpf: eliminate rlimit-based memory accounting for bpf ringbuffer

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for bpf ringbuffer. It has been replaced with the memcg-based memory accounting. bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) and a valid pointer, so to simplify the code make it return NULL in the first case. This allows to drop a cou

[PATCH v6 07/34] bpf: memcg-based memory accounting for bpf maps

2020-11-16 Thread Roman Gushchin
This patch enables memcg-based memory accounting for memory allocated by __bpf_map_area_alloc(), which is used by many types of bpf maps for large memory allocations. Following patches in the series will refine the accounting for some of the map types. Signed-off-by: Roman Gushchin Acked-by: Son

[PATCH v6 17/34] bpf: refine memcg-based memory accounting for xskmap maps

2020-11-16 Thread Roman Gushchin
Extend xskmap memory accounting to include the memory taken by the xsk_map_node structure. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/xdp/xskmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c index 49da2b8ace8b..5d11d60d

[PATCH v6 34/34] bpf: samples: do not touch RLIMIT_MEMLOCK

2020-11-16 Thread Roman Gushchin
Since bpf is not using rlimit memlock for the memory accounting and control, do not change the limit in sample applications. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- samples/bpf/map_perf_test_user.c| 6 -- samples/bpf/offwaketime_user.c | 6 -- samples/bpf/sockex2_u

[PATCH v6 20/34] bpf: eliminate rlimit-based memory accounting for cpumap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for cpumap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/cpumap.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/kernel/bpf/cpumap

[PATCH v6 25/34] bpf: eliminate rlimit-based memory accounting for queue_stack_maps maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for queue_stack maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/queue_stack_maps.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/k

[PATCH v6 01/34] mm: memcontrol: use helpers to read page's memcg data

2020-11-16 Thread Roman Gushchin
Patch series "mm: allow mapping accounted kernel pages to userspace", v6. Currently a non-slab kernel page which has been charged to a memory cgroup can't be mapped to userspace. The underlying reason is simple: PageKmemcg flag is defined as a page type (like buddy, offline, etc), so it takes a b

[PATCH v6 14/34] bpf: memcg-based memory accounting for bpf ringbuffer

2020-11-16 Thread Roman Gushchin
Enable the memcg-based memory accounting for the memory used by the bpf ringbuffer. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/ringbuf.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c index 31cb04a4dd

[PATCH v6 18/34] bpf: eliminate rlimit-based memory accounting for arraymap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for arraymap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/arraymap.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/kern

[PATCH v6 13/34] bpf: memcg-based memory accounting for lpm_trie maps

2020-11-16 Thread Roman Gushchin
Include lpm trie and lpm trie node objects into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/lpm_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index 00e32f2ec3e6.

[PATCH v6 05/34] bpf: memcg-based memory accounting for bpf progs

2020-11-16 Thread Roman Gushchin
Include memory used by bpf programs into the memcg-based accounting. This includes the memory used by programs itself, auxiliary data, statistics and bpf line info. A memory cgroup containing the process which loads the program is getting charged. Signed-off-by: Roman Gushchin Acked-by: Song Liu

[PATCH v6 26/34] bpf: eliminate rlimit-based memory accounting for reuseport_array maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for reuseport_array maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/reuseport_array.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ke

[PATCH v6 22/34] bpf: eliminate rlimit-based memory accounting for devmap maps

2020-11-16 Thread Roman Gushchin
Do not use rlimit-based memory accounting for devmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/devmap.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/kernel/bpf/dev

[PATCH v6 09/34] bpf: refine memcg-based memory accounting for cpumap maps

2020-11-16 Thread Roman Gushchin
Include metadata and percpu data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- kernel/bpf/cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c index c61a23b564aa..563f96cc8a9d 10

[PATCH v6 16/34] bpf: refine memcg-based memory accounting for sockmap and sockhash maps

2020-11-16 Thread Roman Gushchin
Include internal metadata into the memcg-based memory accounting. Also include the memory allocated on updating an element. Signed-off-by: Roman Gushchin Acked-by: Song Liu --- net/core/sock_map.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/core/sock_map.c b/n

  1   2   3   4   5   >