From: Jie Liu <[email protected]> Update the representor device naming to use the base device name prefix, and set the numa_node from the parent device data so that representor devices are allocated on the same NUMA node.
Cc: [email protected] Signed-off-by: Jie Liu <[email protected]> --- drivers/net/sxe2/sxe2_ethdev_repr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/sxe2/sxe2_ethdev_repr.c b/drivers/net/sxe2/sxe2_ethdev_repr.c index c698baafe0..b7096f5927 100644 --- a/drivers/net/sxe2/sxe2_ethdev_repr.c +++ b/drivers/net/sxe2/sxe2_ethdev_repr.c @@ -552,8 +552,8 @@ int32_t sxe2_switchdev_repr_devs_init(struct sxe2_adapter *adapter, } for (repr_idx = 0; repr_idx < req_eth_da->nb_representor_ports; ++repr_idx) { - snprintf(name, sizeof(name), "sxe2_representor_c%dpf%d%s%u", - adapter->pf_idx, adapter->pf_idx, + snprintf(name, sizeof(name), "%s_representor_%s%u", + adapter->cdev->dev->name, "vf", req_eth_da->representor_ports[repr_idx]); @@ -562,6 +562,7 @@ int32_t sxe2_switchdev_repr_devs_init(struct sxe2_adapter *adapter, ret = -ENOMEM; goto l_release_port; } + eth_dev->data->numa_node = adapter->dev_info.dev_data->numa_node; eth_dev->data->dev_private = rte_zmalloc_socket(name, sizeof(struct sxe2_adapter), RTE_CACHE_LINE_SIZE, -- 2.52.0

