From patchwork Tue Oct 26 00:04:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hyong Youb Kim (hyonkim)" X-Patchwork-Id: 102797 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F835A0C47; Tue, 26 Oct 2021 02:04:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 455D840E3C; Tue, 26 Oct 2021 02:04:24 +0200 (CEST) Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) by mails.dpdk.org (Postfix) with ESMTP id 30F0240A4B; Tue, 26 Oct 2021 02:04:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1265; q=dns/txt; s=iport; t=1635206663; x=1636416263; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8NQeS8s1mWZ2NbCKj3GA+VwkFO9POpspjzgCFThBF2c=; b=QcYI6iuW48xGPWMyAOECR55lr1GH6dGAOIzgMYBExby13qWgqg6Gd5lw x4O9Gm1MXhoLXBhevcMfuzedxSkST2o6caIA+wIGuebvVrZdoUeszwWRn zmvPilxHZqr3Hwz7WrXLTgi3Vyh9YUlQeSExqLDhsAnJnTbig3A3xjj6z U=; X-IronPort-AV: E=Sophos;i="5.87,181,1631577600"; d="scan'208";a="789031444" Received: from rcdn-core-5.cisco.com ([173.37.93.156]) by alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 26 Oct 2021 00:04:22 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-5.cisco.com (8.15.2/8.15.2) with ESMTP id 19Q04Mwd005830; Tue, 26 Oct 2021 00:04:22 GMT Received: by cisco.com (Postfix, from userid 508933) id DC14620F2005; Mon, 25 Oct 2021 17:04:21 -0700 (PDT) From: Hyong Youb Kim To: Ferruh Yigit Cc: dev@dpdk.org, Hyong Youb Kim , stable@dpdk.org, John Daley Date: Mon, 25 Oct 2021 17:04:18 -0700 Message-Id: <20211026000418.13540-1-hyonkim@cisco.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-5.cisco.com Subject: [dpdk-dev] [PATCH] net/enic: fix unwanted error message X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: John Daley --- drivers/net/enic/base/vnic_dev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index 9c42595ced..00d7782e6e 100644 --- a/drivers/net/enic/base/vnic_dev.c +++ b/drivers/net/enic/base/vnic_dev.c @@ -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;