st GRO for napi_gro_frags() that became very slow
after the mentioned commit, and preserves the introduced check to
avoid silent unaligned accesses.
Fixes: 38ec4944b593 ("gro: ensure frag0 meets IP header alignment")
Signed-off-by: Alexander Lobakin
---
net/core/dev.c | 8
1 file changed
2021 16:13:12 +0200, Magnus Karlsson
> > wrote:
> > > On Wed, Mar 31, 2021 at 2:27 PM Alexander Lobakin wrote:
> > > >
> > > > This series is based on the exceptional generic zerocopy xmit logics
> > > > initially introduced by Xuan Zhuo. It extend
From: Eric Dumazet
Date: Mon, 19 Apr 2021 13:05:16 +0200
> On Sun, Apr 18, 2021 at 1:43 PM Alexander Lobakin wrote:
> >
> > Commit 38ec4944b593 ("gro: ensure frag0 meets IP header alignment")
> > did the right thing, but missed the fact that napi_g
iewed-by from Eric.
[0] https://lore.kernel.org/netdev/20210418114200.5839-1-aloba...@pm.me
Fixes: 38ec4944b593 ("gro: ensure frag0 meets IP header alignment")
Reviewed-by: Eric Dumazet
Signed-off-by: Alexander Lobakin
---
net/core/dev.c | 8
1 file changed, 4 insertions(+
From: Xuan Zhuo
Date: Thu, 11 Apr 2024 10:51:22 +0800
> The virtio-net big mode sq will use these APIs to map the pages.
>
> dma_addr_t virtqueue_dma_map_page_attrs(struct virtqueue *_vq, struct page
> *page,
>size_t offset, size_t size,
>
From: Xuan Zhuo
Date: Tue, 20 Aug 2024 15:19:13 +0800
> leads to regression on VM with the sysctl value of:
Where's the beginning of the sentence? You mean, "This overflow leads"?
>
> - net.core.high_order_alloc_disable=1
This `- ` can be removed - at least some syntax highlighters color it i
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
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
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.")
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:
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
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
.
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
: 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
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
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
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:
>>&
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:
>>
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
ed manually via
__netdev_alloc_skb(), where the check for size hasn't been changed.
Mirror the condition from __napi_alloc_skb() to prevent from that.
Fixes: 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs")
Signed-off-by: Alexander Lobakin
---
net/core/skbuff.c | 6 +-
From: Steffen Klassert
Date: Fri, 15 Jan 2021 10:27:52 +0100
> On Fri, Jan 15, 2021 at 05:55:22PM +0900, Dongseok Yi wrote:
>> On 2021-01-15 17:12, Steffen Klassert wrote:
>>> On Fri, Jan 15, 2021 at 02:58:24PM +0900, Dongseok Yi wrote:
UDP/IP header of UDP GROed frag_skbs are not updated ev
From: Dongseok Yi
Date: Fri, 15 Jan 2021 20:21:06 +0900
> On 2021-01-15 19:51, Alexander Lobakin wrote:
>> From: Steffen Klassert
>> Date: Fri, 15 Jan 2021 10:27:52 +0100
>>
>>> On Fri, Jan 15, 2021 at 05:55:22PM +0900, Dongseok Yi wrote:
>>>> O
From: Eric Dumazet
Date: Fri, 15 Jan 2021 15:28:37 +0100
> On Fri, Jan 15, 2021 at 12:55 AM Alexander Lobakin wrote:
>>
>> Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for
>> tiny skbs") ensured that skbs with data size lower than 1025 bytes
to handle this case too.
Since v1 [0]:
- fix "Fixes:" tag;
- refine commit message (mention copybreak usecase).
[0] https://lore.kernel.org/netdev/20210114235423.232737-1-aloba...@pm.me
Fixes: a1c7fff7e18f ("net: netdev_alloc_skb() use build_skb()")
Signed-off-by: Alexander
/
> I was trying to write a quick fix, but it was not easy to forward
> segmented list. Currently, assuming DNAT only.
>
> v2:
> Per Steffen Klassert request, move the procedure from
> udp4_ufo_fragment to __udp_gso_segment_list and support SNAT.
>
> To Alexander Lobakin, I'v
rom linux/{mdio,phy}.h to static inlines
to avoid self-shadowing and potentially improve bug-catching.
No functional changes implied.
Signed-off-by: Alexander Lobakin
---
include/linux/mdio.h | 23 ++-
include/linux/phy.h | 7 +--
2 files changed, 23 insertions(+), 7 d
> 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
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
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
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.
>>
> 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
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
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
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
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
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
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
From: Xuan Zhuo
Date: Wed, 20 Jan 2021 16:30:56 +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
0 00 00 00 00 00 00 00 00
> mlx5_core :3b:00.1 eth1: ERR CQE on SQ: 0x1dbb
>
> So a priv_flag is added here to indicate whether the network card
> supports this feature.
>
> Signed-off-by: Xuan Zhuo
> Suggested-by: Alexander Lobakin
Acked-by: Alexander Lobakin
From: Willem de Bruijn
Date: Thu, 21 Jan 2021 21:47:47 -0500
> On Mon, Jan 18, 2021 at 2:33 PM Alexander Lobakin wrote:
> >
> > Commit 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") actually
> > not only added a support for fraglisted UDP GRO, but also tweak
From: Eric Dumazet
Date: Thu, 21 Jan 2021 16:41:33 +0100
> On 1/21/21 2:47 PM, Xuan Zhuo wrote:
> > 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 support
From: Alexander Lobakin
Date: Fri, 22 Jan 2021 11:47:45 +
> From: Eric Dumazet
> Date: Thu, 21 Jan 2021 16:41:33 +0100
>
> > On 1/21/21 2:47 PM, Xuan Zhuo wrote:
> > > This patch is used to construct skb based on page to save memory copy
> > > overhe
From: Alexander Lobakin
Date: Fri, 22 Jan 2021 11:55:35 +
> From: Alexander Lobakin
> Date: Fri, 22 Jan 2021 11:47:45 +
>
> > From: Eric Dumazet
> > Date: Thu, 21 Jan 2021 16:41:33 +0100
> >
> > > On 1/21/21 2:47 PM, Xuan Zhuo wrote:
> > >
From: Magnus Karlsson
Date: Fri, 22 Jan 2021 13:18:47 +0100
> On Fri, Jan 22, 2021 at 12:57 PM Alexander Lobakin wrote:
> >
> > From: Alexander Lobakin
> > Date: Fri, 22 Jan 2021 11:47:45 +
> >
> > > From: Eric Dumazet
> > > Date: Thu, 21 Jan 2
From: Xuan Zhuo
Date: Fri, 22 Jan 2021 23:36:29 +0800
> On Fri, 22 Jan 2021 12:08:00 +0000, Alexander Lobakin wrote:
> > From: Alexander Lobakin
> > Date: Fri, 22 Jan 2021 11:55:35 +
> >
> > > From: Alexander Lobakin
> > > Date: Fri, 22 Jan 2021
From: Xuan Zhuo
Date: Fri, 22 Jan 2021 23:39:15 +0800
> On Fri, 22 Jan 2021 13:55:14 +0100, Magnus Karlsson
> wrote:
> > On Fri, Jan 22, 2021 at 1:39 PM Alexander Lobakin wrote:
> > >
> > > From: Magnus Karlsson
> > > Date: Fri, 22 Jan 2021 13:18:47 +
From: Magnus Karlsson
Date: Fri, 22 Jan 2021 19:37:06 +0100
> On Fri, Jan 22, 2021 at 6:26 PM Alexander Lobakin wrote:
> >
> > From: Xuan Zhuo
> > Date: Fri, 22 Jan 2021 23:39:15 +0800
> >
> > > On Fri, 22 Jan 2021 13:55:14 +0100, Magnus Karlsson
> >
ence. This keeps the current behaviour
and is generally more optimal for now, as the number of NICs with
hardware USO offload is relatively small.
Signed-off-by: Alexander Lobakin
---
net/ipv4/udp_offload.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/udp_
Introduce a new netdev feature, NETIF_F_GRO_UDP_FWD, to allow user
to turn UDP GRO on and off for 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/ethtool/common.c
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
[2] https://lore.kernel.org/netdev/20210118193122.87271-1-aloba...@pm.me
Alexander Lobakin (2):
net: introduce a netdev feature for UDP
From: Alexander Duyck
Date: Thu, 11 Feb 2021 19:18:45 -0800
> On Thu, Feb 11, 2021 at 11:00 AM Alexander Lobakin wrote:
> >
> > Reuse the old and forgotten SKB_ALLOC_NAPI to add an option to get
> > an skbuff_head from the NAPI cache instead of inplace allocation
&
From: Alexander Duyck
Date: Thu, 11 Feb 2021 19:28:52 -0800
> On Thu, Feb 11, 2021 at 10:57 AM Alexander Lobakin wrote:
> >
> > This function isn't much needed as NAPI skb queue gets bulk-freed
> > anyway when there's no more room, and even may reduce the ef
https://lore.kernel.org/netdev/20210113133523.39205-1-aloba...@pm.me
[2] https://lore.kernel.org/netdev/20210209204533.327360-1-aloba...@pm.me
[3] https://lore.kernel.org/netdev/20210210162732.80467-1-aloba...@pm.me
[4] https://lore.kernel.org/netdev/20210211185220.9753-1-aloba...@pm.me
Alexande
__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
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
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
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
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
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
, 32}).
Suggested-by: Edward Cree # Divide on two halves
Suggested-by: Eric Dumazet# KASAN poisoning
Cc: Dmitry Vyukov # Help with KASAN
Cc: Paolo Abeni # Reduced batch size
Signed-off-by: Alexander Lobakin
---
include/linux/skbuff.h | 2 +
net/core/skbuff.c
kmalloc and page
frag paths.
Signed-off-by: Alexander Lobakin
---
net/core/skbuff.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index a80581eed7fc..875e1a453f7e 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -562,7
# Simplified flags check
Signed-off-by: Alexander Lobakin
---
net/core/skbuff.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 9e1a8ded4acc..a80581eed7fc 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -405,7 +405,11
ggested-by: Eric Dumazet
Signed-off-by: Alexander Lobakin
---
include/linux/skbuff.h | 1 -
net/core/dev.c | 7 +--
net/core/skbuff.c | 12
3 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0a
() 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
ver.1611236588.git.xuanz...@linux.alibaba.com
Alexander Lobakin (3):
netdev_priv_flags: add missing IFF_PHONY_HEADROOM self-definition
netdevice: check for net_device::priv_flags bitfield overflow
xsk: respect device's headroom and tailroom on generic xmit path
Xuan Zhuo (3):
net: ad
We almost ran out of unsigned int bitwidth. Define priv flags and
check for potential overflow in the fashion of netdev_features_t.
Defined this way, priv_flags can be easily expanded later with
just changing its typedef.
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 135
This is harmless for now, but comes fatal for the subsequent patch.
Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom")
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/netdevice.h b/inc
whether the network card
supports this feature.
Signed-off-by: Xuan Zhuo
Suggested-by: Alexander Lobakin
[ alobakin: give a new flag more detailed description ]
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux
but in fact need it (not so rare case).
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Alexander Lobakin
---
net/xdp/xsk.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 4faabd1ecfd1..143979ea4165 100644
-
ear ]
Signed-off-by: Alexander Lobakin
---
net/xdp/xsk.c | 119 --
1 file changed, 95 insertions(+), 24 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 143979ea4165..ff7bd06e1241 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -445,6 +445
From: Xuan Zhuo
Virtio net supports the case where the skb linear space is empty, so add
priv_flags.
Signed-off-by: Xuan Zhuo
Acked-by: Michael S. Tsirkin
Signed-off-by: Alexander Lobakin
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
From: Magnus Karlsson
Date: Tue, 16 Feb 2021 15:08:26 +0100
> On Tue, Feb 16, 2021 at 12:44 PM Alexander Lobakin wrote:
> >
> > From: Xuan Zhuo
> >
> > This patch is used to construct skb based on page to save memory copy
> > overhead.
> >
&g
ivers to avoid potential reallocations;
- fix skb->truesize accounting;
- misc comment rewords.
[0]
https://lore.kernel.org/netdev/cover.1611236588.git.xuanz...@linux.alibaba.com
[1] https://lore.kernel.org/netdev/20210216113740.62041-1-aloba...@pm.me
Alexander Lobakin (3):
netdev_priv_flags: add
We almost ran out of unsigned int bitwidth. Define priv flags and
check for potential overflow in the fashion of netdev_features_t.
Defined this way, priv_flags can be easily expanded later with
just changing its typedef.
Signed-off-by: Alexander Lobakin
Reported-by: kernel test robot
whether the network card
supports this feature.
Signed-off-by: Xuan Zhuo
Suggested-by: Alexander Lobakin
[ alobakin: give a new flag more detailed description ]
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux
From: Xuan Zhuo
Virtio net supports the case where the skb linear space is empty, so add
priv_flags.
Signed-off-by: Xuan Zhuo
Acked-by: Michael S. Tsirkin
Signed-off-by: Alexander Lobakin
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
This is harmless for now, but comes fatal for the subsequent patch.
Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom")
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/netdevice.h b/inc
ear ]
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
---
net/xdp/xsk.c | 119 --
1 file changed, 95 insertions(+), 24 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 143979ea4165..ff7bd06e1241 100644
--- a/net/xdp/xsk.c
+++ b/
but in fact need it (not so rare case).
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
---
net/xdp/xsk.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 4faabd1ec
From: Alexander Lobakin
Date: Tue, 16 Feb 2021 14:35:02 +
> From: Xuan Zhuo
>
> 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 car
This is harmless for now, but comes fatal for the subsequent patch.
Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom")
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/netdevice.h b/inc
We almost ran out of unsigned int bitwidth. Define priv flags and
check for potential overflow in the fashion of netdev_features_t.
Defined this way, priv_flags can be easily expanded later with
just changing its typedef.
Signed-off-by: Alexander Lobakin
Reported-by: kernel test robot
041-1-aloba...@pm.me
[2] https://lore.kernel.org/netdev/2021021614.5861-1-aloba...@pm.me
Alexander Lobakin (3):
netdev_priv_flags: add missing IFF_PHONY_HEADROOM self-definition
netdevice: check for net_device::priv_flags bitfield overflow
xsk: respect device's headroom and tailroom
whether the network card
supports this feature.
Signed-off-by: Xuan Zhuo
Suggested-by: Alexander Lobakin
[ alobakin: give a new flag more detailed description ]
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux
From: Xuan Zhuo
Virtio net supports the case where the skb linear space is empty, so add
priv_flags.
Signed-off-by: Xuan Zhuo
Acked-by: Michael S. Tsirkin
Signed-off-by: Alexander Lobakin
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
but in fact need it (not so rare case).
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
---
net/xdp/xsk.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 4faabd1ec
ear ]
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
---
net/xdp/xsk.c | 120 --
1 file changed, 96 insertions(+), 24 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 143979ea4165..a71ed664da0a 100644
--- a/net/xdp/xsk.c
+++ b/
netdev/cover.1611236588.git.xuanz...@linux.alibaba.com
[1] https://lore.kernel.org/netdev/20210216113740.62041-1-aloba...@pm.me
[2] https://lore.kernel.org/netdev/2021021614.5861-1-aloba...@pm.me
[3] https://lore.kernel.org/netdev/20210216172640.374487-1-aloba...@pm.me
Alexander Lobakin (3):
This is harmless for now, but comes fatal for the subsequent patch.
Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom")
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/netdevice.h b/inc
whether the network card
supports this feature.
Signed-off-by: Xuan Zhuo
Suggested-by: Alexander Lobakin
[ alobakin: give a new flag more detailed description ]
Signed-off-by: Alexander Lobakin
---
include/linux/netdevice.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux
We almost ran out of unsigned int bitwidth. Define priv flags and
check for potential overflow in the fashion of netdev_features_t.
Defined this way, priv_flags can be easily expanded later with
just changing its typedef.
Signed-off-by: Alexander Lobakin
Reported-by: kernel test robot
From: Xuan Zhuo
Virtio net supports the case where the skb linear space is empty, so add
priv_flags.
Signed-off-by: Xuan Zhuo
Acked-by: Michael S. Tsirkin
Signed-off-by: Alexander Lobakin
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
but in fact need it (not so rare case).
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
---
net/xdp/xsk.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 4faabd1ec
ear ]
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
---
net/xdp/xsk.c | 120 --
1 file changed, 96 insertions(+), 24 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 143979ea4165..a71ed664da0a 100644
--- a/net/xdp/xsk.c
+++ b/
1-aloba...@pm.me
[4] https://lore.kernel.org/netdev/20210217120003.7938-1-aloba...@pm.me
Alexander Lobakin (2):
netdevice: add missing IFF_PHONY_HEADROOM self-definition
xsk: respect device's headroom and tailroom on generic xmit path
Xuan Zhuo (3):
net: add priv_flags for allow tx skb without
This is harmless for now, but can be fatal for future refactors.
Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom")
Signed-off-by: Alexander Lobakin
Acked-by: John Fastabend
---
include/linux/netdevice.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/n
whether the network card
supports this feature.
Signed-off-by: Xuan Zhuo
Suggested-by: Alexander Lobakin
[ alobakin: give a new flag more detailed description ]
Signed-off-by: Alexander Lobakin
Acked-by: John Fastabend
---
include/linux/netdevice.h | 4
1 file changed, 4 insertions(+)
diff
From: Xuan Zhuo
Virtio net supports the case where the skb linear space is empty, so add
priv_flags.
Signed-off-by: Xuan Zhuo
Acked-by: Michael S. Tsirkin
Signed-off-by: Alexander Lobakin
Acked-by: John Fastabend
---
drivers/net/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+), 1
but in fact need it (not so rare case).
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
Acked-by: John Fastabend
---
net/xdp/xsk.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xs
ear ]
Signed-off-by: Alexander Lobakin
Acked-by: Magnus Karlsson
Acked-by: John Fastabend
---
net/xdp/xsk.c | 120 --
1 file changed, 96 insertions(+), 24 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 143979ea4165..a71ed664da0a 100
1 - 100 of 434 matches
Mail list logo