If the VMDq limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.
Fixes: d19533e86f ("examples/vhost: copy old vhost example")
Cc: stable@dpdk.org
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
return retval;
}
+ if (dev_info.max_vmdq_pools == 0) {
+ RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDq info.\n");
+ return -1;
+ }
rxconf = &dev_info.default_rxconf;
txconf = &dev_info.default_txconf;