git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/txgbe: add multi-speed link setup
[dpdk.git]
/
drivers
/
net
/
ixgbe
/
ixgbe_ethdev.c
diff --git
a/drivers/net/ixgbe/ixgbe_ethdev.c
b/drivers/net/ixgbe/ixgbe_ethdev.c
index
14a254a
..
913c453
100644
(file)
--- a/
drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/
drivers/net/ixgbe/ixgbe_ethdev.c
@@
-33,7
+33,7
@@
#include <rte_random.h>
#include <rte_dev.h>
#include <rte_hash_crc.h>
#include <rte_random.h>
#include <rte_dev.h>
#include <rte_hash_crc.h>
-#ifdef RTE_LIB
RTE
_SECURITY
+#ifdef RTE_LIB_SECURITY
#include <rte_security_driver.h>
#endif
#include <rte_security_driver.h>
#endif
@@
-1077,7
+1077,7
@@
eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
IXGBE_DEV_PRIVATE_TO_BW_CONF(eth_dev->data->dev_private);
uint32_t ctrl_ext;
uint16_t csum;
IXGBE_DEV_PRIVATE_TO_BW_CONF(eth_dev->data->dev_private);
uint32_t ctrl_ext;
uint16_t csum;
- int diag, i;
+ int diag, i
, ret
;
PMD_INIT_FUNC_TRACE();
PMD_INIT_FUNC_TRACE();
@@
-1152,7
+1152,7
@@
eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
/* Unlock any pending hardware semaphore */
ixgbe_swfw_lock_reset(hw);
/* Unlock any pending hardware semaphore */
ixgbe_swfw_lock_reset(hw);
-#ifdef RTE_LIB
RTE
_SECURITY
+#ifdef RTE_LIB_SECURITY
/* Initialize security_ctx only for primary process*/
if (ixgbe_ipsec_ctx_create(eth_dev))
return -ENOMEM;
/* Initialize security_ctx only for primary process*/
if (ixgbe_ipsec_ctx_create(eth_dev))
return -ENOMEM;
@@
-1256,7
+1256,14
@@
eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
memset(hwstrip, 0, sizeof(*hwstrip));
/* initialize PF if max_vfs not zero */
memset(hwstrip, 0, sizeof(*hwstrip));
/* initialize PF if max_vfs not zero */
- ixgbe_pf_host_init(eth_dev);
+ ret = ixgbe_pf_host_init(eth_dev);
+ if (ret) {
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
+ rte_free(eth_dev->data->hash_mac_addrs);
+ eth_dev->data->hash_mac_addrs = NULL;
+ return ret;
+ }
ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
/* let hardware know driver is loaded */
ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
/* let hardware know driver is loaded */
@@
-3054,7
+3061,7
@@
ixgbe_dev_close(struct rte_eth_dev *dev)
/* Remove all Traffic Manager configuration */
ixgbe_tm_conf_uninit(dev);
/* Remove all Traffic Manager configuration */
ixgbe_tm_conf_uninit(dev);
-#ifdef RTE_LIB
RTE
_SECURITY
+#ifdef RTE_LIB_SECURITY
rte_free(dev->security_ctx);
#endif
rte_free(dev->security_ctx);
#endif