DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Shreyansh Jain <shreyansh.jain@nxp.com>,
	 Allain Legacy <allain.legacy@windriver.com>,
	Tomasz Duszynski <tdu@semihalf.com>,
	 Santosh Shukla <santosh.shukla@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH v4] ethdev: replace bus specific struct with generic dev
Date: Fri, 30 Mar 2018 17:29:59 +0200	[thread overview]
Message-ID: <CALwxeUs+Hfhu2L=0F4U5yJLk9_5ZffvDZFcLLgdy4RtfS-GH3A@mail.gmail.com> (raw)
In-Reply-To: <20180330151704.183495-1-ferruh.yigit@intel.com>

On Fri, Mar 30, 2018 at 5:17 PM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
> although it is common for all ethdev in all buses.
>
> Replacing pci specific struct with generic device struct and updating
> places that are using pci device in a way to get this information from
> generic device.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

[snip]

> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 209796d46..68bdc3103 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -2421,6 +2421,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
>         memset(dev_info, 0, sizeof(struct rte_eth_dev_info));
>         dev_info->rx_desc_lim = lim;
>         dev_info->tx_desc_lim = lim;
> +       dev_info->device = dev->device;
>
>         RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);
>         (*dev->dev_ops->dev_infos_get)(dev, dev_info);

Reviewed-by: David Marchand <david.marchand@6wind.com>

Just a little comment, do we want the pmd to be able to override this ?

I can see we enforce the driver name by putting it after the call to
.dev_infos_get.
http://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.c#n2399

octeontx pmd seems to try to do something about it:
http://dpdk.org/browse/dpdk/tree/drivers/net/octeontx/octeontx_ethdev.c#n622

Not sure it does something, might be a thing to cleanup.


-- 
David Marchand

  reply	other threads:[~2018-03-30 15:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 17:40 [dpdk-dev] [PATCH] " Ferruh Yigit
2018-03-28  7:04 ` Shreyansh Jain
2018-03-28 13:11 ` Legacy, Allain
2018-03-29  6:17 ` Tomasz Duszynski
2018-03-29  9:20   ` Ferruh Yigit
2018-03-29  8:01 ` santosh
2018-03-29 14:50 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2018-03-29 17:52   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2018-03-30  6:44     ` David Marchand
2018-03-30 10:27       ` Ferruh Yigit
2018-03-30 15:17     ` [dpdk-dev] [PATCH v4] " Ferruh Yigit
2018-03-30 15:29       ` David Marchand [this message]
2018-04-02  9:40         ` David Marchand
2018-04-02 16:13         ` santosh
2018-04-03  9:06           ` David Marchand
2018-04-03  9:50             ` Ferruh Yigit
2018-04-04 17:57               ` De Lara Guarch, Pablo
2018-04-05  9:19                 ` Ferruh Yigit
2018-04-05 16:40       ` [dpdk-dev] [PATCH v5] " Ferruh Yigit
2018-04-09 12:09         ` [dpdk-dev] [PATCH v6] " Ferruh Yigit
2018-04-10 13:34           ` Thomas Monjalon
2018-04-10 18:19             ` 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='CALwxeUs+Hfhu2L=0F4U5yJLk9_5ZffvDZFcLLgdy4RtfS-GH3A@mail.gmail.com' \
    --to=david.marchand@6wind.com \
    --cc=allain.legacy@windriver.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=tdu@semihalf.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).