[v1,1/2] net/ixgbe: allow get_monitor_addr for VF driver

Message ID bec636928d88d4dbad69a75b0abf18690ffae5ad.1619444945.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v1,1/2] net/ixgbe: allow get_monitor_addr for VF driver |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Burakov, Anatoly April 26, 2021, 1:49 p.m. UTC
  When .get_monitor_addr API was introduced, it was implemented in the
ixgbe driver, but only for the physical function; the virtual function
portion of the driver does not support that API.

Add the missing function pointer to VF device structure.

Fixes: 3982b7967bb7 ("net/ixgbe: implement power management API")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Hunt, David April 26, 2021, 2:20 p.m. UTC | #1
Hi Anatoly,

On 26/4/2021 2:49 PM, Anatoly Burakov wrote:
> When .get_monitor_addr API was introduced, it was implemented in the
> ixgbe driver, but only for the physical function; the virtual function
> portion of the driver does not support that API.
>
> Add the missing function pointer to VF device structure.
>
> Fixes: 3982b7967bb7 ("net/ixgbe: implement power management API")
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>   drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ff65145f55..6cca039a11 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -605,6 +605,7 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
>   	.rss_hash_update      = ixgbe_dev_rss_hash_update,
>   	.rss_hash_conf_get    = ixgbe_dev_rss_hash_conf_get,
>   	.tx_done_cleanup      = ixgbe_dev_tx_done_cleanup,
> +	.get_monitor_addr     = ixgbe_get_monitor_addr,
>   };
>   
>   /* store statistics names and its offset in stats structure */


Thanks for the fix. I ran get_monitor_address() on some ixgbe virtual 
functions here, and can confirm that this patch resolves the issue.

Reviewed-by: David Hunt <david.hunt@intel.com>
  
Wang, Haiyue April 27, 2021, 1:42 a.m. UTC | #2
> -----Original Message-----
> From: Hunt, David <david.hunt@intel.com>
> Sent: Monday, April 26, 2021 22:20
> To: Burakov, Anatoly <anatoly.burakov@intel.com>; dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Wang,
> Haiyue <haiyue.wang@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Liang Ma
> <liang.j.ma@intel.com>
> Subject: Re: [PATCH v1 1/2] net/ixgbe: allow get_monitor_addr for VF driver
> 
> Hi Anatoly,
> 
> On 26/4/2021 2:49 PM, Anatoly Burakov wrote:
> > When .get_monitor_addr API was introduced, it was implemented in the
> > ixgbe driver, but only for the physical function; the virtual function
> > portion of the driver does not support that API.
> >
> > Add the missing function pointer to VF device structure.
> >
> > Fixes: 3982b7967bb7 ("net/ixgbe: implement power management API")
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > ---
> >   drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index ff65145f55..6cca039a11 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -605,6 +605,7 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
> >   	.rss_hash_update      = ixgbe_dev_rss_hash_update,
> >   	.rss_hash_conf_get    = ixgbe_dev_rss_hash_conf_get,
> >   	.tx_done_cleanup      = ixgbe_dev_tx_done_cleanup,
> > +	.get_monitor_addr     = ixgbe_get_monitor_addr,
> >   };
> >
> >   /* store statistics names and its offset in stats structure */
> 
> 
> Thanks for the fix. I ran get_monitor_address() on some ixgbe virtual
> functions here, and can confirm that this patch resolves the issue.
> 
> Reviewed-by: David Hunt <david.hunt@intel.com>
> 
> 

Nice confirmation, thanks, David.

Acked-by: Haiyue Wang <haiyue.wang@intel.com>
  
Qi Zhang April 28, 2021, 1:21 a.m. UTC | #3
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wang, Haiyue
> Sent: Tuesday, April 27, 2021 9:43 AM
> To: Hunt, David <david.hunt@intel.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>; dev@dpdk.org; Guo, Jia <jia.guo@intel.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>; Liang Ma
> <liang.j.ma@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v1 1/2] net/ixgbe: allow get_monitor_addr for
> VF driver
> 
> > -----Original Message-----
> > From: Hunt, David <david.hunt@intel.com>
> > Sent: Monday, April 26, 2021 22:20
> > To: Burakov, Anatoly <anatoly.burakov@intel.com>; dev@dpdk.org; Guo,
> > Jia <jia.guo@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>;
> > Ananyev, Konstantin <konstantin.ananyev@intel.com>; Liang Ma
> > <liang.j.ma@intel.com>
> > Subject: Re: [PATCH v1 1/2] net/ixgbe: allow get_monitor_addr for VF
> > driver
> >
> > Hi Anatoly,
> >
> > On 26/4/2021 2:49 PM, Anatoly Burakov wrote:
> > > When .get_monitor_addr API was introduced, it was implemented in the
> > > ixgbe driver, but only for the physical function; the virtual
> > > function portion of the driver does not support that API.
> > >
> > > Add the missing function pointer to VF device structure.
> > >
> > > Fixes: 3982b7967bb7 ("net/ixgbe: implement power management API")
> > >
> > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > > ---
> > >   drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
> > >   1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > > index ff65145f55..6cca039a11 100644
> > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > > @@ -605,6 +605,7 @@ static const struct eth_dev_ops
> ixgbevf_eth_dev_ops = {
> > >   	.rss_hash_update      = ixgbe_dev_rss_hash_update,
> > >   	.rss_hash_conf_get    = ixgbe_dev_rss_hash_conf_get,
> > >   	.tx_done_cleanup      = ixgbe_dev_tx_done_cleanup,
> > > +	.get_monitor_addr     = ixgbe_get_monitor_addr,
> > >   };
> > >
> > >   /* store statistics names and its offset in stats structure */
> >
> >
> > Thanks for the fix. I ran get_monitor_address() on some ixgbe virtual
> > functions here, and can confirm that this patch resolves the issue.
> >
> > Reviewed-by: David Hunt <david.hunt@intel.com>
> >
> >
> 
> Nice confirmation, thanks, David.
> 
> Acked-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ff65145f55..6cca039a11 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -605,6 +605,7 @@  static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.rss_hash_update      = ixgbe_dev_rss_hash_update,
 	.rss_hash_conf_get    = ixgbe_dev_rss_hash_conf_get,
 	.tx_done_cleanup      = ixgbe_dev_tx_done_cleanup,
+	.get_monitor_addr     = ixgbe_get_monitor_addr,
 };
 
 /* store statistics names and its offset in stats structure */