common/cnxk: use computed value for WQE skip
[dpdk.git] / drivers / net / ixgbe / ixgbe_ethdev.c
index 7fd2c53..f31bbb7 100644 (file)
 #define IXGBE_EXVET_VET_EXT_SHIFT              16
 #define IXGBE_DMATXCTL_VT_MASK                 0xFFFF0000
 
+#define IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "fiber_sdp3_no_tx_disable"
+
+static const char * const ixgbe_valid_arguments[] = {
+       IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+       NULL
+};
+
 #define IXGBEVF_DEVARG_PFLINK_FULLCHK          "pflink_fullchk"
 
 static const char * const ixgbevf_valid_arguments[] = {
@@ -348,6 +355,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 static int ixgbe_filter_restore(struct rte_eth_dev *dev);
 static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
 static int ixgbe_wait_for_link_up(struct ixgbe_hw *hw);
+static int devarg_handle_int(__rte_unused const char *key, const char *value,
+                            void *extra_args);
 
 /*
  * Define VF Stats MACRO for Non "cleared on read" register
@@ -781,6 +790,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
        case ixgbe_phy_sfp_passive_unknown:
                return 1;
        default:
+               /* x550em devices may be SFP, check media type */
+               switch (hw->mac.type) {
+               case ixgbe_mac_X550EM_x:
+               case ixgbe_mac_X550EM_a:
+                       switch (ixgbe_get_media_type(hw)) {
+                       case ixgbe_media_type_fiber:
+                       case ixgbe_media_type_fiber_qsfp:
+                               return 1;
+                       default:
+                               break;
+                       }
+               default:
+                       break;
+               }
                return 0;
        }
 }
@@ -1018,6 +1041,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
        ixgbe_release_swfw_semaphore(hw, mask);
 }
 
+static void
+ixgbe_parse_devargs(struct ixgbe_adapter *adapter,
+                     struct rte_devargs *devargs)
+{
+       struct rte_kvargs *kvlist;
+       uint16_t sdp3_no_tx_disable;
+
+       if (devargs == NULL)
+               return;
+
+       kvlist = rte_kvargs_parse(devargs->args, ixgbe_valid_arguments);
+       if (kvlist == NULL)
+               return;
+
+       if (rte_kvargs_count(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE) == 1 &&
+           rte_kvargs_process(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+                              devarg_handle_int, &sdp3_no_tx_disable) == 0 &&
+           sdp3_no_tx_disable == 1)
+               adapter->sdp3_no_tx_disable = 1;
+
+       rte_kvargs_free(kvlist);
+}
+
 /*
  * This function is based on code in ixgbe_attach() in base/ixgbe.c.
  * It returns 0 on success.
@@ -1027,7 +1073,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 {
        struct ixgbe_adapter *ad = eth_dev->data->dev_private;
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
        struct ixgbe_vfta *shadow_vfta =
@@ -1081,6 +1127,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
        }
 
        rte_atomic32_clear(&ad->link_thread_running);
+       ixgbe_parse_devargs(eth_dev->data->dev_private,
+                           pci_dev->device.devargs);
        rte_eth_copy_pci_info(eth_dev, pci_dev);
        eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
@@ -1223,13 +1271,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
        /* initialize PF if max_vfs not zero */
        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;
-       }
+       if (ret)
+               goto err_pf_host_init;
 
        ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
        /* let hardware know driver is loaded */
@@ -1268,10 +1311,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
        TAILQ_INIT(&filter_info->fivetuple_list);
 
        /* initialize flow director filter list & hash */
-       ixgbe_fdir_filter_init(eth_dev);
+       ret = ixgbe_fdir_filter_init(eth_dev);
+       if (ret)
+               goto err_fdir_filter_init;
 
        /* initialize l2 tunnel filter list & hash */
-       ixgbe_l2_tn_filter_init(eth_dev);
+       ret = ixgbe_l2_tn_filter_init(eth_dev);
+       if (ret)
+               goto err_l2_tn_filter_init;
 
        /* initialize flow filter lists */
        ixgbe_filterlist_init();
@@ -1283,6 +1330,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
        ixgbe_tm_conf_init(eth_dev);
 
        return 0;
+
+err_l2_tn_filter_init:
+       ixgbe_fdir_filter_uninit(eth_dev);
+err_fdir_filter_init:
+       ixgbe_disable_intr(hw);
+       rte_intr_disable(intr_handle);
+       rte_intr_callback_unregister(intr_handle,
+               ixgbe_dev_interrupt_handler, eth_dev);
+       ixgbe_pf_host_uninit(eth_dev);
+err_pf_host_init:
+       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;
 }
 
 static int
@@ -1322,10 +1384,8 @@ static int ixgbe_fdir_filter_uninit(struct rte_eth_dev *eth_dev)
                IXGBE_DEV_PRIVATE_TO_FDIR_INFO(eth_dev->data->dev_private);
        struct ixgbe_fdir_filter *fdir_filter;
 
-               if (fdir_info->hash_map)
-               rte_free(fdir_info->hash_map);
-       if (fdir_info->hash_handle)
-               rte_hash_free(fdir_info->hash_handle);
+       rte_free(fdir_info->hash_map);
+       rte_hash_free(fdir_info->hash_handle);
 
        while ((fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list))) {
                TAILQ_REMOVE(&fdir_info->fdir_list,
@@ -1343,10 +1403,8 @@ static int ixgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev)
                IXGBE_DEV_PRIVATE_TO_L2_TN_INFO(eth_dev->data->dev_private);
        struct ixgbe_l2_tn_filter *l2_tn_filter;
 
-       if (l2_tn_info->hash_map)
-               rte_free(l2_tn_info->hash_map);
-       if (l2_tn_info->hash_handle)
-               rte_hash_free(l2_tn_info->hash_handle);
+       rte_free(l2_tn_info->hash_map);
+       rte_hash_free(l2_tn_info->hash_handle);
 
        while ((l2_tn_filter = TAILQ_FIRST(&l2_tn_info->l2_tn_list))) {
                TAILQ_REMOVE(&l2_tn_info->l2_tn_list,
@@ -1525,7 +1583,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
        uint32_t tc, tcs;
        struct ixgbe_adapter *ad = eth_dev->data->dev_private;
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
        struct ixgbe_vfta *shadow_vfta =
@@ -1958,10 +2016,10 @@ ixgbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev, uint16_t queue, bool on)
        rxq = dev->data->rx_queues[queue];
 
        if (on) {
-               rxq->vlan_flags = PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
+               rxq->vlan_flags = RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
                rxq->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
        } else {
-               rxq->vlan_flags = PKT_RX_VLAN;
+               rxq->vlan_flags = RTE_MBUF_F_RX_VLAN;
                rxq->offloads &= ~RTE_ETH_RX_OFFLOAD_VLAN_STRIP;
        }
 }
@@ -2375,7 +2433,7 @@ ixgbe_dev_configure(struct rte_eth_dev *dev)
        if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)
                dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
 
-       /* multipe queue mode checking */
+       /* multiple queue mode checking */
        ret  = ixgbe_check_mq_mode(dev);
        if (ret != 0) {
                PMD_DRV_LOG(ERR, "ixgbe_check_mq_mode fails with %d.",
@@ -2539,7 +2597,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
        struct ixgbe_vf_info *vfinfo =
                *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        uint32_t intr_vector = 0;
        int err;
        bool link_up = false, negotiate = 0;
@@ -2594,18 +2652,16 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
                        return -1;
        }
 
-       if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
-               intr_handle->intr_vec =
-                       rte_zmalloc("intr_vec",
-                                   dev->data->nb_rx_queues * sizeof(int), 0);
-               if (intr_handle->intr_vec == NULL) {
+       if (rte_intr_dp_is_en(intr_handle)) {
+               if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
+                                                  dev->data->nb_rx_queues)) {
                        PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
                                     " intr_vec", dev->data->nb_rx_queues);
                        return -ENOMEM;
                }
        }
 
-       /* confiugre msix for sleep until rx interrupt */
+       /* configure MSI-X for sleep until Rx interrupt */
        ixgbe_configure_msix(dev);
 
        /* initialize transmission unit */
@@ -2834,7 +2890,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
        struct ixgbe_vf_info *vfinfo =
                *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        int vf;
        struct ixgbe_tm_conf *tm_conf =
                IXGBE_DEV_PRIVATE_TO_TM_CONF(dev->data->dev_private);
@@ -2885,10 +2941,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
 
        /* Clean datapath event and queue/vec mapping */
        rte_intr_efd_disable(intr_handle);
-       if (intr_handle->intr_vec != NULL) {
-               rte_free(intr_handle->intr_vec);
-               intr_handle->intr_vec = NULL;
-       }
+       rte_intr_vec_list_free(intr_handle);
 
        /* reset hierarchy commit */
        tm_conf->committed = false;
@@ -2912,7 +2965,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev)
        if (hw->mac.type == ixgbe_mac_82599EB) {
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
                if (hw->device_id == IXGBE_DEV_ID_82599_BYPASS) {
-                       /* Not suported in bypass mode */
+                       /* Not supported in bypass mode */
                        PMD_INIT_LOG(ERR, "Set link up is not supported "
                                     "by device id 0x%x", hw->device_id);
                        return -ENOTSUP;
@@ -2943,7 +2996,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev)
        if (hw->mac.type == ixgbe_mac_82599EB) {
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
                if (hw->device_id == IXGBE_DEV_ID_82599_BYPASS) {
-                       /* Not suported in bypass mode */
+                       /* Not supported in bypass mode */
                        PMD_INIT_LOG(ERR, "Set link down is not supported "
                                     "by device id 0x%x", hw->device_id);
                        return -ENOTSUP;
@@ -2972,7 +3025,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        int retries = 0;
        int ret;
 
@@ -3033,6 +3086,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
 
 #ifdef RTE_LIB_SECURITY
        rte_free(dev->security_ctx);
+       dev->security_ctx = NULL;
 #endif
 
        return ret;
@@ -4241,7 +4295,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
                return rte_eth_linkstatus_set(dev, &link);
        }
 
-       if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+       if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber &&
+           !ad->sdp3_no_tx_disable) {
                esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
                if ((esdp_reg & IXGBE_ESDP_SDP3))
                        link_up = 0;
@@ -4608,7 +4663,7 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
  * @param handle
  *  Pointer to interrupt handle.
  * @param param
- *  The address of parameter (struct rte_eth_dev *) regsitered before.
+ *  The address of parameter (struct rte_eth_dev *) registered before.
  *
  * @return
  *  void
@@ -4618,7 +4673,7 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
 {
        struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        struct ixgbe_interrupt *intr =
                IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
        struct ixgbe_hw *hw =
@@ -4664,7 +4719,7 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
  * @param handle
  *  Pointer to interrupt handle.
  * @param param
- *  The address of parameter (struct rte_eth_dev *) regsitered before.
+ *  The address of parameter (struct rte_eth_dev *) registered before.
  *
  * @return
  *  void
@@ -5178,7 +5233,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
         * scattered packets when this feature has not been enabled before.
         */
        if (dev->data->dev_started && !dev->data->scattered_rx &&
-           frame_size + 2 * IXGBE_VLAN_TAG_SIZE >
+           frame_size + 2 * RTE_VLAN_HLEN >
                        dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {
                PMD_INIT_LOG(ERR, "Stop port first.");
                return -EINVAL;
@@ -5290,7 +5345,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
                IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        uint32_t intr_vector = 0;
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 
        int err, mask = 0;
 
@@ -5353,11 +5408,9 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
                }
        }
 
-       if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
-               intr_handle->intr_vec =
-                       rte_zmalloc("intr_vec",
-                                   dev->data->nb_rx_queues * sizeof(int), 0);
-               if (intr_handle->intr_vec == NULL) {
+       if (rte_intr_dp_is_en(intr_handle)) {
+               if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
+                                                  dev->data->nb_rx_queues)) {
                        PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
                                     " intr_vec", dev->data->nb_rx_queues);
                        ixgbe_dev_clear_queues(dev);
@@ -5397,7 +5450,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
        struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        struct ixgbe_adapter *adapter = dev->data->dev_private;
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 
        if (hw->adapter_stopped)
                return 0;
@@ -5425,10 +5478,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
 
        /* Clean datapath event and queue/vec mapping */
        rte_intr_efd_disable(intr_handle);
-       if (intr_handle->intr_vec != NULL) {
-               rte_free(intr_handle->intr_vec);
-               intr_handle->intr_vec = NULL;
-       }
+       rte_intr_vec_list_free(intr_handle);
 
        adapter->rss_reta_updated = 0;
 
@@ -5440,7 +5490,7 @@ ixgbevf_dev_close(struct rte_eth_dev *dev)
 {
        struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        int ret;
 
        PMD_INIT_FUNC_TRACE();
@@ -5738,7 +5788,7 @@ static int
 ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        struct ixgbe_interrupt *intr =
                IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
        struct ixgbe_hw *hw =
@@ -5764,7 +5814,7 @@ ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        uint32_t vec = IXGBE_MISC_VEC_ID;
 
        if (rte_intr_allow_others(intr_handle))
@@ -5780,7 +5830,7 @@ static int
 ixgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        uint32_t mask;
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -5907,7 +5957,7 @@ static void
 ixgbevf_configure_msix(struct rte_eth_dev *dev)
 {
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        uint32_t q_idx;
@@ -5931,11 +5981,13 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)
        /* Configure all RX queues of VF */
        for (q_idx = 0; q_idx < dev->data->nb_rx_queues; q_idx++) {
                /* Force all queue use vector 0,
-                * as IXGBE_VF_MAXMSIVECOTR = 1
+                * as IXGBE_VF_MAXMSIVECTOR = 1
                 */
                ixgbevf_set_ivar_map(hw, 0, q_idx, vector_idx);
-               intr_handle->intr_vec[q_idx] = vector_idx;
-               if (vector_idx < base + intr_handle->nb_efd - 1)
+               rte_intr_vec_list_index_set(intr_handle, q_idx,
+                                                  vector_idx);
+               if (vector_idx < base + rte_intr_nb_efd_get(intr_handle)
+                   - 1)
                        vector_idx++;
        }
 
@@ -5956,7 +6008,7 @@ static void
 ixgbe_configure_msix(struct rte_eth_dev *dev)
 {
        struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
-       struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+       struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
        struct ixgbe_hw *hw =
                IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
        uint32_t queue_id, base = IXGBE_MISC_VEC_ID;
@@ -6000,8 +6052,10 @@ ixgbe_configure_msix(struct rte_eth_dev *dev)
                        queue_id++) {
                        /* by default, 1:1 mapping */
                        ixgbe_set_ivar_map(hw, 0, queue_id, vec);
-                       intr_handle->intr_vec[queue_id] = vec;
-                       if (vec < base + intr_handle->nb_efd - 1)
+                       rte_intr_vec_list_index_set(intr_handle,
+                                                          queue_id, vec);
+                       if (vec < base + rte_intr_nb_efd_get(intr_handle)
+                           - 1)
                                vec++;
                }
 
@@ -6262,7 +6316,7 @@ ixgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
  * @param
  * dev: Pointer to struct rte_eth_dev.
  * index: the index the filter allocates.
- * filter: ponter to the filter that will be added.
+ * filter: pointer to the filter that will be added.
  * rx_queue: the queue id the filter assigned to.
  *
  * @return
@@ -6347,7 +6401,7 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
         * scattered packets when this feature has not been enabled before.
         */
        if (dev_data->dev_started && !dev_data->scattered_rx &&
-           (max_frame + 2 * IXGBE_VLAN_TAG_SIZE >
+           (max_frame + 2 * RTE_VLAN_HLEN >
                        dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)) {
                PMD_INIT_LOG(ERR, "Stop port first.");
                return -EINVAL;
@@ -6878,7 +6932,7 @@ ixgbe_timesync_disable(struct rte_eth_dev *dev)
        /* Disable L2 filtering of IEEE1588/802.1AS Ethernet frame types. */
        IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_1588), 0);
 
-       /* Stop incrementating the System Time registers. */
+       /* Stop incrementing the System Time registers. */
        IXGBE_WRITE_REG(hw, IXGBE_TIMINCA, 0);
 
        return 0;
@@ -8231,6 +8285,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe,
+                             IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "=<0|1>");
 RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");