DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: remove memset in i40evf_dev_info_get
@ 2018-06-28  1:15 David Harton
  2018-06-28  2:49 ` Xing, Beilei
  0 siblings, 1 reply; 2+ messages in thread
From: David Harton @ 2018-06-28  1:15 UTC (permalink / raw)
  To: beilei.xing, qi.z.zhang; +Cc: dev, David Harton, helin.zhang

i40evf_dev_info_get clears dev_info when data has already
been set by the calling function. Remove the call to
memset() to fix the problem.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: helin.zhang@intel.com

Signed-off-by: David Harton <dharton@cisco.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 804e445..86b38d2 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2182,7 +2182,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
-	memset(dev_info, 0, sizeof(*dev_info));
 	dev_info->max_rx_queues = vf->vsi_res->num_queue_pairs;
 	dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs;
 	dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
-- 
2.10.3.dirty

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: remove memset in i40evf_dev_info_get
  2018-06-28  1:15 [dpdk-dev] [PATCH] net/i40e: remove memset in i40evf_dev_info_get David Harton
@ 2018-06-28  2:49 ` Xing, Beilei
  0 siblings, 0 replies; 2+ messages in thread
From: Xing, Beilei @ 2018-06-28  2:49 UTC (permalink / raw)
  To: David Harton, Zhang, Qi Z; +Cc: dev, Zhang, Helin

Hi,

Thanks for the patch, but there's another patch which has been accepted for the issue.
https://patches.dpdk.org/patch/40682/

Best Regards,
Beilei

> -----Original Message-----
> From: David Harton [mailto:dharton@cisco.com]
> Sent: Thursday, June 28, 2018 9:16 AM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; David Harton <dharton@cisco.com>; Zhang, Helin
> <helin.zhang@intel.com>
> Subject: [PATCH] net/i40e: remove memset in i40evf_dev_info_get
> 
> i40evf_dev_info_get clears dev_info when data has already been set by the
> calling function. Remove the call to
> memset() to fix the problem.
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Cc: helin.zhang@intel.com
> 
> Signed-off-by: David Harton <dharton@cisco.com>
> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 804e445..86b38d2 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -2182,7 +2182,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev,
> struct rte_eth_dev_info *dev_info)  {
>  	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data-
> >dev_private);
> 
> -	memset(dev_info, 0, sizeof(*dev_info));
>  	dev_info->max_rx_queues = vf->vsi_res->num_queue_pairs;
>  	dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs;
>  	dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
> --
> 2.10.3.dirty

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-28  2:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-28  1:15 [dpdk-dev] [PATCH] net/i40e: remove memset in i40evf_dev_info_get David Harton
2018-06-28  2:49 ` Xing, Beilei

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).