[PATCH v3 net-next 3/5] net: introduce common dev_page_is_reusable()

2021-01-31 Thread Alexander Lobakin
() already folded inside to make driver code a bit simpler. Suggested-by: David Rientjes Suggested-by: Jakub Kicinski Cc: John Hubbard Signed-off-by: Alexander Lobakin Reviewed-by: Jesse Brandeburg Acked-by: David Rientjes --- include/linux/skbuff.h | 16 1 file changed, 16

Re: [PATCH v3 net-next 0/5] net: consolidate page_is_pfmemalloc() usage

2021-02-02 Thread Alexander Lobakin
From: Jakub Kicinski Date: Mon, 1 Feb 2021 17:18:35 -0800 > On Sun, 31 Jan 2021 12:11:16 +0000 Alexander Lobakin wrote: > > page_is_pfmemalloc() is used mostly by networking drivers to test > > if a page can be considered for reusing/recycling. > > It doesn't write a

[PATCH RESEND v3 net-next 0/5] net: consolidate page_is_pfmemalloc() usage

2021-02-02 Thread Alexander Lobakin
Ilias Apalodimas). [0] https://lore.kernel.org/netdev/20210125164612.243838-1-aloba...@pm.me [1] https://lore.kernel.org/netdev/20210127201031.98544-1-aloba...@pm.me [2] https://lore.kernel.org/lkml/20210131120844.7529-1-aloba...@pm.me Alexander Lobakin (5): mm: constify page_is_pfmemalloc

[PATCH RESEND v3 net-next 1/5] mm: constify page_is_pfmemalloc() argument

2021-02-02 Thread Alexander Lobakin
The function only tests for page->index, so its argument should be const. Signed-off-by: Alexander Lobakin Reviewed-by: Jesse Brandeburg Acked-by: David Rientjes --- include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mm.h b/include/linux/m

[PATCH RESEND v3 net-next 3/5] net: introduce common dev_page_is_reusable()

2021-02-02 Thread Alexander Lobakin
() already folded inside to make driver code a bit simpler. Suggested-by: David Rientjes Suggested-by: Jakub Kicinski Cc: John Hubbard Signed-off-by: Alexander Lobakin Reviewed-by: Jesse Brandeburg Acked-by: David Rientjes --- include/linux/skbuff.h | 16 1 file changed, 16

[PATCH RESEND v3 net-next 4/5] net: use the new dev_page_is_reusable() instead of private versions

2021-02-02 Thread Alexander Lobakin
Jakub Kicinski Cc: John Hubbard Signed-off-by: Alexander Lobakin --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 17 ++--- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 13 - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 15 +-- drivers/net/ethernet/

[PATCH RESEND v3 net-next 5/5] net: page_pool: simplify page recycling condition tests

2021-02-02 Thread Alexander Lobakin
pool_page_reusable() is a leftover from pre-NUMA-aware times. For now, this function is just a redundant wrapper over page_is_pfmemalloc(), so inline it into its sole call site. Signed-off-by: Alexander Lobakin Acked-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Reviewed-by: Jesse

[PATCH RESEND v3 net-next 2/5] skbuff: constify skb_propagate_pfmemalloc() "page" argument

2021-02-02 Thread Alexander Lobakin
The function doesn't write anything to the page struct itself, so this argument can be const. Misc: align second argument to the brace while at it. Signed-off-by: Alexander Lobakin Reviewed-by: Jesse Brandeburg Acked-by: David Rientjes --- include/linux/skbuff.h | 4 ++-- 1 file chang

[PATCH mips-next] MIPS: pistachio: remove obsolete include/asm/mach-pistachio

2021-02-04 Thread Alexander Lobakin
Since commit 02bd530f888c ("MIPS: generic: Increase NR_IRQS to 256") include/asm/mach-pistachio/irq.h just does nothing. Remove the file along with mach-pistachio folder and include compiler directive. Signed-off-by: Alexander Lobakin --- MAINTAINERS|

[v3 net-next 00/10] skbuff: introduce skbuff_heads bulking and reusing

2021-02-09 Thread Alexander Lobakin
ad of immediate freeing; - correct performance numbers after optimizations and performing lots of tests for different use cases. [0] https://lore.kernel.org/netdev/2021082655.12159-1-aloba...@pm.me [1] https://lore.kernel.org/netdev/20210113133523.39205-1-aloba...@pm.me Alexander Lobakin

[v3 net-next 01/10] skbuff: move __alloc_skb() next to the other skb allocation functions

2021-02-09 Thread Alexander Lobakin
In preparation before reusing several functions in all three skb allocation variants, move __alloc_skb() next to the __netdev_alloc_skb() and __napi_alloc_skb(). No functional changes. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 284 +++--- 1

[v3 net-next 04/10] skbuff: simplify __alloc_skb() a bit

2021-02-09 Thread Alexander Lobakin
Use unlikely() annotations for skbuff_head and data similarly to the two other allocation functions and remove totally redundant goto. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net/core/skbuff.c b/net

[v3 net-next 10/10] skbuff: queue NAPI_MERGED_FREE skbs into NAPI cache instead of freeing

2021-02-09 Thread Alexander Lobakin
() to skbuff.c, so it can drop skbs to NAPI cache. As many drivers call napi_alloc_skb()/napi_get_frags() on their receive path, this becomes especially useful. Signed-off-by: Alexander Lobakin --- include/linux/skbuff.h | 1 + net/core/dev.c | 9 + net/core/skbuff.c | 12

[v3 net-next 03/10] skbuff: make __build_skb_around() return void

2021-02-09 Thread Alexander Lobakin
__build_skb_around() can never fail and always returns passed skb. Make it return void to simplify and optimize the code. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/net/core/skbuff.c b/net/core

[v3 net-next 07/10] skbuff: move NAPI cache declarations upper in the file

2021-02-09 Thread Alexander Lobakin
NAPI cache structures will be used for allocating skbuff_heads, so move their declarations a bit upper. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 90 +++ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/net/core/skbuff.c

[v3 net-next 09/10] skbuff: reuse NAPI skb cache on allocation path (__alloc_skb())

2021-02-09 Thread Alexander Lobakin
from any context, so napi_safe == false. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 8747566a8136..8850086f8605 100644 --- a/net/core/skbuff.c +++ b/net/core

[v3 net-next 08/10] skbuff: reuse NAPI skb cache on allocation path (__build_skb())

2021-02-09 Thread Alexander Lobakin
}napi_alloc_skb() (called from the same place or from kernel network softirq functions). We can use that knowledge to avoid unnecessary checks. Suggested-by: Edward Cree # Unified cache part Suggested-by: Eric Dumazet# KASAN poisoning Suggested-by: Dmitry Vyukov# Help with KASAN Signed-of

[v3 net-next 06/10] skbuff: remove __kfree_skb_flush()

2021-02-09 Thread Alexander Lobakin
ggested-by: Eric Dumazet Signed-off-by: Alexander Lobakin --- include/linux/skbuff.h | 1 - net/core/dev.c | 6 +- net/core/skbuff.c | 12 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 0a

[v3 net-next 05/10] skbuff: use __build_skb_around() in __alloc_skb()

2021-02-09 Thread Alexander Lobakin
Just call __build_skb_around() instead of open-coding it. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 88566de26cd1..1c6f6ef70339 100644 --- a/net/core

[v3 net-next 02/10] skbuff: simplify kmalloc_reserve()

2021-02-09 Thread Alexander Lobakin
Eversince the introduction of __kmalloc_reserve(), "ip" argument hasn't been used. _RET_IP_ is embedded inside kmalloc_node_track_caller(). Remove the redundant macro and rename the function after it. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 7 ++- 1

Re: [PATCH] arm64: enable GENERIC_FIND_FIRST_BIT

2021-02-25 Thread Alexander Lobakin
From: Yury Norov Date: Wed, 24 Feb 2021 07:44:16 -0800 > On Wed, Feb 24, 2021 at 11:52:55AM +0000, Alexander Lobakin wrote: > > From: Yury Norov > > Date: Sat, 5 Dec 2020 08:54:06 -0800 > > > > Hi, > > > > > ARM64 doesn't implement find_first_{zer

Re: [PATCH] net/core/skbuff.c: __netdev_alloc_skb fix when len is greater than KMALLOC_MAX_SIZE

2021-02-27 Thread Alexander Lobakin
From: Pavel Skripkin Date: Fri, 26 Feb 2021 22:11:06 +0300 Hi, > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. > It was caused by __netdev_alloc_skb(), which doesn't check len value after > adding NET_SKB_PAD. > Order will be >= MAX_ORDER and passed to __alloc_pag

Re: [PATCH v1] qed: Use %pM format specifier for MAC addresses

2020-07-30 Thread Alexander Lobakin
; 2 files changed, 4 insertions(+), 7 deletions(-) Thanks! Acked-by: Alexander Lobakin > diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c > b/drivers/net/ethernet/qlogic/qed/qed_mcp.c > index 988d84564849..5be08f83e0aa 100644 > --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c > +

Re: [PATCH v1] qede: Use %pM format specifier for MAC addresses

2020-07-30 Thread Alexander Lobakin
From: Andy Shevchenko Date: Thu, 30 Jul 2020 19:00:57 +0300 > Convert to %pM instead of using custom code. > > Signed-off-by: Andy Shevchenko > --- > drivers/net/ethernet/qlogic/qede/qede_main.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Thanks! Acked-by:

[PATCH] mailmap: add entry for

2020-07-30 Thread Alexander Lobakin
My Marvell account has been suspended, map the address to my private mail. Signed-off-by: Alexander Lobakin --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index e662fdac632b..a96f1b38fa58 100644 --- a/.mailmap +++ b/.mailmap @@ -19,6 +19,7 @@ Aleksandar

Re: [RFC PATCH net] udp: check sk for UDP GRO fraglist

2021-01-11 Thread Alexander Lobakin
From: Steffen Klassert Date: Mon, 11 Jan 2021 09:43:22 +0100 > On Mon, Jan 11, 2021 at 11:02:42AM +0900, Dongseok Yi wrote: >> On 2021-01-08 22:35, Steffen Klassert wrote: >>> On Fri, Jan 08, 2021 at 09:52:28PM +0900, Dongseok Yi wrote: It is a workaround patch. UDP/IP header of UD

[PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-11 Thread Alexander Lobakin
-2 are preparation steps, while 3-5 do the real work. Alexander Lobakin (5): skbuff: rename fields of struct napi_alloc_cache to be more intuitive skbuff: open-code __build_skb() inside __napi_alloc_skb() skbuff: reuse skbuff_heads from flush_skb_cache if available skbuff: allocate

[PATCH net-next 3/5] skbuff: reuse skbuff_heads from flush_skb_cache if available

2021-01-11 Thread Alexander Lobakin
__napi_alloc_skb() anyway, regardless of where did our skbuff_head came from. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 3c904c29efbb..0e8c597ff6ce 100644 --- a/net/core/skbuff.c +++ b

[PATCH net-next 1/5] skbuff: rename fields of struct napi_alloc_cache to be more intuitive

2021-01-11 Thread Alexander Lobakin
truct napi_alloc_cache declaration for better reading. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7626a33cce59..17ae5e90f103 100644 --- a/net

[PATCH net-next 2/5] skbuff: open-code __build_skb() inside __napi_alloc_skb()

2021-01-11 Thread Alexander Lobakin
: Alexander Lobakin --- net/core/skbuff.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 17ae5e90f103..3c904c29efbb 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -485,6 +485,11 @@ struct sk_buff *__netdev_alloc_skb

[PATCH net-next 5/5] skbuff: refill skb_cache early from deferred-to-consume entries

2021-01-11 Thread Alexander Lobakin
Instead of unconditional queueing of ready-to-consume skbuff_heads to flush_skb_cache, feed skb_cache with them instead if it's not full already. This greatly reduces the frequency of kmem_cache_alloc_bulk() calls. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 5 + 1 file ch

[PATCH net-next 4/5] skbuff: allocate skbuff_heads by bulks instead of one by one

2021-01-11 Thread Alexander Lobakin
bulks in case of full depletion or after completing network softirqs. Signed-off-by: Alexander Lobakin --- net/core/skbuff.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 0e8c597ff6ce..57a7307689f3 100644 --- a

Re: [BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM

2021-01-11 Thread Alexander Lobakin
From: Nick Desaulniers Date: Mon, 11 Jan 2021 12:03:29 -0800 > Hi Alexander, > I'm genuinely trying to reproduce/understand this report, questions below: Hi Nick! > On Sat, Jan 9, 2021 at 11:15 AM Alexander Lobakin wrote: >> >> From: Nick Desaulniers >> Date

Re: [PATCH v5 mips-next 0/9] MIPS: vmlinux.lds.S sections fixes & cleanup

2021-01-11 Thread Alexander Lobakin
From: Kees Cook Date: Mon, 11 Jan 2021 11:53:39 -0800 > On Sun, Jan 10, 2021 at 11:53:50AM +0000, Alexander Lobakin wrote: >> This series hunts the problems discovered after manual enabling of >> ARCH_WANT_LD_ORPHAN_WARN. Notably: >> - adds the missing PAGE_ALIGNED_DATA() s

Re: [PATCH net-next 1/5] skbuff: rename fields of struct napi_alloc_cache to be more intuitive

2021-01-11 Thread Alexander Lobakin
From: Jonathan Lemon Date: Mon, 11 Jan 2021 10:49:45 -0800 > On Mon, Jan 11, 2021 at 06:28:21PM +0000, Alexander Lobakin wrote: >> skb_cache and skb_count fields are used to store skbuff_heads queued >> for freeing to flush them by bulks, and aren't related to allocation >

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Alexander Lobakin
From: Eric Dumazet Date: Tue, 12 Jan 2021 09:20:39 +0100 > On Mon, Jan 11, 2021 at 7:27 PM Alexander Lobakin wrote: >> >> Inspired by cpu_map_kthread_run() and _kfree_skb_defer() logics. >> >> Currently, all sorts of skb allocation always do allocate >

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Alexander Lobakin
From: Edward Cree Date: Tue, 12 Jan 2021 09:54:04 + > Without wishing to weigh in on whether this caching is a good idea... Well, we already have a cache to bulk flush "consumed" skbs, although kmem_cache_free() is generally lighter than kmem_cache_alloc(), and a page frag cache to allocate

[PATCH phy] PHY: Ingenic: fix unconditional build of phy-ingenic-usb

2020-12-22 Thread Alexander Lobakin
ework.") Signed-off-by: Alexander Lobakin --- drivers/phy/ingenic/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/ingenic/Makefile b/drivers/phy/ingenic/Makefile index 65d5ea00fc9d..1cb158d7233f 100644 --- a/drivers/phy/ingenic/Makefile +++ b/drivers/p

[PATCH pci] PCI: dwc: fix inverted condition of DMA mask setup warning

2020-12-22 Thread Alexander Lobakin
erting the condition. Misc: remove redundant braces around single statement. Fixes: 660c486590aa ("PCI: dwc: Set 32-bit DMA mask for MSI target address allocation") Signed-off-by: Alexander Lobakin --- drivers/pci/controller/dwc/pcie-designware-host.c | 3 +-- 1 file changed, 1 inser

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Alexander Lobakin
From: Eric Dumazet Date: Tue, 12 Jan 2021 13:32:56 +0100 > On Tue, Jan 12, 2021 at 11:56 AM Alexander Lobakin wrote: >> > >> >> Ah, I should've mentioned that I use UDP GRO Fraglists, so these >> numbers are for GRO. >> > > Right, this suggests

[PATCH net-next] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

2021-01-12 Thread Alexander Lobakin
an fraglisted UDP GRO in some cases due to not wasting one skbuff_head per every segment. Signed-off-by: Alexander Lobakin --- net/ipv4/udp_offload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index ff39e94781bf..9d71df

RE: [PATCH net-next] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

2021-01-13 Thread Alexander Lobakin
From: "'Alexander Lobakin'" From: Dongseok Yi" Date: Wed, 13 Jan 2021 12:59:45 +0900 > On 2021-01-13 12:10, Alexander Duyck wrote: >> On 1/12/21 1:16 PM, Alexander Lobakin wrote: >>> Commit 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")

Re: [BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM

2021-01-13 Thread Alexander Lobakin
From: Nick Desaulniers Date: Tue, 12 Jan 2021 14:14:58 -0800 > On Mon, Jan 11, 2021 at 12:50 PM Alexander Lobakin wrote: >> >>> The disassembly for me produces: >>> 399c: 3c 03 00 00 lui $3, 0 >>> 399c: R_MIPS_HI16 .te

[PATCH v2 net-next] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

2021-01-13 Thread Alexander Lobakin
very segment. Since v1 [0]: - drop redundant 'if (sk)' check (Alexander Duyck); - add a ref in the commit message to one more commit that was an important step for UDP GRO forwarding. [0] https://lore.kernel.org/netdev/20210112211536.261172-1-aloba...@pm.me Signed-off-by:

[PATCH v2 net-next 0/3] skbuff: introduce skbuff_heads reusing and bulking

2021-01-13 Thread Alexander Lobakin
Alexander Lobakin (3): skbuff: open-code __build_skb() inside __napi_alloc_skb() skbuff: (re)use NAPI skb cache on allocation path skbuff: recycle GRO_MERGED_FREE skbs into NAPI skb cache include/linux/skbuff.h | 1 + net/core/dev.c | 9 + net/core/skbuff.c | 74

[PATCH v2 net-next 2/3] skbuff: (re)use NAPI skb cache on allocation path

2021-01-13 Thread Alexander Lobakin
it's full on skb consuming, bulk-wipe the second half. Also try to balance its size after completing network softirqs (__kfree_skb_flush()). prefetchw() on CONFIG_SLUB is dropped since it makes no sense anymore. Suggested-by: Edward Cree Signed-off-by: Alexander Lobakin --- net/core/skb

[PATCH v2 net-next 3/3] skbuff: recycle GRO_MERGED_FREE skbs into NAPI skb cache

2021-01-13 Thread Alexander Lobakin
. Signed-off-by: Alexander Lobakin --- include/linux/skbuff.h | 1 + net/core/dev.c | 9 + net/core/skbuff.c | 12 +--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 7a057b1f1eb8..507f1598e446

[PATCH v2 net-next 1/3] skbuff: open-code __build_skb() inside __napi_alloc_skb()

2021-01-13 Thread Alexander Lobakin
: Alexander Lobakin --- net/core/skbuff.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 7626a33cce59..dc3300dc2ac4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -485,6 +485,11 @@ struct sk_buff *__netdev_alloc_skb

Re: [PATCH net v2] udp: ipv4: manipulate network header of NATed UDP GRO fraglist

2021-01-18 Thread Alexander Lobakin
> From: Steffen Klassert > Date: Mon, 18 Jan 2021 07:37:59 +0100 > > On Fri, Jan 15, 2021 at 05:12:33PM +0000, Alexander Lobakin wrote: >> From: Dongseok Yi >> Date: Fri, 15 Jan 2021 22:20:35 +0900 >> >>> UDP/IP header of UDP GROed frag_skbs are not upda

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-18 Thread Alexander Lobakin
From: Xuan Zhuo Date: Sat, 16 Jan 2021 10:44:53 +0800 > This patch is used to construct skb based on page to save memory copy > overhead. > > This has one problem: > > We construct the skb by fill the data page as a frag into the skb. In > this way, the linear space is empty, and the header inf

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-18 Thread Alexander Lobakin
From: Yunsheng Lin Date: Mon, 18 Jan 2021 20:40:52 +0800 > On 2021/1/16 10:44, Xuan Zhuo wrote: >> This patch is used to construct skb based on page to save memory copy >> overhead. >> >> This has one problem: >> >> We construct the skb by fill the data page as a frag into the skb. In >> this way

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-18 Thread Alexander Lobakin
From: Alexander Lobakin Date: Mon, 18 Jan 2021 13:00:17 + > From: Yunsheng Lin > Date: Mon, 18 Jan 2021 20:40:52 +0800 > >> On 2021/1/16 10:44, Xuan Zhuo wrote: >>> This patch is used to construct skb based on page to save memory copy >>> overhead. >>

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-18 Thread Alexander Lobakin
> From: Magnus Karlsson > Date: Mon, 18 Jan 2021 16:10:40 +0100 > > On Mon, Jan 18, 2021 at 3:47 PM Alexander Lobakin wrote: > > > > From: Alexander Lobakin > > Date: Mon, 18 Jan 2021 13:00:17 + > > > > > From: Yunsheng Lin > > > Date

[PATCH net-next 0/2] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

2021-01-18 Thread Alexander Lobakin
or UDP GRO forwarding. [0] https://lore.kernel.org/netdev/20210112211536.261172-1-aloba...@pm.me [1] https://lore.kernel.org/netdev/20210113103232.4761-1-aloba...@pm.me Alexander Lobakin (2): net: introduce UDP GRO netdev feature udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

[PATCH net-next 2/2] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

2021-01-18 Thread Alexander Lobakin
orwarding path, and the new NETIF_F_GRO_UDP is enabled on a receiving netdevice. Note that fraglisted UDP GRO now also depends on this feature, as NETIF_F_GRO_FRAGLIST isn't tied to any particular L4 protocol. Signed-off-by: Alexander Lobakin --- net/ipv4/udp_offload.c | 16 +++- 1

[PATCH net-next 1/2] net: introduce UDP GRO netdev feature

2021-01-18 Thread Alexander Lobakin
Introduce a new netdev_feature, NETIF_F_GRO_UDP, to allow user to turn UDP GRO on and off when there is no socket, e.g. when forwarding. Defaults to off to not change current datapath. Suggested-by: Paolo Abeni Signed-off-by: Alexander Lobakin --- include/linux/netdev_features.h | 4 +++- net

Re: [PATCH bpf-next] xsk: build skb by page

2021-01-19 Thread Alexander Lobakin
From: Xuan Zhuo Date: Sat, 16 Jan 2021 10:44:53 +0800 > This patch is used to construct skb based on page to save memory copy > overhead. > > This has one problem: > > We construct the skb by fill the data page as a frag into the skb. In > this way, the linear space is empty, and the header inf

Re: [PATCH bpf-next v2 3/3] xsk: build skb by page

2021-01-19 Thread Alexander Lobakin
From: Xuan Zhuo Date: Tue, 19 Jan 2021 17:45:12 +0800 > This patch is used to construct skb based on page to save memory copy > overhead. > > This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the > network card priv_flags supports IFF_TX_SKB_NO_LINEAR will use page to > directly c

Re: [PATCH bpf-next v2 2/3] virtio-net: support IFF_TX_SKB_NO_LINEAR

2021-01-19 Thread Alexander Lobakin
From: Xuan Zhuo Date: Tue, 19 Jan 2021 17:45:11 +0800 > Virtio net supports the case where the skb linear space is empty, so add > priv_flags. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio_net.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/v

[PATCH v3 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup

2021-01-07 Thread Alexander Lobakin
to be zero-sized instead of discarding (Fangrui). [0] https://lore.kernel.org/linux-mips/20210104121729.46981-1-aloba...@pm.me [1] https://lore.kernel.org/linux-mips/20210106200713.31840-1-aloba...@pm.me Alexander Lobakin (7): MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section

[PATCH v3 mips-next 1/7] MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section

2021-01-07 Thread Alexander Lobakin
xes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: sta...@vger.kernel.org # 4.4+ Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.ld

[PATCH v3 mips-next 2/7] MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS

2021-01-07 Thread Alexander Lobakin
aced in section `.gnu.attributes' mips-alpine-linux-musl-ld: warning: orphan section `.gnu.attributes' from `init/main.o' being placed in section `.gnu.attributes' Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/ar

[PATCH v3 mips-next 3/7] MIPS: properly stop .eh_frame generation

2021-01-07 Thread Alexander Lobakin
explicitly put CFI symbols into the .debug_frame section (except for VDSO). This allows us to drop .eh_frame from DISCARDS as it's no longer being generated. Fixes: 866b6a89c6d1 ("MIPS: Add DWARF unwinding to assembly") Suggested-by: Kees Cook Signed-off-by: Alexander Lobakin --

[PATCH v3 mips-next 7/7] MIPS: select ARCH_WANT_LD_ORPHAN_WARN

2021-01-07 Thread Alexander Lobakin
Now, after that all the sections are explicitly described and declared in vmlinux.lds.S, we can enable ld orphan warnings to prevent from missing any new sections in future. Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion

[PATCH v3 mips-next 5/7] MIPS: vmlinux.lds.S: explicitly declare .got table

2021-01-07 Thread Alexander Lobakin
nd place it at the end of .text section. Reported-by: Nathan Chancellor Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0f736d60d43e..4709959f6985 1006

[PATCH v3 mips-next 4/7] MIPS: vmlinux.lds.S: catch bad .rel.dyn at link time

2021-01-07 Thread Alexander Lobakin
s.S. Suggested-by: Fangrui Song Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0f4e46ea4458..0f736d60d43e 100644 --- a/arch/mips/kernel/vmli

[PATCH v3 mips-next 6/7] vmlinux.lds.h: catch compound literals into data and BSS

2021-01-07 Thread Alexander Lobakin
/lkml/20201211184633.3213045-3-samitolva...@google.com Suggested-by: Kees Cook Signed-off-by: Alexander Lobakin --- include/asm-generic/vmlinux.lds.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index b2b3d81

Re: [PATCH v2 mips-next 2/4] MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS

2021-01-07 Thread Alexander Lobakin
From: Kees Cook Date: Wed, 6 Jan 2021 15:26:18 -0800 > On Wed, Jan 06, 2021 at 10:36:38PM +0000, Alexander Lobakin wrote: >> From: Kees Cook >> Date: Wed, 6 Jan 2021 14:07:07 -0800 >> >>> On Wed, Jan 06, 2021 at 08:08:19PM +, Alexander Lobakin wrote: >>&g

Re: [PATCH v3 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup

2021-01-07 Thread Alexander Lobakin
; > Since v1 [0]: > - catch .got entries too as LLD may produce it (Nathan); > - check for unwanted sections to be zero-sized instead of >discarding (Fangrui). > > [0] https://lore.kernel.org/linux-mips/20210104121729.46981-1-aloba...@pm.me > [1] https://lore.kernel.

[PATCH v4 mips-next 1/7] MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section

2021-01-07 Thread Alexander Lobakin
xes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: sta...@vger.kernel.org # 4.4+ Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.ld

[PATCH v4 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup

2021-01-07 Thread Alexander Lobakin
-mips/20210106200713.31840-1-aloba...@pm.me [2] https://lore.kernel.org/linux-mips/20210107115120.281008-1-aloba...@pm.me Alexander Lobakin (7): MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS MIPS: properly stop .eh_frame ge

[PATCH v4 mips-next 3/7] MIPS: properly stop .eh_frame generation

2021-01-07 Thread Alexander Lobakin
explicitly put CFI symbols into the .debug_frame section (except for VDSO). This allows us to drop .eh_frame from DISCARDS as it's no longer being generated. Fixes: 866b6a89c6d1 ("MIPS: Add DWARF unwinding to assembly") Suggested-by: Kees Cook Signed-off-by: Alexander Lobakin --

[PATCH v4 mips-next 2/7] MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS

2021-01-07 Thread Alexander Lobakin
aced in section `.gnu.attributes' mips-alpine-linux-musl-ld: warning: orphan section `.gnu.attributes' from `init/main.o' being placed in section `.gnu.attributes' Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/ar

[PATCH v4 mips-next 5/7] MIPS: vmlinux.lds.S: explicitly declare .got table

2021-01-07 Thread Alexander Lobakin
nd place it at the end of .text section. Reported-by: Nathan Chancellor Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0f736d60d43e..4709959f6985 1006

[PATCH v4 mips-next 6/7] vmlinux.lds.h: catch compound literals into data and BSS

2021-01-07 Thread Alexander Lobakin
/lkml/20201211184633.3213045-3-samitolva...@google.com Suggested-by: Kees Cook Signed-off-by: Alexander Lobakin --- include/asm-generic/vmlinux.lds.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index b2b3d81

[PATCH v4 mips-next 7/7] MIPS: select ARCH_WANT_LD_ORPHAN_WARN

2021-01-07 Thread Alexander Lobakin
Now, after that all the sections are explicitly described and declared in vmlinux.lds.S, we can enable ld orphan warnings to prevent from missing any new sections in future. Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion

[PATCH v4 mips-next 4/7] MIPS: vmlinux.lds.S: catch bad .rel.dyn at link time

2021-01-07 Thread Alexander Lobakin
s.S. Suggested-by: Fangrui Song Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0f4e46ea4458..0f736d60d43e 100644 --- a/arch/mips/kernel/vmli

[BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM

2021-01-09 Thread Alexander Lobakin
Machine: MIPS32 R2 Big Endian (interAptiv (multi)) While testing MIPS with LLVM, I found a weird and very rare bug with MIPS relocs that LLVM emits into kernel modules. It happens on both 11.0.0 and latest git snapshot and applies, as I can see, only to references to static symbols. When the kern

Re: [PATCH v4 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup

2021-01-09 Thread Alexander Lobakin
From: Thomas Bogendoerfer Date: Sat, 9 Jan 2021 12:12:59 +0100 > On Thu, Jan 07, 2021 at 12:33:38PM +0000, Alexander Lobakin wrote: >> This series hunts the problems discovered after manual enabling of >> ARCH_WANT_LD_ORPHAN_WARN. Notably: >> - adds the missing PAGE_A

Re: [BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM

2021-01-09 Thread Alexander Lobakin
From: Nick Desaulniers Date: Sat, 9 Jan 2021 09:50:44 -0800 > On Sat, Jan 9, 2021 at 9:11 AM Alexander Lobakin wrote: >> >> Machine: MIPS32 R2 Big Endian (interAptiv (multi)) >> >> While testing MIPS with LLVM, I found a weird and very rare bug with >> MIPS r

Re: [BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM

2021-01-09 Thread Alexander Lobakin
From: Alexander Lobakin Date: Sat, 09 Jan 2021 19:15:31 + > From: Nick Desaulniers > Date: Sat, 9 Jan 2021 09:50:44 -0800 > >> On Sat, Jan 9, 2021 at 9:11 AM Alexander Lobakin wrote: >>> >>> Machine: MIPS32 R2 Big Endian (interAptiv (multi)) >>> &

Re: [BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM

2021-01-09 Thread Alexander Lobakin
From: Alexander Lobakin Date: Sat, 09 Jan 2021 23:29:26 + > From: Alexander Lobakin > Date: Sat, 09 Jan 2021 19:15:31 + > >> From: Nick Desaulniers >> Date: Sat, 9 Jan 2021 09:50:44 -0800 >> >>> On Sat, Jan 9, 2021 at 9:11 AM Alexander Lobakin wro

[PATCH v5 mips-next 0/9] MIPS: vmlinux.lds.S sections fixes & cleanup

2021-01-10 Thread Alexander Lobakin
https://lore.kernel.org/linux-mips/20210106200713.31840-1-aloba...@pm.me [2] https://lore.kernel.org/linux-mips/20210107115120.281008-1-aloba...@pm.me [3] https://lore.kernel.org/linux-mips/20210107123331.354075-1-aloba...@pm.me Alexander Lobakin (9): MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA(

[PATCH v5 mips-next 4/9] MIPS: properly stop .eh_frame generation

2021-01-10 Thread Alexander Lobakin
explicitly put CFI symbols into the .debug_frame section (except for VDSO). This allows us to drop .eh_frame from DISCARDS as it's no longer being generated. Fixes: 866b6a89c6d1 ("MIPS: Add DWARF unwinding to assembly") Suggested-by: Kees Cook Signed-off-by: Alexander Lobakin Revie

[PATCH v5 mips-next 3/9] MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS

2021-01-10 Thread Alexander Lobakin
aced in section `.gnu.attributes' mips-alpine-linux-musl-ld: warning: orphan section `.gnu.attributes' from `init/main.o' being placed in section `.gnu.attributes' Signed-off-by: Alexander Lobakin Reviewed-by: Nathan Chancellor --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed

[PATCH v5 mips-next 1/9] MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section

2021-01-10 Thread Alexander Lobakin
xes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: sta...@vger.kernel.org # 4.4+ Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.l

[PATCH v5 mips-next 9/9] MIPS: select ARCH_WANT_LD_ORPHAN_WARN

2021-01-10 Thread Alexander Lobakin
Now, after that all the sections are explicitly described and declared in vmlinux.lds.S, we can enable ld orphan warnings to prevent from missing any new sections in future. Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- arch/mips/Kconfig | 1 + 1

[PATCH v5 mips-next 2/9] MIPS: CPS: don't create redundant .text.cps-vec section

2021-01-10 Thread Alexander Lobakin
inux.lds.S respectively. As said, this does not affect related functions alignment: 80116000 T mips_cps_core_entry 80116028 t not_nmi 80116200 T excep_tlbfill 80116280 T excep_xtlbfill 80116300 T excep_cache 80116380 T excep_genex 80116400 T excep_intex 80116480 T excep_ejtag 80116490 T mips_cps_core_init

[PATCH v5 mips-next 6/9] MIPS: vmlinux.lds.S: explicitly declare .got table

2021-01-10 Thread Alexander Lobakin
.text section. Reported-by: Nathan Chancellor Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- arch/mips/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 7

[PATCH v5 mips-next 5/9] MIPS: vmlinux.lds.S: explicitly catch .rel.dyn symbols

2021-01-10 Thread Alexander Lobakin
9.ga4...@alpha.franken.de Reported-by: Thomas Bogendoerfer Signed-off-by: Alexander Lobakin --- arch/mips/kernel/vmlinux.lds.S | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 10d8f0dcb76b..70bba1ff08da 100644 --- a/arch/

[PATCH v5 mips-next 8/9] vmlinux.lds.h: catch UBSAN's "unnamed data" into data

2021-01-10 Thread Alexander Lobakin
'.data.$__unnamed_5' [...] Also handle this by adding the related sections to generic definitions. Signed-off-by: Alexander Lobakin --- include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/in

[PATCH v5 mips-next 7/9] vmlinux.lds.h: catch compound literals into data and BSS

2021-01-10 Thread Alexander Lobakin
/lkml/20201211184633.3213045-3-samitolva...@google.com Suggested-by: Sami Tolvanen Suggested-by: Kees Cook Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- include/asm-generic/vmlinux.lds.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --gi

[PATCH mips-fixes] MIPS: relocatable: fix possible boot hangup with KASLR enabled

2021-01-10 Thread Alexander Lobakin
;) Cc: sta...@vger.kernel.org # 4.7+ Signed-off-by: Alexander Lobakin --- arch/mips/kernel/relocate.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/relocate.c b/arch/mips/kernel/relocate.c index 47aeb3350a76..0e365b7c742d 100644 --- a/arch/mips/kernel/reloca

Re: [PATCH v2 net-next] udp: allow forwarding of plain (non-fraglisted) UDP GRO packets

2021-01-14 Thread Alexander Lobakin
From: Paolo Abeni Date: Wed, 13 Jan 2021 19:37:18 +0100 > On Wed, 2021-01-13 at 10:32 +0000, Alexander Lobakin wrote: >> Commit 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") actually >> not only added a support for fraglisted UDP GRO, but also tweaked >&g

Re: [PATCH v2 net-next 2/3] skbuff: (re)use NAPI skb cache on allocation path

2021-01-14 Thread Alexander Lobakin
From: Eric Dumazet Date: Wed, 13 Jan 2021 15:36:05 +0100 > On Wed, Jan 13, 2021 at 2:37 PM Alexander Lobakin wrote: >> >> Instead of calling kmem_cache_alloc() every time when building a NAPI >> skb, (re)use skbuff_heads from napi_alloc_cache.skb_cache. Previously >&g

Re: [PATCH v2 net-next 2/3] skbuff: (re)use NAPI skb cache on allocation path

2021-01-14 Thread Alexander Lobakin
From: Dmitry Vyukov Date: Thu, 14 Jan 2021 12:47:31 +0100 > On Thu, Jan 14, 2021 at 12:41 PM Alexander Lobakin wrote: >> >> From: Eric Dumazet >> Date: Wed, 13 Jan 2021 15:36:05 +0100 >> >>> On Wed, Jan 13, 2021 at 2:37 PM Alexander Lobakin wrote: >>&

Re: [PATCH v2 net-next 2/3] skbuff: (re)use NAPI skb cache on allocation path

2021-01-14 Thread Alexander Lobakin
From: Dmitry Vyukov Date: Thu, 14 Jan 2021 13:50:25 +0100 > On Thu, Jan 14, 2021 at 1:44 PM Alexander Lobakin wrote: >> >> From: Dmitry Vyukov >> Date: Thu, 14 Jan 2021 12:47:31 +0100 >> >>> On Thu, Jan 14, 2021 at 12:41 PM Alexander Lobakin wrote: >>

Re: [PATCH v2 net-next 2/3] skbuff: (re)use NAPI skb cache on allocation path

2021-01-14 Thread Alexander Lobakin
From: Dmitry Vyukov Date: Thu, 14 Jan 2021 13:51:44 +0100 > On Thu, Jan 14, 2021 at 1:50 PM Dmitry Vyukov wrote: >> >> On Thu, Jan 14, 2021 at 1:44 PM Alexander Lobakin wrote: >>> >>> From: Dmitry Vyukov >>> Date: Thu, 14 Jan 2021 12:47:31 +0100

[PATCH mips-next 0/2] MIPS: fix -Wshadow in include files

2021-01-14 Thread Alexander Lobakin
Fix two -Wshadow warnings coming from the include files and thus repetitive and very annoying when building lots of sources. Alexander Lobakin (2): MIPS: bitops: fix -Wshadow in asm/bitops.h MIPS: pgtable: fix -Wshadow in asm/pgtable.h arch/mips/include/asm/bitops.h | 10 +- arch

[PATCH mips-next 1/2] MIPS: bitops: fix -Wshadow in asm/bitops.h

2021-01-14 Thread Alexander Lobakin
ed declaration is here 266 | unsigned long res, orig; | ^~~~ Signed-off-by: Alexander Lobakin --- arch/mips/include/asm/bitops.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h

<    1   2   3   4   5   6   >