]> git.droids-corp.org - dpdk.git/commitdiff
net/enic: avoid error message when no advanced filtering
authorHyong Youb Kim <hyonkim@cisco.com>
Tue, 26 Oct 2021 00:04:18 +0000 (17:04 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 3 Nov 2021 18:56:55 +0000 (19:56 +0100)
Probing the availability of Flow Manager API may print the following
error log.

PMD: rte_enic_pmd: Devcmd 88 failed with error code -1

The error indicates a flow manager operation failed and happens when
advanced filtering is disabled on vNIC. It is harmless but confusing
to the user. Since advanced filtering is a prerequisite, check first
if it is available and avoid the error message altogether.

Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")
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

index 9c42595ced34a63a6c9b0cee69f7f27cda475716..00d7782e6e1729f66fb2d03792eb2ffb63f80776 100644 (file)
@@ -594,6 +594,9 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, uint32_t *mode,
        uint64_t ops;
        static uint32_t instance;
 
+       /* Advanced filtering is a prerequisite */
+       if (!vnic_dev_capable_adv_filters(vdev))
+               return 0;
        /* flowman devcmd available? */
        if (!vnic_dev_capable(vdev, CMD_FLOW_MANAGER_OP))
                return 0;