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 68F17A0501; Mon, 28 Mar 2022 14:09:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 410F4427EA; Mon, 28 Mar 2022 14:09:35 +0200 (CEST) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mails.dpdk.org (Postfix) with ESMTP id 1775B41104 for ; Mon, 28 Mar 2022 14:09:34 +0200 (CEST) Received: by mail-ed1-f53.google.com with SMTP id u26so16616720eda.12 for ; Mon, 28 Mar 2022 05:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=ULBXDxrbXclUmVMG8AB0oHvWAsDeCmR3UPqkD6K7pGE=; b=kCOGjahOz3RbPbAJ/z81lcI6ETj0ufayWXtVPJXH4WfqsmXC7LvM4c1dQz6z8TNWlH uontqRnLECF3pHkpiOdpKA3EFLlYyWoHMpX32LHE9jj+bmR1l/JmnCG/WJj7wfv/jgBC Nlue1fVbQahwWOfhEZFUYgm4pJkAxBWXzsuoZYgTgGGQgafoheWc/YXqnU4JQenWXqgw ZZGJKhBwb+CDT3RKrlMrq4XgTtUDXUfeL81t/FrqiRdkHtB+6SZ+E7c2k4l7cx/E5gSy Dc5tmb1lSyduWzLb0lUadVyuR2SEQMdsvsVY2ceegcQrQj1muSP+bwfCTsxoVymOUIRz koGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=ULBXDxrbXclUmVMG8AB0oHvWAsDeCmR3UPqkD6K7pGE=; b=VOjWOO4PosTNcfDNlBLSADXPUbxqIdd/zoay+j58lyVbY1d8hKrj+SVh5J+I1O1br5 E8QAbqr4hMmz+U/XY01NZZoz2K4cC8hixmpdNGTsrO+wgpx13IZGLmwUvsbyea7L5fj2 T9iV09+QRgqZgehOOvNFgs/sHXziojJerKibIIqucLsByMdf7YkPkK0qGbvUyUVJQ2At co+CeLp82IxX4UoQjCCSvTeGyENzJP4B5vvbSHwbmDgZaxzgzJIIYtcmCkPkjTXO+g30 rX/qwP1GJiMptqEFToJ+7Pys4lYTQFd6arNbtMaEZA57+J6UimrXWMWrOlDxIa+j1GZS smSw== X-Gm-Message-State: AOAM532rAEft6GCEhZrKQJ2qULFXrz+zJAcMSfeais506sXmeWXfSprQ jqCbwHH5Jihw8B28vdcmwpXYrR5VCbH6jsvMqRveI9FD9bi/HSOF X-Google-Smtp-Source: ABdhPJxswp0c60HdO2thVE8zC1a/D6l52HAR4ePM+EYLOKIR5+PJjL5sYPeHtF81V3B1Rtg2Zk99ttqyMsfnT+1Oji4= X-Received: by 2002:a05:6402:3689:b0:419:d380:ddbc with SMTP id ej9-20020a056402368900b00419d380ddbcmr8972179edb.230.1648469372578; Mon, 28 Mar 2022 05:09:32 -0700 (PDT) MIME-Version: 1.0 From: Usman Tanveer Date: Mon, 28 Mar 2022 17:09:21 +0500 Message-ID: Subject: [dpdk-dev] examples/ethtool: issue in rte_ethtool_net_open() To: dev@dpdk.org Cc: ivan.ilchenko@oktetlabs.ru, arybchenko@solarflare.com, remy.horton@intel.com Content-Type: multipart/alternative; boundary="00000000000060480605db462fa2" 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 --00000000000060480605db462fa2 Content-Type: text/plain; charset="UTF-8" Hi, I have a question from dpdk-ethtool. *file: examples/ethtool/lib/rte_ethtool.c* *intrte_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);}* Does anyone know the purpose of calling rte_eth_dev_stop(port_id) before calling the start function, it stops the port and then starts it again. Why not just call rte_eth_dev_start(port_id)? --00000000000060480605db462fa2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I have a question from dpdk-ethtool.

= file: examples/ethtool/lib/rte_ethtool.c

int
rte_ethtool_net_open(uint16_t port_id)
{
in= t ret;

ret =3D rte_eth_dev_stop(port_id);
if (ret !=3D 0)
return ret;

return rte_eth_dev_start= (port_id);
}


Does anyone know the purpose of calling r= te_eth_dev_stop(port_id) before calling the start function, it stops the po= rt and then starts it again. Why not just call rte_eth_dev_start(port_id)?<= br>
--00000000000060480605db462fa2--