projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c91c90
)
net: veth: fix packet segmentation in veth_convert_skb_to_xdp_buff
author
Lorenzo Bianconi
<lorenzo@kernel.org>
Mon, 4 Dec 2023 15:01:48 +0000
(16:01 +0100)
committer
Jakub Kicinski
<kuba@kernel.org>
Wed, 6 Dec 2023 03:24:26 +0000
(19:24 -0800)
Based on the previous allocated packet, page_offset can be not null
in veth_convert_skb_to_xdp_buff routine.
Take into account page fragment offset during the skb paged area copy
in veth_convert_skb_to_xdp_buff().
Fixes:
2d0de67da51a
("net: veth: use newly added page pool API for veth with xdp")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>
Link:
https://lore.kernel.org/r/eddfe549e7e626870071930964ac3c38a1dc8068.1701702000.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/veth.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/veth.c
b/drivers/net/veth.c
index 57efb3454c57aca0c5bf4e790226f2c7176c8468..977861c46b1fe16a27872b5df76e067409ae2da2 100644
(file)
--- a/
drivers/net/veth.c
+++ b/
drivers/net/veth.c
@@
-790,7
+790,8
@@
static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
skb_add_rx_frag(nskb, i, page, page_offset, size,
truesize);
- if (skb_copy_bits(skb, off, page_address(page),
+ if (skb_copy_bits(skb, off,
+ page_address(page) + page_offset,
size)) {
consume_skb(nskb);
goto drop;