net/txgbe: support VF interrupt
[dpdk.git] / drivers / net / txgbe / txgbe_ethdev.c
index 0ce17b1..23f9d17 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdint.h>
 #include <string.h>
 #include <rte_common.h>
-#include <rte_ethdev_pci.h>
+#include <ethdev_pci.h>
 
 #include <rte_interrupts.h>
 #include <rte_log.h>
@@ -547,6 +547,12 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
        /* Unlock any pending hardware semaphore */
        txgbe_swfw_lock_reset(hw);
 
+#ifdef RTE_LIB_SECURITY
+       /* Initialize security_ctx only for primary process*/
+       if (txgbe_ipsec_ctx_create(eth_dev))
+               return -ENOMEM;
+#endif
+
        /* Initialize DCB configuration*/
        memset(dcb_config, 0, sizeof(struct txgbe_dcb_config));
        txgbe_dcb_init(hw, dcb_config);
@@ -1963,6 +1969,10 @@ txgbe_dev_close(struct rte_eth_dev *dev)
        /* Remove all Traffic Manager configuration */
        txgbe_tm_conf_uninit(dev);
 
+#ifdef RTE_LIB_SECURITY
+       rte_free(dev->security_ctx);
+#endif
+
        return ret;
 }
 
@@ -5215,6 +5225,7 @@ static const struct eth_dev_ops txgbe_eth_dev_ops = {
        .timesync_write_time        = txgbe_timesync_write_time,
        .udp_tunnel_port_add        = txgbe_dev_udp_tunnel_port_add,
        .udp_tunnel_port_del        = txgbe_dev_udp_tunnel_port_del,
+       .tm_ops_get                 = txgbe_tm_ops_get,
        .tx_done_cleanup            = txgbe_dev_tx_done_cleanup,
 };