From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 23CD6A034C; Thu, 18 Aug 2022 12:18:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEDEA40694; Thu, 18 Aug 2022 12:18:48 +0200 (CEST) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by mails.dpdk.org (Postfix) with ESMTP id B5C3540156 for ; Thu, 18 Aug 2022 12:18:47 +0200 (CEST) Received: by mail-ej1-f54.google.com with SMTP id w19so2366954ejc.7 for ; Thu, 18 Aug 2022 03:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=ZLeJTEPm7vcet99UD8PTSQiyGcWbuVxkHNutAFJPNyo=; b=EJHNHYM0xOil9vYfHHnAbGc7+3knnAthbElI+KeL5uGW8ez7ekfa6Rzku08nAqYIUC WlyozwsXqtBQ93cprcSB5pLjX6rneI/5b3CGkYq0zP0OfPSK6BQWiPoxrgrbqn9T4S1G sj4i5f8FwltXLsIPmTDsgLfgvOKmuK3cbjW2973RdzWOS8zL1TBSJhWblJnxpjvIPkW9 AekBlRkwzrTwjp6lwSOigf1tpNQWYKkUUWw/tsuyQ/c8pUWjcDtEczq12emKZda8xSmJ IygeseP42U19aNFfHcjEor0JZ4DlDR4T1XFdwkFCaCbEj/hNlr/wXZuDB2FZ5vN98U2q JSTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=ZLeJTEPm7vcet99UD8PTSQiyGcWbuVxkHNutAFJPNyo=; b=WEncgSG2LKYkdaNUjd/D9KOjiXAiCZmY8lQwAjVch3iWJRZrvVHS/ziEnHXhPRANFu 3hMPrFhtUK9hdFZtsd9G8/in3Csu4gu7JjPzlqvKQtVN6gcvA/iVDA7onNm4GVOCyHUO wBSe2GsPZzJgomOmoHDla5omAVTj7r7XA0/cPlwF4BrhBRXPJxO/GkaD7/+bD30QpAnk XhIcm/8P2rUKjtX4r1y9R2rZgudKWfTVTbYkGfIE7y5POlH+ig+lnMzVvJ0FCwqse+Bf GdZhYC4+iptSA1poJCGHQT8HGg8iJtkYCWPQ8mxWgSwc8gawcmCvrOIoD2F3MYi4Lzlv YV9g== X-Gm-Message-State: ACgBeo2k3AIJvqa7/7uIYxIK1AD0+GoXsEvluJbWO109O+x6TmF/uWj5 wAf2Pw2vCph7RfAHxmX7G/K8aQParXBDvckoWb2xlg== X-Google-Smtp-Source: AA6agR5JKEs6BJR+0rS/YE6LcyrKxOSH1L9K8QzBXNZMxNwc/WP2+5BKqHiwGA8Fi4Qy3Ejfr+NFSg+T43PbL/+TvIo= X-Received: by 2002:a17:907:2856:b0:730:882d:a0fb with SMTP id el22-20020a170907285600b00730882da0fbmr1477414ejc.252.1660817927479; Thu, 18 Aug 2022 03:18:47 -0700 (PDT) MIME-Version: 1.0 References: <20220527064244.10224-1-usman.tanveer@emumba.com> <28911775.czjnFlTdjD@thomas> In-Reply-To: From: Usman Tanveer Date: Thu, 18 Aug 2022 15:18:36 +0500 Message-ID: Subject: Re: [PATCH] ethtool: remove a redundant call to rte_eth_dev_stop() To: Thomas Monjalon Cc: dev@dpdk.org, Huisong Li , Chengwen Feng , Bruce Richardson , Gargi Sau , Qiming Yang , andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com Content-Type: text/plain; charset="UTF-8" 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 Hi, Can you please have a look and update the status? On Wed, Jul 6, 2022 at 2:49 PM Usman Tanveer wrote: > > It has been there since the file was added (2015). I'm not able to > find any purpose for this. > > Although, it's misleading the messages it shows upon calling > rte_ethtool_net_open() as mentioned above. And when this function is > called even when the port is already UP, it should print a message > "device already started", but it's not like that because it first > stops the device and then starts it again. > > The above change fixes both misleading messages. > > > On Mon, Jun 27, 2022 at 2:16 AM Thomas Monjalon wrote: > > > > 27/05/2022 08:42, Usman Tanveer: > > > 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(). > > > > Why was it there? > > Any opinion? Is it safe to remove? > > > > > 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); > > > } > > > > > >