i40evf: fix link status
authorHelin Zhang <helin.zhang@intel.com>
Tue, 24 Jun 2014 02:02:35 +0000 (10:02 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Jun 2014 11:00:02 +0000 (13:00 +0200)
Fix a bug of copying wrong size of link information in the
function i40evf_get_link_status().

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
lib/librte_pmd_i40e/i40e_ethdev_vf.c

index 9750c6e..2726bfb 100644 (file)
@@ -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;
 }