DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Bing Zhao <bingz@nvidia.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: fix log level of Tx and Rx dummy functions
Date: Sun, 24 Oct 2021 11:48:23 +0000	[thread overview]
Message-ID: <DM6PR11MB44913D01F3D28EE374059FF59A829@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM5PR12MB1755717BCD34B643F66BDCFFD0819@DM5PR12MB1755.namprd12.prod.outlook.com>


> > > > When stopping a port, the data path Tx and Rx burst functions
> > should
> > > > be stopped firstly conventionally. Then the dummy functions are
> > used
> > > > to replace the callback functions provided by the PMD.
> > > >
> > > > When the application stops a port without or before stopping the
> > > > data path handling.
> >
> > If the application really does that, then it is a severe bug in the
> > application, then needs to be fixed ASAP.
> 
> I agree, this should be some improper / wrong behavior in the application.
> 
> >
> > > The dummy functions may be invoked heavily and a lot
> > > > of logs in these dummy functions will result in a flood.
> > >
> > > Why does it happen? We should not use a stopped port.
> > > Is it a problem of core synchronization?
> > >
> > > > Debug level log should be enough instead of the error level.
> > >
> > >
> >
> > Dummy function is supposed to be set only when device is not able to
> > do RX/TX properly (not attached, or attached but not configured, or
> > attached and configured, but not started).
> > Obviously if app calls rx/tx_burst for such port it is a major issue,
> > that should be flagged immediately.
> > So I believe having ERR level here makes a perfect sense here.
> 
> I do not insist on this. Some notification to the application may be needed. While to my understanding, the log flood should be prevented,
> or the logs may slow down the application, the IO, and would also have impact on other logs and some information may get lost (but that is
> the users' decision).
> Since the rx/tx burst are usually in the data path and invoked heavily, if the log is needed, how about print it only once? WDYT?
> 

Correctly behaving app should never call these stub functions and should never see these messages.
If your app ended up inside this function, then there something really wrong is going on,
that can cause app crash, silent memory corruption, NIC HW hang, or many other nasty things.
The aim of this stubs mechanism:
1) minimize (but not completely avoid) risk of such damage to happen in case of
    programming error within user app.
2) flag to the user that something very wrong is going on within his app.
In such situation, possible slowdown of misbehaving program is out of my concern.  

  reply	other threads:[~2021-10-24 11:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 21:14 Bing Zhao
2021-10-22 21:14 ` [dpdk-dev] [PATCH 2/2] ethdev: fix the race condition for fp ops reset Bing Zhao
2021-10-23  8:34   ` Thomas Monjalon
2021-10-23 11:39     ` Ananyev, Konstantin
2021-11-10 14:34       ` Ferruh Yigit
2021-11-10 14:37         ` Ananyev, Konstantin
2021-11-10 14:57           ` Thomas Monjalon
2021-11-10 15:24             ` Bing Zhao
2021-10-23 16:13   ` [dpdk-dev] " Stephen Hemminger
2021-10-24  5:54     ` Bing Zhao
2021-10-23  8:32 ` [dpdk-dev] [PATCH 1/2] ethdev: fix log level of Tx and Rx dummy functions Thomas Monjalon
2021-10-23 11:46   ` Ananyev, Konstantin
2021-10-23 12:45     ` Bing Zhao
2021-10-24 11:48       ` Ananyev, Konstantin [this message]
2021-10-25  9:43         ` Thomas Monjalon
2021-10-25  9:51           ` David Marchand
2021-10-25 12:55             ` Ananyev, Konstantin
2021-10-25 13:27               ` Thomas Monjalon
2021-10-25 13:31                 ` David Marchand
2021-10-25 20:29                   ` Ananyev, Konstantin
2021-10-25 20:38                     ` Thomas Monjalon
2021-10-26 12:38                       ` Ananyev, Konstantin
2021-10-26 12:59                         ` Thomas Monjalon
2021-10-26  3:18                   ` Bing Zhao
2021-10-23 12:12   ` Bing Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB44913D01F3D28EE374059FF59A829@DM6PR11MB4491.namprd11.prod.outlook.com \
    --to=konstantin.ananyev@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).