From patchwork Fri May 27 06:42:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Usman Tanveer X-Patchwork-Id: 111965 X-Patchwork-Delegate: thomas@monjalon.net 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 AD63EA055F; Fri, 27 May 2022 08:42:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DA1C40E5A; Fri, 27 May 2022 08:42:51 +0200 (CEST) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mails.dpdk.org (Postfix) with ESMTP id 26F8840E50 for ; Fri, 27 May 2022 08:42:50 +0200 (CEST) Received: by mail-ed1-f45.google.com with SMTP id v15so1844209edl.9 for ; Thu, 26 May 2022 23:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JNtmd/qjJ01u7BzMnfGGGOWFO/F+yu3QDQkOgCFTkO4=; b=m1BL0w89ypr/i7vMknTDwWIMqb8izARiOOjd3Ep3ZJ9CKpEv5djTOwz/JdD7er3LCS ZxjrYGCgoOQ8YIqYPDXAKj/lLtND7n2pvxqGjO7TJouddS9sfsKwy4bhopd9UrEy0L5x RJ1unEaAdagODgoLwt/GgKarK6pLecw9HP+iSfHsoQyoqZpcpgSxK7p0VeEB/6UE8Duz WStrH72CYfEl0k6MfINAFo30Tj54tGTdLIuV+2ZCK8wBblBnCJWyrJbyKbrZl7SWWCWa S8dyKx8kMhRNgE2AlJpph3Qh0mOl16OyS8EC0+5+OxXWntx6kSso9bvp7hdD2WkYjIoH BxsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JNtmd/qjJ01u7BzMnfGGGOWFO/F+yu3QDQkOgCFTkO4=; b=kkF/MU+OtvxhwFt0kUu+To7Dh10QDtToP4GbFTUDI2roGQtCGwsUEtoTaBF7j9Xccm AdLmOFyVmjf94lCWXZmMibEbBPAmzmuTS2ZFilv+77eqRRfmUvMrQa0QDgAIxsGQf+Ep JE/esCTb0YWybNlPvgbrxWgJSW/fARHf4pUhIplIbHeBRuwZ1jx6B5xshO53cKVk3Ip/ FkJRIAhMt7k1CJ6+TGEHee2b2lrtPqXLDuutn/LEyvwnPvEnQQQvxfXbtSPC/frH8/+c LeoCJTzSa5DpD3moLobta2LE14skqw+jwJ2qNU57q/Uh8DKzbn7Si4XbhdSD0oqE7q6A wUVA== X-Gm-Message-State: AOAM5337NPnfgdNNl1etUkvBoNTwr4I9cErwuIZMrbgup8NdeUKw4xm/ HUNjKpO7Z3OC3fGalmrJOSvxYVuGalO8Cw== X-Google-Smtp-Source: ABdhPJwV5cMicXEhjlJqcNdaSexZlbIDp7bYxWqzTqQoCHqAVFlR/sDdnse5B2RTM3iFDu42O82REw== X-Received: by 2002:a05:6402:5c9:b0:420:aac6:257b with SMTP id n9-20020a05640205c900b00420aac6257bmr42744487edx.128.1653633769836; Thu, 26 May 2022 23:42:49 -0700 (PDT) Received: from localhost.localdomain ([182.191.83.208]) by smtp.gmail.com with ESMTPSA id a9-20020a50c309000000b00428a42815aasm1721094edb.0.2022.05.26.23.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 23:42:49 -0700 (PDT) From: Usman Tanveer To: dev@dpdk.org Cc: Usman Tanveer Subject: [PATCH] ethtool: remove a redundant call to rte_eth_dev_stop() Date: Fri, 27 May 2022 11:42:44 +0500 Message-Id: <20220527064244.10224-1-usman.tanveer@emumba.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 There is a call to rte_eth_dev_stop() in rte_ethtool_net_open() due to which user gets misleading message upon first open/start call. It says that the device is already stopped, which should not be the case. This patch removes rte_eth_dev_stop() from rte_ethtool_net_open(). Signed-off-by: Usman Tanveer Acked-by: Stephen Hemminger --- examples/ethtool/lib/rte_ethtool.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c index ffaad96498..0a000d0a7b 100644 --- a/examples/ethtool/lib/rte_ethtool.c +++ b/examples/ethtool/lib/rte_ethtool.c @@ -297,12 +297,6 @@ rte_ethtool_set_pauseparam(uint16_t port_id, int rte_ethtool_net_open(uint16_t port_id) { - int ret; - - ret = rte_eth_dev_stop(port_id); - if (ret != 0) - return ret; - return rte_eth_dev_start(port_id); }