mbuf: remove rte_ctrlmbuf
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe_rxtx.c
index f487859..40ea4f8 100644 (file)
@@ -96,7 +96,7 @@ rte_rxmbuf_alloc(struct rte_mempool *mp)
        struct rte_mbuf *m;
 
        m = __rte_mbuf_raw_alloc(mp);
-       __rte_mbuf_sanity_check_raw(m, RTE_MBUF_PKT, 0);
+       __rte_mbuf_sanity_check_raw(m, 0);
        return (m);
 }
 
@@ -995,7 +995,6 @@ ixgbe_rx_alloc_bufs(struct igb_rx_queue *rxq)
                /* populate the static rte mbuf fields */
                mb = rxep[i].mbuf;
                rte_mbuf_refcnt_set(mb, 1);
-               mb->type = RTE_MBUF_PKT;
                mb->pkt.next = NULL;
                mb->pkt.data = (char *)mb->buf_addr + RTE_PKTMBUF_HEADROOM;
                mb->pkt.nb_segs = 1;
@@ -1611,7 +1610,7 @@ ring_dma_zone_reserve(struct rte_eth_dev *dev, const char *ring_name,
        char z_name[RTE_MEMZONE_NAMESIZE];
        const struct rte_memzone *mz;
 
-       rte_snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
+       snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
                        dev->driver->pci_drv.name, ring_name,
                        dev->data->port_id, queue_id);
 
@@ -2168,7 +2167,8 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
                dev->rx_pkt_burst = ixgbe_recv_pkts_bulk_alloc;
 #ifdef RTE_IXGBE_INC_VECTOR
                if (!ixgbe_rx_vec_condition_check(dev)) {
-                       PMD_INIT_LOG(INFO, "Vector rx enabled.\n");
+                       PMD_INIT_LOG(INFO, "Vector rx enabled, please make "
+                                    "sure RX burst size no less than 32.\n");
                        ixgbe_rxq_vec_setup(rxq, socket_id);
                        dev->rx_pkt_burst = ixgbe_recv_pkts_vec;
                }
@@ -2886,7 +2886,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
        uint16_t max[IXGBE_DCB_MAX_TRAFFIC_CLASS] = {0};
        uint8_t map[IXGBE_DCB_MAX_TRAFFIC_CLASS] = {0};
        struct ixgbe_dcb_tc_config *tc;
-       uint32_t max_frame = dev->data->max_frame_size;
+       uint32_t max_frame = dev->data->mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
        struct ixgbe_hw *hw =
                        IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
@@ -3212,7 +3212,6 @@ ixgbe_alloc_rx_queue_mbufs(struct igb_rx_queue *rxq)
                }
 
                rte_mbuf_refcnt_set(mbuf, 1);
-               mbuf->type = RTE_MBUF_PKT;
                mbuf->pkt.next = NULL;
                mbuf->pkt.data = (char *)mbuf->buf_addr + RTE_PKTMBUF_HEADROOM;
                mbuf->pkt.nb_segs = 1;
@@ -3883,7 +3882,20 @@ 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 */
+       /*
+        * When the VF driver issues a IXGBE_VF_RESET request, the PF driver
+        * disables the VF receipt of packets if the PF MTU is > 1500.
+        * This is done to deal with 82599 limitations that imposes
+        * the PF and all VFs to share the same MTU.
+        * Then, the PF driver enables again the VF receipt of packet when
+        * the VF driver issues a IXGBE_VF_SET_LPE request.
+        * In the meantime, the VF device cannot be used, even if the VF driver
+        * and the Guest VM network stack are ready to accept packets with a
+        * size up to the PF MTU.
+        * As a work-around to this PF behaviour, force the call to
+        * ixgbevf_rlpml_set_vf even if jumbo frames are not used. This way,
+        * VF packets received can work in all cases.
+        */
        ixgbevf_rlpml_set_vf(hw,
                (uint16_t)dev->data->dev_conf.rxmode.max_rx_pkt_len);