]> git.droids-corp.org - dpdk.git/commit
examples/vhost: fix crash when no VMDq
authorYuan Wang <yuanx.wang@intel.com>
Wed, 18 May 2022 13:36:33 +0000 (21:36 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 1 Jun 2022 09:50:10 +0000 (11:50 +0200)
commit6f3d83c7f207d435d960ad881f127e9971a81069
tree07c28d497ab64b2bb8bfb11a750f3d79ad468d49
parent5d75517beffe1b8315114a69975e0fa2549a6cc2
examples/vhost: fix crash when no VMDq

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>
examples/vhost/main.c