[dpdk-dev,31/56] net/sfc: implement dummy callback to get device information
Checks
Commit Message
Just a stub to be filled in when corresponding functionality is
implemented.
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/efx/sfc_ethdev.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
Comments
On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
> Just a stub to be filled in when corresponding functionality is
> implemented.
What about merging this stub with real implementation?
Or perhaps replace with code that adds dummy .dev_configure?
>
> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> drivers/net/sfc/efx/sfc_ethdev.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/sfc/efx/sfc_ethdev.c b/drivers/net/sfc/efx/sfc_ethdev.c
> index ff20a13..0deff07 100644
> --- a/drivers/net/sfc/efx/sfc_ethdev.c
> +++ b/drivers/net/sfc/efx/sfc_ethdev.c
> @@ -37,9 +37,16 @@
> #include "sfc_kvargs.h"
>
>
> +static void
> +sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
> +{
> + struct sfc_adapter *sa = dev->data->dev_private;
> +
> + sfc_log_init(sa, "entry");
> +}
> +
> static const struct eth_dev_ops sfc_eth_dev_ops = {
> - /* Just dummy init to avoid build-time warning */
> - .dev_configure = NULL,
> + .dev_infos_get = sfc_dev_infos_get,
> };
>
> static int
>
On 11/23/2016 06:26 PM, Ferruh Yigit wrote:
> On 11/21/2016 3:00 PM, Andrew Rybchenko wrote:
>> Just a stub to be filled in when corresponding functionality is
>> implemented.
> What about merging this stub with real implementation?
> Or perhaps replace with code that adds dummy .dev_configure?
Thanks, I like the second idea. Will do in v2.
>> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>> drivers/net/sfc/efx/sfc_ethdev.c | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/sfc/efx/sfc_ethdev.c b/drivers/net/sfc/efx/sfc_ethdev.c
>> index ff20a13..0deff07 100644
>> --- a/drivers/net/sfc/efx/sfc_ethdev.c
>> +++ b/drivers/net/sfc/efx/sfc_ethdev.c
>> @@ -37,9 +37,16 @@
>> #include "sfc_kvargs.h"
>>
>>
>> +static void
>> +sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>> +{
>> + struct sfc_adapter *sa = dev->data->dev_private;
>> +
>> + sfc_log_init(sa, "entry");
>> +}
>> +
>> static const struct eth_dev_ops sfc_eth_dev_ops = {
>> - /* Just dummy init to avoid build-time warning */
>> - .dev_configure = NULL,
>> + .dev_infos_get = sfc_dev_infos_get,
>> };
>>
>> static int
>>
@@ -37,9 +37,16 @@
#include "sfc_kvargs.h"
+static void
+sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+{
+ struct sfc_adapter *sa = dev->data->dev_private;
+
+ sfc_log_init(sa, "entry");
+}
+
static const struct eth_dev_ops sfc_eth_dev_ops = {
- /* Just dummy init to avoid build-time warning */
- .dev_configure = NULL,
+ .dev_infos_get = sfc_dev_infos_get,
};
static int