From patchwork Wed Feb 26 09:15:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sivaprasad Tummala X-Patchwork-Id: 66050 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A55B5A055E; Wed, 26 Feb 2020 10:15:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 855AC1BFB1; Wed, 26 Feb 2020 10:15:10 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C0B4E1BF8D for ; Wed, 26 Feb 2020 10:15:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 01:15:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,487,1574150400"; d="scan'208";a="317354001" Received: from silpixa00390853.ir.intel.com (HELO silpixa00390853.ger.corp.intel.com) ([10.237.223.131]) by orsmga001.jf.intel.com with ESMTP; 26 Feb 2020 01:15:05 -0800 From: Sivaprasad Tummala To: Marko Kovacevic , Ori Kam , Bruce Richardson , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , Sunil Kumar Kori , Pavan Nikhilesh Cc: dev@dpdk.org Date: Wed, 26 Feb 2020 09:15:01 +0000 Message-Id: <20200226091501.27967-1-Sivaprasad.Tummala@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" l2fwd application exits, if return for rte_eth_promiscuous_enable is not success. But for vHost PMD, promiscuous enable returns "Not Supported". This patch validates success and no support of promiscuous enable. Signed-off-by: Sivaprasad Tummala --- examples/l2fwd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 09257aab1..ea9831f07 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -727,7 +727,7 @@ main(int argc, char **argv) printf("done: \n"); ret = rte_eth_promiscuous_enable(portid); - if (ret != 0) + if ((ret != 0) && (ret != -ENOTSUP)) rte_exit(EXIT_FAILURE, "rte_eth_promiscuous_enable:err=%s, port=%u\n", rte_strerror(-ret), portid);