DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Shepard Siegel <shepard.siegel@atomicrules.com>,
	Ed Czeck <ed.czeck@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>,
	"Legacy, Allain (Wind River)" <allain.legacy@windriver.com>,
	"Peters, Matt (Wind River)" <matt.peters@windriver.com>,
	"Zhang, Helin" <helin.zhang@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] drivers/net: add generic ethdev macro to get PCI device
Date: Fri, 5 May 2017 10:44:11 +0100	[thread overview]
Message-ID: <97a3ba01-ef2e-98ad-bf7b-d2e753573396@intel.com> (raw)
In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B5A0963@shsmsx102.ccr.corp.intel.com>

On 5/5/2017 1:44 AM, Lu, Wenzhuo wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Thursday, May 4, 2017 9:08 PM
>> To: Thomas Monjalon; Shepard Siegel; Ed Czeck; John Miller; Legacy, Allain
>> (Wind River); Peters, Matt (Wind River); Lu, Wenzhuo; Zhang, Helin; Wu,
>> Jingjing; Ananyev, Konstantin; Andrew Rybchenko
>> Cc: dev@dpdk.org; Yigit, Ferruh
>> Subject: [PATCH] drivers/net: add generic ethdev macro to get PCI device
>>
>> Instead of many PMD define their own macro, define a generic one in ethdev
>> and use that in PMDs.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> 
> BTW, there're RTE_DEV_TO_PCI(dev->device) in many places, maybe we can replace them by the new macro RTE_ETH_DEV_TO_PCI.

Net drivers use it always as RTE_DEV_TO_PCI(dev->device), since they all
have eth_dev references, not rte_device.

So there are two options, either convert all usages to
RTE_DEV_TO_PCI(eth_dev->device) or RTE_ETH_DEV_TO_PCI(eth_dev)

I think RTE_ETH_DEV_TO_PCI(eth_dev) is better since it hides
eth_dev->device detail, which is not required in this context. And it
reflects the intention better, get pci from eth device.

I will update the patch to convert those usages too.

Thanks,
ferruh

  reply	other threads:[~2017-05-05  9:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 13:08 Ferruh Yigit
2017-05-04 13:34 ` Legacy, Allain
2017-05-05  0:44 ` Lu, Wenzhuo
2017-05-05  9:44   ` Ferruh Yigit [this message]
2017-05-05  9:54 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2017-05-05 10:57   ` Andrew Rybchenko
2017-05-15 10:24   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2017-05-15 10:54     ` Andrew Rybchenko
2017-05-16 16:25       ` Ferruh Yigit

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=97a3ba01-ef2e-98ad-bf7b-d2e753573396@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=allain.legacy@windriver.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.miller@atomicrules.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=matt.peters@windriver.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.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).