common/cnxk: use computed value for WQE skip
[dpdk.git] / drivers / net / txgbe / txgbe_ethdev_vf.c
index 67ae69d..f52cd8b 100644 (file)
@@ -961,7 +961,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
                wr32(hw, TXGBE_VFIVARMISC, tmp);
        } else {
                /* rx or tx cause */
-               /* Workround for ICR lost */
+               /* Workaround for ICR lost */
                idx = ((16 * (queue & 1)) + (8 * direction));
                tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1));
                tmp &= ~(0xFF << idx);
@@ -997,7 +997,7 @@ txgbevf_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 TXGBE_VF_MAXMSIVECOTR = 1
+                * as TXGBE_VF_MAXMSIVECTOR = 1
                 */
                txgbevf_set_ivar_map(hw, 0, q_idx, vector_idx);
                rte_intr_vec_list_index_set(intr_handle, q_idx,
@@ -1111,7 +1111,7 @@ txgbevf_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 * TXGBE_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;
@@ -1288,9 +1288,12 @@ txgbevf_dev_interrupt_get_status(struct rte_eth_dev *dev)
 
        /* only one misc vector supported - mailbox */
        eicr &= TXGBE_VFICR_MASK;
-       /* Workround for ICR lost */
+       /* Workaround for ICR lost */
        intr->flags |= TXGBE_FLAG_MAILBOX;
 
+       /* To avoid compiler warnings set eicr to used. */
+       RTE_SET_USED(eicr);
+
        return 0;
 }