[dpdk-dev,09/32] lib/ether: add rte_device in rte_eth_dev

Message ID 1480875447-23680-10-git-send-email-hemant.agrawal@nxp.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
checkpatch/checkpatch success coding style OK

Commit Message

Hemant Agrawal Dec. 4, 2016, 6:17 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

Ferruh Yigit Dec. 6, 2016, 7:48 p.m. UTC | #1
On 12/4/2016 6:17 PM, Hemant Agrawal 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 3c45a1f..6f5673f 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;

I believe this change should not be part of a PMD patchset. This change
is more generic than the PMD.

Won't Shreyansh's patch already do this?

>  	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 */
>
  
Hemant Agrawal Dec. 7, 2016, 6:41 a.m. UTC | #2
On 12/7/2016 1:18 AM, Ferruh Yigit wrote:
> On 12/4/2016 6:17 PM, Hemant Agrawal 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 3c45a1f..6f5673f 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;
>
> I believe this change should not be part of a PMD patchset. This change
> is more generic than the PMD.
>
> Won't Shreyansh's patch already do this?

I agree that this patch is not a fit for this PMD patchset, Shreyansh's 
patch is not yet doing it. He will be taking care of it next.

So till Shreyansh provide the support, we need it.

>
>>  	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 */
>>
>
>
  
Ferruh Yigit Dec. 15, 2016, 2:41 p.m. UTC | #3
On 12/7/2016 6:41 AM, Hemant Agrawal wrote:
> On 12/7/2016 1:18 AM, Ferruh Yigit wrote:
>> On 12/4/2016 6:17 PM, Hemant Agrawal 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 3c45a1f..6f5673f 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;
>>
>> I believe this change should not be part of a PMD patchset. This change
>> is more generic than the PMD.
>>
>> Won't Shreyansh's patch already do this?
> 
> I agree that this patch is not a fit for this PMD patchset, Shreyansh's 
> patch is not yet doing it. He will be taking care of it next.
> 
> So till Shreyansh provide the support, we need it.

If you need it, what do you think sending this as a separate patch? And
when accepted, your driver can use it?

> 
>>
>>>  	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 */
>>>
>>
>>
> 
>
  
Hemant Agrawal Dec. 19, 2016, 5:30 a.m. UTC | #4
On 12/15/2016 8:11 PM, Ferruh Yigit wrote:
> On 12/7/2016 6:41 AM, Hemant Agrawal wrote:
>> On 12/7/2016 1:18 AM, Ferruh Yigit wrote:
>>> On 12/4/2016 6:17 PM, Hemant Agrawal 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 3c45a1f..6f5673f 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;
>>>
>>> I believe this change should not be part of a PMD patchset. This change
>>> is more generic than the PMD.
>>>
>>> Won't Shreyansh's patch already do this?
>>
>> I agree that this patch is not a fit for this PMD patchset, Shreyansh's
>> patch is not yet doing it. He will be taking care of it next.
>>
>> So till Shreyansh provide the support, we need it.
>
> If you need it, what do you think sending this as a separate patch? And
> when accepted, your driver can use it?
>

I will prefer to keep this patch as the first patch in my patchset. If 
Shreyansh's patch come on time, we can easily remove it.

>>
>>>
>>>>  	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 */
>>>>
>>>
>>>
>>
>>
>
>
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 3c45a1f..6f5673f 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 */