From: Luc Provoost Date: Thu, 25 May 2023 20:40:47 +0000 (+0200) Subject: Fix socket for vdev port X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=881b552e17158761dbd46b81642abcc2310e7a20;p=samplevnf.git Fix socket for vdev port vdev socket was always set to 0. We are now setting the socket for the vdev device to the socket of the corresponding port. Signed-off-by: Luc Provoost Change-Id: If687c5e20b7f3050d96c2fdfa94ef29db051f24c --- diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c index bf7c4cb7..3b7f778d 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.c +++ b/VNFs/DPPD-PROX/prox_port_cfg.c @@ -385,6 +385,11 @@ void init_rte_dev(int use_dummy_devices) if ((ptr = strstr(port_cfg->short_name, "_pmd")) != NULL) { *ptr = '\x0'; } + // Set socket for vdev device identical to socket of corresponding port + if (prox_port_cfg[port_id].is_vdev) { + prox_port_cfg[port_id].socket = prox_port_cfg[prox_port_cfg[port_id].dpdk_mapping].socket; + continue; + } #if RTE_VERSION < RTE_VERSION_NUM(18,5,0,0) pci_dev = dev_info.pci_dev;