ethdev: check device promiscuous state
authorCiara Power <ciara.power@intel.com>
Mon, 21 Oct 2019 12:22:37 +0000 (13:22 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:10 +0000 (16:43 +0200)
commit400d758182669035203ba619001b0c03234b9121
treeadbc954da03878678034bfd2c1c45cbe1367bafd
parentd4bda0ab2972cb3fd65fbb2575a51de5a68757cb
ethdev: check device promiscuous state

The promiscuous enable and disable functions now check the
promiscuous state of the device before checking if the dev_ops
function exists for the device.

This change is necessary to allow sample applications run on
virtual PMDs, as previously -ENOTSUP returned when the promiscuous
enable function was called. This caused the sample application to
fail unnecessarily.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
lib/librte_ethdev/rte_ethdev.c