[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eccc6a46-77a0-3980-1b7b-c4a07560cc42@huawei.com>
Date: Tue, 5 Dec 2023 08:26:04 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>, <netdev@...r.kernel.org>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <lorenzo.bianconi@...hat.com>,
<alexander.duyck@...il.com>, <aleksander.lobakin@...el.com>,
<liangchen.linux@...il.com>
Subject: Re: [PATCH net] net: veth: fix packet segmentation in
veth_convert_skb_to_xdp_buff
On 2023/12/4 23:01, Lorenzo Bianconi wrote:
> 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")
LGTM.
Reviewed-by: Yunsheng Lin <linyunsheng@...wei.com>
Thanks for the fix.
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
> drivers/net/veth.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index 57efb3454c57..977861c46b1f 100644
> --- 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;
>
Powered by blists - more mailing lists