net/mlx5: add C++ include guard to public header
[dpdk.git] / drivers / net / cnxk / cnxk_ethdev.c
index 74f6255..53dfb5e 100644 (file)
@@ -1164,7 +1164,10 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
                goto free_nix_lf;
        }
 
-       rc = roc_nix_switch_hdr_set(nix, dev->npc.switch_header_type);
+       rc = roc_nix_switch_hdr_set(nix, dev->npc.switch_header_type,
+                                   dev->npc.pre_l2_size_offset,
+                                   dev->npc.pre_l2_size_offset_mask,
+                                   dev->npc.pre_l2_size_shift_dir);
        if (rc) {
                plt_err("Failed to enable switch type nix_lf rc=%d", rc);
                goto free_nix_lf;
@@ -1405,7 +1408,7 @@ cnxk_nix_dev_stop(struct rte_eth_dev *eth_dev)
        void *rxq;
 
        /* Disable switch hdr pkind */
-       roc_nix_switch_hdr_set(&dev->nix, 0);
+       roc_nix_switch_hdr_set(&dev->nix, 0, 0, 0, 0);
 
        /* Stop link change events */
        if (!roc_nix_is_vf_or_sdp(&dev->nix))
@@ -1595,6 +1598,9 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
        int rc, max_entries;
 
        eth_dev->dev_ops = &cnxk_eth_dev_ops;
+       eth_dev->rx_queue_count = cnxk_nix_rx_queue_count;
+       eth_dev->rx_descriptor_status = cnxk_nix_rx_descriptor_status;
+       eth_dev->tx_descriptor_status = cnxk_nix_tx_descriptor_status;
 
        /* Alloc security context */
        sec_ctx = plt_zmalloc(sizeof(struct rte_security_ctx), 0);
@@ -1605,8 +1611,6 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
        sec_ctx->flags =
                (RTE_SEC_CTX_F_FAST_SET_MDATA | RTE_SEC_CTX_F_FAST_GET_UDATA);
        eth_dev->security_ctx = sec_ctx;
-       TAILQ_INIT(&dev->inb.list);
-       TAILQ_INIT(&dev->outb.list);
 
        /* For secondary processes, the primary has done all the work */
        if (rte_eal_process_type() != RTE_PROC_PRIMARY)
@@ -1642,6 +1646,11 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
        dev->configured = 0;
        dev->ptype_disable = 0;
 
+       TAILQ_INIT(&dev->inb.list);
+       TAILQ_INIT(&dev->outb.list);
+       rte_spinlock_init(&dev->inb.lock);
+       rte_spinlock_init(&dev->outb.lock);
+
        /* For vfs, returned max_entries will be 0. but to keep default mac
         * address, one entry must be allocated. so setting up to 1.
         */