DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Ferruh Yigit" <ferruh.yigit@intel.com>,
	"Min Hu (Connor)" <humin29@huawei.com>, <dev@dpdk.org>
Cc: "Ray Kinsella" <mdr@ashroe.eu>,
	"Ajit Khaparde" <ajit.khaparde@broadcom.com>,
	"Thomas Monjalon" <thomas@monjalon.net>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Subject: RE: [PATCH] ethdev: introduce ethdev dump API
Date: Mon, 7 Feb 2022 13:56:11 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D86E7A@smartserver.smartshare.dk> (raw)
In-Reply-To: <d5ecc253-a978-c464-94d8-9c5f30ca3cf3@intel.com>

> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Monday, 7 February 2022 13.36
> 
> On 2/7/2022 12:18 PM, Morten Brørup wrote:
> >> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> >> Sent: Monday, 7 February 2022 12.46
> >>
> >> On 2/7/2022 1:47 AM, Min Hu (Connor) wrote:
> >>> Added the ethdev dump API which provides functions for query
> private
> >> info
> >>
> >> Isn't API and function are same thing in this contexts?
> >>
> >>> from device. There exists many private properties in different PMD
> >> drivers,
> >>> such as adapter state, Rx/Tx func algorithm in hns3 PMD. The
> >> information of
> >>> these properties is important for debug. As the information is
> >> private,
> >>> the new API is introduced.>
> >>
> >> In the patch title 'ethdev' is duplicated, can you fix it?
> >>
> >>
> >>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> >>> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> >>> Acked-by: Ray Kinsella <mdr@ashroe.eu>
> >>> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> >
> > [...]
> >
> >>> @@ -990,6 +990,20 @@ typedef int
> (*eth_representor_info_get_t)(struct
> >> rte_eth_dev *dev,
> >>>    typedef int (*eth_rx_metadata_negotiate_t)(struct rte_eth_dev
> *dev,
> >>>    				       uint64_t *features);
> >>>
> >>> +/**
> >>> + * @internal
> >>> + * Dump ethdev private info to a file.
> >>> + *
> >>
> >> It doesn't dump the 'ethdev' private info, it dumps the private info
> >> from device.
> >
> > It seems perfectly clear to me. How would you prefer it phrased
> instead?
> >
> 
> What described in the document is more accurate,
> "query private info from device".
> 
> What we are dumping here is not ethdev private info, it is device
> private info,
> and we really don't know what that data may be in the ethdev layer.
> 
> Also there is a chance that 'ethdev private info' can be confused with
> 'ethdev->data->dev_private'

OK. Now I got your point! The difference is very subtle.

> 
> > [...]
> >
> >>
> >>> + */
> >>> +__rte_experimental
> >>> +int rte_eth_dev_priv_dump(FILE *file, uint16_t port_id);
> >>> +
> >>
> >> What do you think to have the 'port_id' as first argument to be
> >> consistent
> >> with the other APIs?
> >
> > The _dump APIs in other libraries have the file pointer as the first
> parameter, so let's follow that convention here too. No need to move
> the port_id parameter here.
> >
> 
> Yes, for most of the _dump() APIs, file pointer seems is the first
> argument,
> bu they are from various libraries.
> 
> Within the ethdev APIs, I think it makes sense that all APIs start with
> 'port_id' parameter for consistency, like done in:
> rte_flow_dev_dump(uint16_t port_id, ...)
> 
> > Only rte_dma_dump() has the file pointer last, and I didn't catch it
> when the function was defined.
> >

OK. Then I agree with you about following the convention like rte_flow_dev_dump() with the port_id first.

I even think Connor got it right the first time, and I proposed following the other convention.

It's not easy when there are two opposite conventions. :-)

-Morten


  reply	other threads:[~2022-02-07 12:56 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 11:54 [RFC] " Min Hu (Connor)
2022-01-11 12:10 ` Morten Brørup
2022-01-12  2:40   ` Min Hu (Connor)
2022-01-11 12:48 ` Thomas Monjalon
2022-01-12  2:41   ` Min Hu (Connor)
2022-01-12  2:44   ` Min Hu (Connor)
2022-01-12 10:13     ` Thomas Monjalon
2022-01-12 10:56       ` Min Hu (Connor)
2022-01-12  2:40 ` [RFC v2] " Min Hu (Connor)
2022-01-12  7:20   ` Morten Brørup
2022-01-12 11:15     ` Min Hu (Connor)
2022-01-14 17:56       ` Ajit Khaparde
2022-01-15  0:24         ` Min Hu (Connor)
2022-01-18 15:33           ` Ajit Khaparde
2022-01-12 11:14 ` [RFC v3] " Min Hu (Connor)
2022-01-12 12:05   ` Ray Kinsella
2022-01-18 15:34     ` Ajit Khaparde
2022-01-25 12:56       ` Ferruh Yigit
2022-01-25 12:58         ` Ferruh Yigit
2022-01-25 13:45           ` Min Hu (Connor)
2022-02-03 13:21             ` Ferruh Yigit
2022-02-07  1:37               ` Min Hu (Connor)
2022-02-07  1:35 ` Min Hu (Connor)
2022-02-07  1:47 ` [PATCH] " Min Hu (Connor)
2022-02-07 11:46   ` Ferruh Yigit
2022-02-07 12:18     ` Morten Brørup
2022-02-07 12:35       ` Ferruh Yigit
2022-02-07 12:56         ` Morten Brørup [this message]
2022-02-07 15:35           ` Ferruh Yigit
2022-02-08  0:39             ` Min Hu (Connor)
2022-02-08 10:21               ` Ferruh Yigit
2022-02-08 11:14                 ` Min Hu (Connor)
2022-02-08 12:59                   ` Ferruh Yigit
2022-02-08 13:52                     ` Thomas Monjalon
2022-02-09  1:07                       ` Min Hu (Connor)
2022-02-09  1:06                     ` Min Hu (Connor)
2022-02-08  2:46     ` Min Hu (Connor)
2022-02-08  2:45 ` [PATCH v2] ethdev: introduce " Min Hu (Connor)
2022-02-09  1:21 ` [PATCH v3] " Min Hu (Connor)
2022-02-10 12:32   ` Ferruh Yigit
2022-02-10 12:34     ` Ferruh Yigit
2022-02-11  4:53       ` Min Hu (Connor)
2022-02-10 12:37   ` Ferruh Yigit
2022-02-10 13:16     ` Min Hu (Connor)
2022-02-10 13:22       ` Ferruh Yigit
2022-02-10 15:50         ` Ferruh Yigit
2022-02-11  4:52           ` Min Hu (Connor)

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=98CBD80474FA8B44BF855DF32C47DC35D86E7A@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --cc=mdr@ashroe.eu \
    --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).