[PATCH 040/227] baseband/fpga_5gnr_fec: use NUMA node terminology
Chengwen Feng
chengwen.feng at linux.dev
Tue Nov 3 15:49:58 CET 2026
From: Chengwen Feng <fengchengwen at huawei.com>
Rename socket_id parameters, internal structure fields, variables
and comments to the NUMA node terminology, and switch calls to
the NUMA-named APIs.
Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index e14581cd48..cabf0a0ce9 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -377,7 +377,7 @@ fpga_5gnr_get_queue_map(struct fpga_5gnr_fec_device *d, uint32_t q_id)
}
static int
-fpga_5gnr_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
+fpga_5gnr_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int numa_id)
{
/* Number of queues bound to a PF/VF */
uint32_t hw_q_num = 0;
@@ -438,9 +438,9 @@ fpga_5gnr_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id
RTE_BUILD_BUG_ON((RTE_CACHE_LINE_SIZE % 32) != 0);
/* Allocate memory for SW descriptor rings */
- d->sw_rings = rte_zmalloc_socket(dev->device->driver->name,
+ d->sw_rings = rte_zmalloc_numa(dev->device->driver->name,
num_queues * ring_size, RTE_CACHE_LINE_SIZE,
- socket_id);
+ numa_id);
if (d->sw_rings == NULL) {
rte_bbdev_log(ERR,
"Failed to allocate memory for %s:%u sw_rings",
@@ -453,8 +453,8 @@ fpga_5gnr_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id
d->sw_ring_max_depth = FPGA_5GNR_RING_MAX_SIZE;
/* Allocate memory for ring flush status */
- d->flush_queue_status = rte_zmalloc_socket(NULL,
- sizeof(uint64_t), RTE_CACHE_LINE_SIZE, socket_id);
+ d->flush_queue_status = rte_zmalloc_numa(NULL,
+ sizeof(uint64_t), RTE_CACHE_LINE_SIZE, numa_id);
if (d->flush_queue_status == NULL) {
rte_bbdev_log(ERR,
"Failed to allocate memory for %s:%u flush_queue_status",
@@ -678,8 +678,8 @@ fpga_5gnr_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
return -1;
/* Allocate the queue data structure. */
- q = rte_zmalloc_socket(dev->device->driver->name, sizeof(*q),
- RTE_CACHE_LINE_SIZE, conf->socket);
+ q = rte_zmalloc_numa(dev->device->driver->name, sizeof(*q),
+ RTE_CACHE_LINE_SIZE, conf->numa_id);
if (q == NULL) {
/* Mark queue as un-assigned */
d->q_assigned_bit_map &= (0xFFFFFFFF - (1ULL << q_idx));
@@ -699,8 +699,8 @@ fpga_5gnr_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
q->ring_ctrl_reg.ring_base_addr = d->sw_rings_phys + (d->sw_ring_size * queue_id);
/* Allocate memory for Completion Head variable*/
- q->ring_head_addr = rte_zmalloc_socket(dev->device->driver->name,
- sizeof(uint64_t), RTE_CACHE_LINE_SIZE, conf->socket);
+ q->ring_head_addr = rte_zmalloc_numa(dev->device->driver->name,
+ sizeof(uint64_t), RTE_CACHE_LINE_SIZE, conf->numa_id);
if (q->ring_head_addr == NULL) {
/* Mark queue as un-assigned */
d->q_assigned_bit_map &= (0xFFFFFFFF - (1ULL << q_idx));
@@ -2933,7 +2933,7 @@ fpga_5gnr_fec_probe(struct rte_pci_driver *pci_drv,
return -ENODEV;
/* allocate device private memory */
- bbdev->data->dev_private = rte_zmalloc_socket(dev_name,
+ bbdev->data->dev_private = rte_zmalloc_numa(dev_name,
sizeof(struct fpga_5gnr_fec_device),
RTE_CACHE_LINE_SIZE,
pci_dev->device.numa_node);
--
2.55.0
More information about the dev
mailing list