net/sfc: support SW stats groups
[dpdk.git] / drivers / net / af_xdp / rte_eth_af_xdp.c
index 74ffa45..b362ccd 100644 (file)
@@ -527,7 +527,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
                        if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) {
                                rte_pktmbuf_free(local_mbuf);
-                               kick_tx(txq, cq);
                                goto out;
                        }
 
@@ -551,10 +550,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
                tx_bytes += mbuf->pkt_len;
        }
 
-       kick_tx(txq, cq);
-
 out:
        xsk_ring_prod__submit(&txq->tx, count);
+       kick_tx(txq, cq);
 
        txq->stats.tx_pkts += count;
        txq->stats.tx_bytes += tx_bytes;
@@ -991,11 +989,6 @@ eth_dev_close(struct rte_eth_dev *dev)
        return 0;
 }
 
-static void
-eth_queue_release(void *q __rte_unused)
-{
-}
-
 static int
 eth_link_update(struct rte_eth_dev *dev __rte_unused,
                int wait_to_complete __rte_unused)
@@ -1476,8 +1469,6 @@ static const struct eth_dev_ops ops = {
        .promiscuous_disable = eth_dev_promiscuous_disable,
        .rx_queue_setup = eth_rx_queue_setup,
        .tx_queue_setup = eth_tx_queue_setup,
-       .rx_queue_release = eth_queue_release,
-       .tx_queue_release = eth_queue_release,
        .link_update = eth_link_update,
        .stats_get = eth_stats_get,
        .stats_reset = eth_stats_reset,
@@ -1792,16 +1783,11 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
                rte_vdev_device_name(dev));
 
        name = rte_vdev_device_name(dev);
-       if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
-               strlen(rte_vdev_device_args(dev)) == 0) {
-               eth_dev = rte_eth_dev_attach_secondary(name);
-               if (eth_dev == NULL) {
-                       AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
-                       return -EINVAL;
-               }
-               eth_dev->dev_ops = &ops;
-               rte_eth_dev_probing_finish(eth_dev);
-               return 0;
+       if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+               AF_XDP_LOG(ERR, "Failed to probe %s. "
+                               "AF_XDP PMD does not support secondary processes.\n",
+                               name);
+               return -ENOTSUP;
        }
 
        kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);