DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: "dev@dpdk.org" <dev@dpdk.org>, Thomas Monjalon <thomasm@mellanox.com>
Subject: [dpdk-dev] stats_get API: return value suggestion
Date: Mon, 4 Sep 2017 12:22:42 +0000	[thread overview]
Message-ID: <DB6PR0502MB30486EFFBD4C762678A63B44D2910@DB6PR0502MB3048.eurprd05.prod.outlook.com> (raw)

Hi All

Following the next thread:
http://dpdk.org/ml/archives/dev/2017-September/074032.html

The stats_get dev ops API doesn't include return value, so PMD cannot return error
in case of failure at stats getting process time.

Since PCI devices can be removed and there is a long time between the physical removing to the
remove interrupt callback completion, the user can get invalid stats without any indication.
(think about HW counter stats)

I suggest return value for this API - ENODEV\0.

It can be also relevant to stats_reset, promiscuous_enable\disable, allmulticast_enable\disable, etc...

What do you think?

Regards
Matan Azrad

                 reply	other threads:[~2017-09-04 12:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=DB6PR0502MB30486EFFBD4C762678A63B44D2910@DB6PR0502MB3048.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=thomasm@mellanox.com \
    /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).