ixgbevf: fix jumbo frame
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe_rxtx.c
index 41507cb..303144b 100644 (file)
@@ -1679,9 +1679,9 @@ ixgbe_reset_tx_queue(struct igb_tx_queue *txq)
                volatile union ixgbe_adv_tx_desc *txd = &txq->tx_ring[i];
                txd->wb.status = IXGBE_TXD_STAT_DD;
                txe[i].mbuf = NULL;
-               txe[i].last_id = (uint16_t)i;
-               txe[prev].next_id = (uint16_t)i;
-               prev = (uint16_t)i;
+               txe[i].last_id = i;
+               txe[prev].next_id = i;
+               prev = i;
        }
 
        txq->tx_next_dd = (uint16_t)(txq->tx_rs_thresh - 1);
@@ -2139,7 +2139,7 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
                     rxq->sw_ring, rxq->rx_ring, rxq->rx_ring_phys_addr);
 
        /*
-        * Certain constaints must be met in order to use the bulk buffer
+        * Certain constraints must be met in order to use the bulk buffer
         * allocation Rx burst function.
         */
        use_def_burst_func = check_rx_burst_bulk_alloc_preconditions(rxq);
@@ -3594,6 +3594,10 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
        PMD_INIT_FUNC_TRACE();
        hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+       /* setup MTU */
+       ixgbevf_rlpml_set_vf(hw,
+               (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len);
+
        /* Setup RX queues */
        dev->rx_pkt_burst = ixgbe_recv_pkts;
        for (i = 0; i < dev->data->nb_rx_queues; i++) {