app/testpmd: fix vdev socket initialization
app/testpmd: fix vdev socket initialization

The cmdline settings of port-numa-config and rxring-numa-config have
been flushed by the following init_config. If we don't configure the
port-numa-config, the virtual device will allocate the device ports to
socket 0. It will cause failure when the socket 0 is unavailable.

eg:
testpmd -l <cores from socket 1> --vdev net_pcap0,iface=lo
--socket-mem=64 -- --numa --port-numa-config="(0,1)"
--ring-numa-config="(0,1,1),(0,2,1)" -i

...
Configuring Port 0 (socket 0)
Failed to setup RX queue:No mempool allocation on the socket 0
EAL: Error - exiting with code: 1
  Cause: Start ports failed

Fix by allocate the devices port to the first available socket or the
socket configured in port-numa-config.

Fixes: 487f9a592a27 ("app/testpmd: fix NUMA structures initialization")
Fixes: 20a0286fd2c0 ("app/testpmd: check socket id validity")
Cc: stable@dpdk.org

Signed-off-by: Phil Yang <5a9b6465c065ff0e1fd5d2cb9eb2185e82f34247@arm.com>
Reviewed-by: Gavin Hu <207ee22c2cf71e20c5b5df8395050c07c07d8709@arm.com>
Reviewed-by: Ferruh Yigit <ba8734c3c506d2e3557bd4ac8fdaccd25bdb9aa7@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk