Fix socket for vdev port 26/74026/1
authorLuc Provoost <luc.provoost@gmail.com>
Thu, 25 May 2023 20:40:47 +0000 (22:40 +0200)
committerLuc Provoost <luc.provoost@gmail.com>
Thu, 25 May 2023 20:40:47 +0000 (22:40 +0200)
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 <luc.provoost@gmail.com>
Change-Id: If687c5e20b7f3050d96c2fdfa94ef29db051f24c

VNFs/DPPD-PROX/prox_port_cfg.c

index bf7c4cb..3b7f778 100644 (file)
@@ -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;