netdev-dpdk: Restore txq/rxq number if initialization fails.
authorDaniele Di Proietto <diproiettod@vmware.com>
Thu, 16 Jul 2015 18:48:23 +0000 (19:48 +0100)
committerEthan Jackson <ethan@nicira.com>
Tue, 21 Jul 2015 19:01:37 +0000 (12:01 -0700)
commit4b8df0378747a83ec2478ded1e9cefe64d6a9f86
treee8109d69ac527bfe62781d7ca15f9beafe8f748b
parent24496b4ac2dda14f99fc64e7f68c19b7af27a4c1
netdev-dpdk: Restore txq/rxq number if initialization fails.

netdev_dpdk_set_multiq() should not set the number of configured rxq
and txq if the driver initialization fails (meaning that the driver
failed to setup the queues).  Otherwise, on a subsequent call to
netdev_dpdk_set_multiq(), the code may believe that the queues have
already been setup and there's no work to be done.

This commit fixes the problem by restoring the old values if
dpdk_eth_dev_init() fails.

Reported-by: Ian Stokes <ian.stokes@intel.com>
Tested-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/netdev-dpdk.c