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 9750c6e..2726bfb 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