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 <tho...@monjalon.net> 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);
> >  }
>
>
>

Reply via email to