net/enic: fix filter mode detection
authorHyong Youb Kim <hyonkim@cisco.com>
Wed, 13 Oct 2021 01:21:23 +0000 (18:21 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 13 Oct 2021 13:40:50 +0000 (15:40 +0200)
commitfb9274546120898933f225742d9e37530504e8f9
tree15faedb75892e01ff67674c5fcab7747c5373bdd
parentf93819cf5abc047905c464fe4abf84fa823239dd
net/enic: fix filter mode detection

vnic_dev_capable_filter_mode() currently fails when
CMD_CAPABILITY(CMD_ADD_FILTER) returns ERR_EPERM. In turn, this
failure causes the driver initialization to fail.

But, firmware may legitimately return ERR_EPERM. For example, VF vNIC
returns ERR_EPERM when it does not support filtering at all. So, treat
ERR_EPERM as "no filtering available" instead of an unexpected error.

Fixes: 322b355f2183 ("net/enic/base: bring NIC interface functions up to date")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
drivers/net/enic/base/vnic_dev.c