DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Sachin Saxena <sachin.saxena@nxp.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Gagandeep Singh <G.Singh@nxp.com>,
	Akhil Goyal <akhil.goyal@nxp.com>
Subject: Re: [dpdk-dev] Misuses of dev_info->if_index in embedded drivers.
Date: Mon, 24 Aug 2020 15:33:37 +0000	[thread overview]
Message-ID: <AM6PR04MB44567AE0EAB8288689CAD64089560@AM6PR04MB4456.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <3f126048-c0a6-fcac-8819-7e2affdf811a@intel.com>


> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Monday, August 24, 2020 8:49 PM
> To: Stephen Hemminger <stephen@networkplumber.org>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@nxp.com>
> Cc: dev@dpdk.org; Gagandeep Singh <G.Singh@nxp.com>; Akhil Goyal
> <akhil.goyal@nxp.com>
> Subject: Re: [dpdk-dev] Misuses of dev_info->if_index in embedded drivers.
> 
> On 8/24/2020 4:07 PM, Stephen Hemminger wrote:
> > The use of if_index in some drivers is wrong.
> > It does not match the user expectation in the documentation.
> >
> > This code:
> > dpaa2/dpaa2_ethdev.c:   dev_info->if_index = priv->hw_id;
> > pfe/pfe_ethdev.c:       dev_info->if_index = internals->id;
> >
> > Does match:
> > struct rte_eth_dev_info {
> > 	struct rte_device *device; /** Generic device information */
> > 	const char *driver_name; /**< Device Driver name. */
> > 	unsigned int if_index; /**< Index to bound host interface, or 0 if
> none.
> > 		Use if_indextoname() to translate into an interface name. */
> >
> > Also, this code is unnecessary.
> >
> 
> 'if_index' is needed only for some PMDs interact with kernel, like af_packet,
> pcap, tap, af_xdp, ...
> 
> Agree that it should not be needed for 'dpaa2' or 'pfe'.
[Hemant] ok. We will check and remove it.

      reply	other threads:[~2020-08-24 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 15:07 Stephen Hemminger
2020-08-24 15:18 ` Ferruh Yigit
2020-08-24 15:33   ` Hemant Agrawal [this message]

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=AM6PR04MB44567AE0EAB8288689CAD64089560@AM6PR04MB4456.eurprd04.prod.outlook.com \
    --to=hemant.agrawal@nxp.com \
    --cc=G.Singh@nxp.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=stephen@networkplumber.org \
    /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).