[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <42F24D1E-E60D-49C6-935D-BB5E1E7290CC@gmail.com>
Date: Wed, 4 Oct 2023 11:33:34 +0300
From: Martin Zaharinov <micron10@...il.com>
To: William Tu <u9012063@...il.com>
Cc: Alexander Duyck <alexanderduyck@...com>,
alexandr.lobakin@...el.com,
netdev <netdev@...r.kernel.org>,
Sankararaman Jayaraman <jsankararama@...are.com>,
doshir@...are.com,
Boon Ang <bang@...are.com>
Subject: Re: Vmxnet3 v22 - bug
Hi William,
Yes this patch fix problem ,
i will make little test if see any problem will update you.
Thanks for your great work!
Martin
> On 30 Sep 2023, at 20:03, William Tu <u9012063@...il.com> wrote:
>
> On Fri, Sep 29, 2023 at 1:30 PM William Tu <u9012063@...il.com> wrote:
>>
>> On Mon, Sep 4, 2023 at 9:24 AM Martin Zaharinov <micron10@...il.com> wrote:
>>>
>>> Hi William Tu
>>>
>>>
>>> this is report of bug with latest version of vmxnet3 xdp support:
>>>
>>>
>>> [ 92.417855] ------------[ cut here ]------------
>>> [ 92.417855] XDP_WARN: xdp_update_frame_from_buff(line:278): Driver BUG: missing reserved tailroom
>>> [ 92.417855] WARNING: CPU: 0 PID: 0 at net/core/xdp.c:586 xdp_warn+0xf/0x20
>>> [ 92.417855] Modules linked in: pppoe pppox ppp_generic slhc virtio_net net_failover failover virtio_pci virtio_pci_legacy_dev virtio_pci_modern_dev virtio virtio_ring vmxnet3
>>> [ 92.417855] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 6.5.1 #1
>>> [ 92.417855] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
>>> [ 92.417855] RIP: 0010:xdp_warn+0xf/0x20
>>> [ 92.417855] Code: 00 00 c3 0f 1f 84 00 00 00 00 00 83 7f 0c 01 0f 94 c0 c3 0f 1f 84 00 00 00 00 00 48 89 f9 48 c7 c7 3d b2 e4 91 e8 d1 00 8e ff <0f> 0b c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 53 48 89 fb 8b
>>> [ 92.417855] RSP: 0018:ffffb30180003d40 EFLAGS: 00010286
>>> [ 92.417855] RAX: 0000000000000055 RBX: ffff99bcf7c22ee0 RCX: 00000000fffdffff
>>> [ 92.417855] RDX: 00000000fffdffff RSI: 0000000000000001 RDI: 00000000ffffffea
>>> [ 92.417855] RBP: ffff99bb849c2000 R08: 0000000000000000 R09: 00000000fffdffff
>>> [ 92.417855] R10: ffff99bcf6a00000 R11: 0000000000000003 R12: ffff99bb83840000
>>> [ 92.417855] R13: ffff99bb83842780 R14: ffffb3018081d000 R15: ffff99bb849c2000
>>> [ 92.417855] FS: 0000000000000000(0000) GS:ffff99bcf7c00000(0000) knlGS:0000000000000000
>>> [ 92.417855] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> [ 92.417855] CR2: 00007f9bf822df88 CR3: 00000001a74de000 CR4: 00000000003506f0
>>> [ 92.417855] Call Trace:
>>> [ 92.417855] <IRQ>
>>> [ 92.417855] ? __warn+0x6c/0x130
>>> [ 92.417855] ? report_bug+0x1e4/0x260
>>> [ 92.417855] ? handle_bug+0x36/0x70
>>> [ 92.417855] ? exc_invalid_op+0x17/0x1a0
>>> [ 92.417855] ? asm_exc_invalid_op+0x16/0x20
>>> [ 92.417855] ? xdp_warn+0xf/0x20
>>> [ 92.417855] xdp_do_redirect+0x15f/0x1c0
>>> [ 92.417855] vmxnet3_run_xdp+0x17a/0x400 [vmxnet3]
>>> [ 92.417855] vmxnet3_process_xdp+0xe4/0x760 [vmxnet3]
>>> [ 92.417855] ? vmxnet3_tq_tx_complete.isra.0+0x21e/0x2c0 [vmxnet3]
>>> [ 92.417855] vmxnet3_rq_rx_complete+0x7ad/0x1120 [vmxnet3]
>>> [ 92.417855] vmxnet3_poll_rx_only+0x2d/0xa0 [vmxnet3]
>>> [ 92.417855] __napi_poll+0x20/0x180
>>> [ 92.417855] net_rx_action+0x177/0x390
>>> [ 92.417855] __do_softirq+0xd0/0x202
>>> [ 92.417855] irq_exit_rcu+0x82/0xa0
>>> [ 92.417855] common_interrupt+0x7a/0xa0
>>> [ 92.417855] </IRQ>
>>> [ 92.417855] <TASK>
>>> [ 92.417855] asm_common_interrupt+0x22/0x40
>>> [ 92.417855] RIP: 0010:default_idle+0xb/0x10
>>> [ 92.417855] Code: 07 76 e7 48 89 07 49 c7 c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc eb 07 0f 00 2d 47 72 29 00 fb f4 <fa> c3 0f 1f 00 65 48 8b 04 25 00 33 02 00 f0 80 48 02 20 48 8b 10
>>> [ 92.417855] RSP: 0018:ffffffff92003e88 EFLAGS: 00000206
>>> [ 92.417855] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
>>> [ 92.417855] RDX: 4000000000000000 RSI: 0000000000000083 RDI: 00000000000bfc34
>>> [ 92.417855] RBP: ffffffff92009dc0 R08: ffff99bcf7c1f160 R09: ffff99bcf7c1f100
>>> [ 92.417855] R10: ffff99bcf7c1f100 R11: 0000000000000000 R12: 0000000000000000
>>> [ 92.417855] R13: 0000000000000000 R14: ffffffff92009dc0 R15: 0000000000000000
>>> [ 92.417855] default_idle_call+0x1f/0x30
>>> [ 92.417855] do_idle+0x1df/0x210
>>> [ 92.417855] cpu_startup_entry+0x14/0x20
>>> [ 92.417855] rest_init+0xc7/0xd0
>>> [ 92.417855] arch_call_rest_init+0x5/0x20
>>> [ 92.417855] start_kernel+0x3e9/0x5b0
>>> [ 92.417855] x86_64_start_reservations+0x14/0x30
>>> [ 92.417855] x86_64_start_kernel+0x71/0x80
>>> [ 92.417855] secondary_startup_64_no_verify+0x167/0x16b
>>> [ 92.417855] </TASK>
>>> [ 92.417855] ---[ end trace 0000000000000000 ]—
>>>
>>>
>> Hi Martin,
>>
>> Thanks, I'll take a look.
>> William
>
> Hi Martin,
> For non-dataring packet, I should use rbi->len instead of rcd->len.
> Are you able to see if this fixes the bug?
> thanks!
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_xdp.c
> b/drivers/net/vmxnet3/vmxnet3_xdp.c
> index 80ddaff759d4..a6c787454a1a 100644
> --- a/drivers/net/vmxnet3/vmxnet3_xdp.c
> +++ b/drivers/net/vmxnet3/vmxnet3_xdp.c
> @@ -382,12 +382,12 @@ vmxnet3_process_xdp(struct vmxnet3_adapter *adapter,
> page = rbi->page;
> dma_sync_single_for_cpu(&adapter->pdev->dev,
> page_pool_get_dma_addr(page) +
> - rq->page_pool->p.offset, rcd->len,
> + rq->page_pool->p.offset, rbi->len,
> page_pool_get_dma_dir(rq->page_pool));
>
> - xdp_init_buff(&xdp, rbi->len, &rq->xdp_rxq);
> + xdp_init_buff(&xdp, PAGE_SIZE, &rq->xdp_rxq);
> xdp_prepare_buff(&xdp, page_address(page), rq->page_pool->p.offset,
> - rcd->len, false);
> + rbi->len, false);
> xdp_buff_clear_frags_flag(&xdp);
>
> xdp_prog = rcu_dereference(rq->adapter->xdp_bpf_prog);
Powered by blists - more mailing lists