net: add rte prefix to ether structures
[dpdk.git] / drivers / net / octeontx / octeontx_ethdev.c
index 7465079..6434792 100644 (file)
@@ -555,7 +555,7 @@ octeontx_dev_stats_reset(struct rte_eth_dev *dev)
 
 static int
 octeontx_dev_default_mac_addr_set(struct rte_eth_dev *dev,
-                                       struct ether_addr *addr)
+                                       struct rte_ether_addr *addr)
 {
        struct octeontx_nic *nic = octeontx_pmd_priv(dev);
        int ret;
@@ -844,10 +844,11 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
                pktbuf_conf.mmask.f_cache_mode = 1;
 
                pktbuf_conf.wqe_skip = OCTTX_PACKET_WQE_SKIP;
-               pktbuf_conf.first_skip = OCTTX_PACKET_FIRST_SKIP;
+               pktbuf_conf.first_skip = OCTTX_PACKET_FIRST_SKIP(mb_pool);
                pktbuf_conf.later_skip = OCTTX_PACKET_LATER_SKIP;
                pktbuf_conf.mbuff_size = (mb_pool->elt_size -
                                        RTE_PKTMBUF_HEADROOM -
+                                       rte_pktmbuf_priv_size(mb_pool) -
                                        sizeof(struct rte_mbuf));
 
                pktbuf_conf.cache_mode = PKI_OPC_MODE_STF2_STT;
@@ -1129,7 +1130,7 @@ octeontx_remove(struct rte_vdev_device *dev)
                        return -ENODEV;
 
                if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
-                       rte_eth_dev_release_port_secondary(eth_dev);
+                       rte_eth_dev_release_port(eth_dev);
                        continue;
                }
 
@@ -1237,15 +1238,8 @@ octeontx_probe(struct rte_vdev_device *dev)
                res = -EINVAL;
                goto parse_error;
        }
-       if (pnum > qnum) {
-               /*
-                * We don't poll on event ports
-                * that do not have any queues assigned.
-                */
-               pnum = qnum;
-               PMD_INIT_LOG(INFO,
-                       "reducing number of active event ports to %d", pnum);
-       }
+
+       /* Enable all queues available */
        for (i = 0; i < qnum; i++) {
                res = rte_event_queue_setup(evdev, i, NULL);
                if (res < 0) {
@@ -1255,6 +1249,7 @@ octeontx_probe(struct rte_vdev_device *dev)
                }
        }
 
+       /* Enable all ports available */
        for (i = 0; i < pnum; i++) {
                res = rte_event_port_setup(evdev, i, NULL);
                if (res < 0) {
@@ -1263,6 +1258,14 @@ octeontx_probe(struct rte_vdev_device *dev)
                                                i, res);
                        goto parse_error;
                }
+       }
+
+       /*
+        * Do 1:1 links for ports & queues. All queues would be mapped to
+        * one port. If there are more ports than queues, then some ports
+        * won't be linked to any queue.
+        */
+       for (i = 0; i < qnum; i++) {
                /* Link one queue to one event port */
                qlist = i;
                res = rte_event_port_link(evdev, i, &qlist, NULL, 1);