@@ -1231,12 +1231,13 @@ netdev_dpdk_set_config(struct netdev *netdev,
const struct smap *args)
* is valid */
if (!(dev->devargs && !strcmp(dev->devargs, new_devargs)
&& rte_eth_dev_is_valid_port(dev->port_id))) {
- err = EINVAL;
int new_port_id = netdev_dpdk_process_devargs(new_devargs);
- if (new_port_id == dev->port_id) {
+ if (!rte_eth_dev_is_valid_port(new_port_id)) {
+ err = EINVAL;
+ } else if (new_port_id == dev->port_id) {
/* Already configured, do not reconfigure again */
err = 0;
- } else if (rte_eth_dev_is_valid_port(new_port_id)) {
+ } else {
struct netdev_dpdk *dup_dev;
dup_dev = netdev_dpdk_lookup_by_port_id(new_port_id);