ethdev: move inline device operations
[dpdk.git] / drivers / net / mlx5 / linux / mlx5_os.c
index ae871fe..41db75e 100644 (file)
@@ -602,6 +602,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                }
                eth_dev->device = dpdk_dev;
                eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+               eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+               eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
                err = mlx5_proc_priv_init(eth_dev);
                if (err)
                        return NULL;
@@ -1209,6 +1211,9 @@ err_secondary:
        eth_dev->rx_pkt_burst = removed_rx_burst;
        eth_dev->tx_pkt_burst = removed_tx_burst;
        eth_dev->dev_ops = &mlx5_os_dev_ops;
+       eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+       eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+       eth_dev->rx_queue_count = mlx5_rx_queue_count;
        /* Register MAC address. */
        claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
        if (config->vf && config->vf_nl_en)
@@ -2406,13 +2411,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = {
        .rss_hash_update = mlx5_rss_hash_update,
        .rss_hash_conf_get = mlx5_rss_hash_conf_get,
        .filter_ctrl = mlx5_dev_filter_ctrl,
-       .rx_descriptor_status = mlx5_rx_descriptor_status,
-       .tx_descriptor_status = mlx5_tx_descriptor_status,
        .rxq_info_get = mlx5_rxq_info_get,
        .txq_info_get = mlx5_txq_info_get,
        .rx_burst_mode_get = mlx5_rx_burst_mode_get,
        .tx_burst_mode_get = mlx5_tx_burst_mode_get,
-       .rx_queue_count = mlx5_rx_queue_count,
        .rx_queue_intr_enable = mlx5_rx_intr_enable,
        .rx_queue_intr_disable = mlx5_rx_intr_disable,
        .is_removed = mlx5_is_removed,
@@ -2437,8 +2439,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = {
        .rx_queue_stop = mlx5_rx_queue_stop,
        .tx_queue_start = mlx5_tx_queue_start,
        .tx_queue_stop = mlx5_tx_queue_stop,
-       .rx_descriptor_status = mlx5_rx_descriptor_status,
-       .tx_descriptor_status = mlx5_tx_descriptor_status,
        .rxq_info_get = mlx5_rxq_info_get,
        .txq_info_get = mlx5_txq_info_get,
        .rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2490,8 +2490,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
        .vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
        .vlan_offload_set = mlx5_vlan_offload_set,
        .filter_ctrl = mlx5_dev_filter_ctrl,
-       .rx_descriptor_status = mlx5_rx_descriptor_status,
-       .tx_descriptor_status = mlx5_tx_descriptor_status,
        .rxq_info_get = mlx5_rxq_info_get,
        .txq_info_get = mlx5_txq_info_get,
        .rx_burst_mode_get = mlx5_rx_burst_mode_get,