[dpdk-dev] [PATCH v2 3/7] i40evf: fix for copying wrong size of link info

Helin Zhang helin.zhang at intel.com
Mon Jun 23 14:57:07 CEST 2014


Fix a bug of copying wrong size of link information in the
function of i40evf_get_link_status().

Signed-off-by: Helin Zhang <helin.zhang at intel.com>
Acked-by: Jing Chen <jing.d.chen at intel.com>
Acked-by: Cunming Liang <cunming.liang at intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
index 4800902..081589c 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
@@ -871,7 +871,7 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link)
 	}
 
 	new_link = (struct rte_eth_link *)args.out_buffer;
-	(void)rte_memcpy(link, new_link, sizeof(link));
+	(void)rte_memcpy(link, new_link, sizeof(*link));
 
 	return 0;
 }
-- 
1.8.1.4



More information about the dev mailing list