diff --git a/NEWS b/NEWS index 994fdf6a9..69f5f4355 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,9 @@ Post-v2.17.0 - DPDK: * OVS validated with DPDK 21.11.1. It is recommended to use this version until further releases. + * Delay creating or reusing a mempool for vhost ports until the VM + is started. A failure to create a mempool will now be logged only + when the VM is started. - Userspace datapath: * 'dpif-netdev/subtable-lookup-prio-get' appctl command renamed to 'dpif-netdev/subtable-lookup-info-get' to better reflect its purpose. diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index f9535bfb4..081900576 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -3926,7 +3926,8 @@ new_device(int vid) if (dev->requested_n_txq < qp_num || dev->requested_n_rxq < qp_num - || dev->requested_socket_id != newnode) { + || dev->requested_socket_id != newnode + || dev->dpdk_mp == NULL) { dev->requested_socket_id = newnode; dev->requested_n_rxq = qp_num; dev->requested_n_txq = qp_num; @@ -4976,7 +4977,6 @@ dpdk_vhost_reconfigure_helper(struct netdev_dpdk *dev) { dev->up.n_txq = dev->requested_n_txq; dev->up.n_rxq = dev->requested_n_rxq; - int err; /* Always keep RX queue 0 enabled for implementations that won't * report vring states. */ @@ -4994,14 +4994,17 @@ dpdk_vhost_reconfigure_helper(struct netdev_dpdk *dev) netdev_dpdk_remap_txqs(dev); - err = netdev_dpdk_mempool_configure(dev); - if (!err) { - /* A new mempool was created or re-used. */ - netdev_change_seq_changed(&dev->up); - } else if (err != EEXIST) { - return err; - } if (netdev_dpdk_get_vid(dev) >= 0) { + int err; + + err = netdev_dpdk_mempool_configure(dev); + if (!err) { + /* A new mempool was created or re-used. */ + netdev_change_seq_changed(&dev->up); + } else if (err != EEXIST) { + return err; + } + if (dev->vhost_reconfigured == false) { dev->vhost_reconfigured = true; /* Carrier status may need updating. */