From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
by inbox.dpdk.org (Postfix) with ESMTP id DE61A46008;
Tue, 7 Jan 2025 07:09:48 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 7687640661;
Tue, 7 Jan 2025 07:09:48 +0100 (CET)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
by mails.dpdk.org (Postfix) with ESMTP id DDA5F4027D
for ; Tue, 7 Jan 2025 07:09:46 +0100 (CET)
Received: by inbox.dpdk.org (Postfix, from userid 33)
id B837346009; Tue, 7 Jan 2025 07:09:46 +0100 (CET)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1611] net/af_xdp, numa_node and socket_id is
assigned incorrectly for numa scenario
Date: Tue, 07 Jan 2025 06:09:46 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: ethdev
X-Bugzilla-Version: 22.11
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: xiaohua.wang@ericsson.com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
op_sys bug_status bug_severity priority component assigned_to reporter
target_milestone
Message-ID:
Content-Type: multipart/alternative; boundary=17362301860.5AeA259.1553010
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
--17362301860.5AeA259.1553010
Date: Tue, 7 Jan 2025 07:09:46 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
https://bugs.dpdk.org/show_bug.cgi?id=3D1611
Bug ID: 1611
Summary: net/af_xdp, numa_node and socket_id is assigned
incorrectly for numa scenario
Product: DPDK
Version: 22.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: xiaohua.wang@ericsson.com
Target Milestone: ---
1. in rte_pmd_af_xdp_probe() function, can't assign device.numa_node with
current socket id. Since the CPU core socket to start app can be different =
to
virtual xdp/device socket to attach.=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
if (dev->device.numa_node =3D=3D SOCKET_ID_ANY)
dev->device.numa_node =3D rte_socket_id();
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Same issue for rte_pmd_af_xdp_remove() and eth_dev_close().
2. For xdp_umem_configure() in xsk_configure(), also can't allocate umem at=
CPU
core socket which get from during eth_rx_queue_setup() phase. Because it wi=
ll
probably be different to socket which "umem" wants to attach port device
belongs to.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
umem =3D rte_zmalloc_socket("umem", sizeof(*umem), 0, rte_socket_id=
());
if (umem =3D=3D NULL) {
AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
return NULL;
}
snprintf(ring_name, sizeof(ring_name), "af_xdp_ring_%s_%u",
internals->if_name, rxq->xsk_queue_idx);
umem->buf_ring =3D rte_ring_create(ring_name,
ETH_AF_XDP_NUM_BUFFERS,
rte_socket_id(),
0x0);
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--17362301860.5AeA259.1553010
Date: Tue, 7 Jan 2025 07:09:46 +0100
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
net/af_xdp, numa_node and socket_id is assigned incorrectly f=
or numa scenario
Product
DPDK
Version
22.11
Hardware
All
OS
All
Status
UNCONFIRMED
Severity
normal
Priority
Normal
Component
ethdev
Assignee
dev@dpdk.org
Reporter
xiaohua.wang@ericsson.com
Target Milestone
---
1. in rte_pmd_af_xdp_probe() funct=
ion, can't assign device.numa_node with
current socket id. Since the CPU core socket to start app can be different =
to
virtual xdp/device socket to attach.=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
if (dev->device.numa_node =3D=3D SOCKET_ID_ANY)
dev->device.numa_node =3D rte_socket_id();
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Same issue for rte_pmd_af_xdp_remove() and eth_dev_close().
2. For xdp_umem_configure() in xsk_configure(), also can't allocate umem at=
CPU
core socket which get from during eth_rx_queue_setup() phase. Because it wi=
ll
probably be different to socket which "umem" wants to attach port=
device
belongs to.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
umem =3D rte_zmalloc_socket("umem", sizeof(*umem), 0, rte=
_socket_id());
if (umem =3D=3D NULL) {
AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
return NULL;
}
snprintf(ring_name, sizeof(ring_name), "af_xdp_ring_%s_%u"=
;,
internals->if_name, rxq->xsk_queue_idx);
umem->buf_ring =3D rte_ring_create(ring_name,
ETH_AF_XDP_NUM_BUFFERS,
rte_socket_id(),
0x0);
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dcode in rte_eth_af_xdp.c=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D