Thread (3 messages) flat view 3 messages, 3 authors, 2021-02-18

Re: [PATCH] Revert "dpaa_eth: add XDP_REDIRECT support"

From: Jesper Dangaard Brouer <hidden>
Date: 2021-02-18 13:48:49

On Wed, 17 Feb 2021 16:17:58 +0100
Sascha Hauer [off-list ref] wrote:
This reverts commit a1e031ffb422bb89df9ad9c018420d0deff7f2e3.

This commit introduces a:

	np = container_of(&portal, struct dpaa_napi_portal, p);

Using container_of() on the address of a pointer doesn't make sense as
the pointer is not embedded into the desired struct.

KASAN complains about it like this:

[   17.703277] ==================================================================
[   17.710517] BUG: KASAN: stack-out-of-bounds in rx_default_dqrr+0x994/0x14a0
[   17.717504] Read of size 4 at addr ffff0009336495fc by task systemd/1
[   17.723955]
[   17.725447] CPU: 0 PID: 1 Comm: systemd Not tainted 5.11.0-rc6-20210204-2-00033-gfd6caa9c7514-dirty #63
[   17.734857] Hardware name: TQ TQMLS1046A SoM
[   17.742176] Call trace:
[   17.744621]  dump_backtrace+0x0/0x2e8
[   17.748298]  show_stack+0x1c/0x68
[   17.751622]  dump_stack+0xe8/0x14c
[   17.755033]  print_address_description.constprop.0+0x68/0x304
[   17.760794]  kasan_report+0x1d4/0x238
[   17.764466]  __asan_load4+0x88/0xc0
[   17.767962]  rx_default_dqrr+0x994/0x14a0
[   17.771980]  qman_p_poll_dqrr+0x254/0x278
[   17.776000]  dpaa_eth_poll+0x4c/0xe0
...

It's not clear to me how a the struct dpaa_napi_portal * should be
derived from the struct qman_portal *, so revert the patch for now.
Can we please get a response from NXP people?

Are you saying XDP_REDIRECT feature is completely broken on dpaa driver?

(I only have access to dpaa2 hardware)

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help