mbuf: rename deprecated VLAN flags
[dpdk.git] / drivers / net / cxgbe / sge.c
index 9cbd4ec..33f7f0b 100644 (file)
@@ -57,7 +57,6 @@
 #include <rte_alarm.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
-#include <rte_atomic.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
 #include <rte_dev.h>
@@ -388,7 +387,7 @@ static unsigned int refill_fl_usembufs(struct adapter *adap, struct sge_fl *q,
        struct rte_pktmbuf_pool_private *mbp_priv;
        u8 jumbo_en = rxq->rspq.eth_dev->data->dev_conf.rxmode.jumbo_frame;
 
-       /* Use jumbo mtu buffers iff mbuf data room size can fit jumbo data. */
+       /* Use jumbo mtu buffers if mbuf data room size can fit jumbo data. */
        mbp_priv = rte_mempool_get_priv(rxq->rspq.mb_pool);
        if (jumbo_en &&
            ((mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM) >= 9000))
@@ -415,7 +414,11 @@ static unsigned int refill_fl_usembufs(struct adapter *adap, struct sge_fl *q,
                }
 
                rte_mbuf_refcnt_set(mbuf, 1);
-               mbuf->data_off = RTE_PKTMBUF_HEADROOM;
+               mbuf->data_off =
+                       (uint16_t)(RTE_PTR_ALIGN((char *)mbuf->buf_addr +
+                                                RTE_PKTMBUF_HEADROOM,
+                                                adap->sge.fl_align) -
+                                  (char *)mbuf->buf_addr);
                mbuf->next = NULL;
                mbuf->nb_segs = 1;
                mbuf->port = rxq->rspq.port_id;
@@ -593,7 +596,7 @@ static inline unsigned int calc_tx_flits(const struct rte_mbuf *m)
         * Write Header (incorporated as part of the cpl_tx_pkt_lso and
         * cpl_tx_pkt structures), followed by either a TX Packet Write CPL
         * message or, if we're doing a Large Send Offload, an LSO CPL message
-        * with an embeded TX Packet Write CPL message.
+        * with an embedded TX Packet Write CPL message.
         */
        flits = sgl_len(m->nb_segs);
        if (m->tso_segsz)
@@ -1402,7 +1405,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
        }
 
        if (pkt->vlan_ex) {
-               mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+               mbuf->ol_flags |= PKT_RX_VLAN;
                mbuf->vlan_tci = ntohs(pkt->vlan);
        }
        rxq->stats.pkts++;
@@ -1547,7 +1550,7 @@ static int process_responses(struct sge_rspq *q, int budget,
                                }
 
                                if (cpl->vlan_ex) {
-                                       pkt->ol_flags |= PKT_RX_VLAN_PKT;
+                                       pkt->ol_flags |= PKT_RX_VLAN;
                                        pkt->vlan_tci = ntohs(cpl->vlan);
                                }
 
@@ -1691,7 +1694,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
        iq->size = cxgbe_roundup(iq->size, 16);
 
        snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
-                eth_dev->data->drv_name,
+                eth_dev->device->driver->name,
                 fwevtq ? "fwq_ring" : "rx_ring",
                 eth_dev->data->port_id, queue_id);
        snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
@@ -1745,7 +1748,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
                fl->size = cxgbe_roundup(fl->size, 8);
 
                snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
-                        eth_dev->data->drv_name,
+                        eth_dev->device->driver->name,
                         fwevtq ? "fwq_ring" : "fl_ring",
                         eth_dev->data->port_id, queue_id);
                snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
@@ -1945,7 +1948,7 @@ int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
        nentries = txq->q.size + s->stat_len / sizeof(struct tx_desc);
 
        snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
-                eth_dev->data->drv_name, "tx_ring",
+                eth_dev->device->driver->name, "tx_ring",
                 eth_dev->data->port_id, queue_id);
        snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);