[dpdk-dev] [PATCH 6/7] i40evf: fix for copying wrong size of link info, and remove an useless function
Helin Zhang
helin.zhang at intel.com
Fri Jun 20 08:14:48 CEST 2014
Delete the inline function which is not used at this moment.
Fix the bug of copying wrong size of link info in function of
i40evf_get_link_status().
Signed-off-by: Helin Zhang <helin.zhang at intel.com>
Acked-by: Cunming Liang <cunming.liang at intel.com>
Acked-by: Jing Chen <jing.d.chen at intel.com>
---
lib/librte_pmd_i40e/i40e_ethdev_vf.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
index de71407..8989753 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
@@ -809,7 +809,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;
}
@@ -821,20 +821,6 @@ static struct rte_pci_id pci_id_i40evf_map[] = {
};
static inline int
-i40evf_dev_atomic_read_link_status(struct rte_eth_dev *dev,
- struct rte_eth_link *link)
-{
- struct rte_eth_link *dst = link;
- struct rte_eth_link *src = &(dev->data->dev_link);
-
- if (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst,
- *(uint64_t *)src) == 0)
- return -1;
-
- return 0;
-}
-
-static inline int
i40evf_dev_atomic_write_link_status(struct rte_eth_dev *dev,
struct rte_eth_link *link)
{
--
1.8.1.4
More information about the dev
mailing list