[dpdk-dev,PATCHv2,01/34] lib/ether: add rte_device in rte_eth_dev

Message ID 1482180853-18823-2-git-send-email-hemant.agrawal@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Hemant Agrawal Dec. 19, 2016, 8:53 p.m. UTC
  Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/librte_ether/rte_ethdev.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Stephen Hemminger Dec. 19, 2016, 4:16 p.m. UTC | #1
On Tue, 20 Dec 2016 02:23:40 +0530
Hemant Agrawal <hemant.agrawal@nxp.com> wrote:

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  lib/librte_ether/rte_ethdev.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index 9678179..0b601e9 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -1626,6 +1626,7 @@ struct rte_eth_dev {
>  	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
>  	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
>  	struct rte_eth_dev_data *data;  /**< Pointer to device data */
> +	struct rte_device *device;
>  	const struct eth_driver *driver;/**< Driver for this device */
>  	const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
>  	struct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */

NAK
I would rather that rte_pci_device be eliminated from rte_eth_dev_data and
replace by more generic rte_device. I am working on a patch set to do this,
it is not fundamentally hard.
  
Shreyansh Jain Dec. 20, 2016, 4:41 a.m. UTC | #2
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Monday, December 19, 2016 9:47 PM
> To: Hemant Agrawal <hemant.agrawal@nxp.com>
> Cc: dev@dpdk.org; thomas.monjalon@6wind.com; bruce.richardson@intel.com;
> Shreyansh Jain <shreyansh.jain@nxp.com>; john.mcnamara@intel.com;
> ferruh.yigit@intel.com; jerin.jacob@caviumnetworks.com
> Subject: Re: [dpdk-dev] [PATCHv2 01/34] lib/ether: add rte_device in
> rte_eth_dev
> 
> On Tue, 20 Dec 2016 02:23:40 +0530
> Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> 
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> >  lib/librte_ether/rte_ethdev.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> > index 9678179..0b601e9 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -1626,6 +1626,7 @@ struct rte_eth_dev {
> >  	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
> >  	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
> >  	struct rte_eth_dev_data *data;  /**< Pointer to device data */
> > +	struct rte_device *device;
> >  	const struct eth_driver *driver;/**< Driver for this device */
> >  	const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
> >  	struct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */
> 
> NAK
> I would rather that rte_pci_device be eliminated from rte_eth_dev_data and
> replace by more generic rte_device. I am working on a patch set to do this,
> it is not fundamentally hard.

That's interesting. I am already working on it (removing pci_dev from rte_eth_dev and pci_drv from eth_driver). Anyways, I will focus on something different if you are already working on it.

(Do let me know if you are working on eth_driver change as well - replacing rte_pci_driver with rte_driver or complete removal of eth_driver all together as discussed on ML).

-
Shreyansh
  
Hemant Agrawal Dec. 20, 2016, 6:12 a.m. UTC | #3
On 12/19/2016 9:46 PM, Stephen Hemminger wrote:
> On Tue, 20 Dec 2016 02:23:40 +0530
> Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> ---
>>  lib/librte_ether/rte_ethdev.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
>> index 9678179..0b601e9 100644
>> --- a/lib/librte_ether/rte_ethdev.h
>> +++ b/lib/librte_ether/rte_ethdev.h
>> @@ -1626,6 +1626,7 @@ struct rte_eth_dev {
>>  	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
>>  	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
>>  	struct rte_eth_dev_data *data;  /**< Pointer to device data */
>> +	struct rte_device *device;
>>  	const struct eth_driver *driver;/**< Driver for this device */
>>  	const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
>>  	struct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */
>
> NAK
> I would rather that rte_pci_device be eliminated from rte_eth_dev_data and
> replace by more generic rte_device. I am working on a patch set to do this,
> it is not fundamentally hard.
>
As discussed before,  this patch is just an stop-gap arrangement till we 
get a proper solution. That is the very reason, I put it as first patch 
in my patchset - to be removed easily.

It is helpful that you are coming with the proper solution.
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 9678179..0b601e9 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1626,6 +1626,7 @@  struct rte_eth_dev {
 	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
 	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
 	struct rte_eth_dev_data *data;  /**< Pointer to device data */
+	struct rte_device *device;
 	const struct eth_driver *driver;/**< Driver for this device */
 	const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
 	struct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */