xref: /dpdk/drivers/net/mlx5/windows/mlx5_mp_os.c (revision df96fd0d73955bdc7ca3909e772ff2ad903249c6)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2020 Mellanox Technologies, Ltd
3  */
4 
5 #include <stdio.h>
6 #include <time.h>
7 
8 #include <rte_eal.h>
9 #include <ethdev_driver.h>
10 #include <rte_string_fns.h>
11 
12 #include <mlx5_common_mp.h>
13 #include <mlx5_common_mr.h>
14 #include <mlx5_malloc.h>
15 
16 #include "mlx5.h"
17 #include "mlx5_rxtx.h"
18 #include "mlx5_utils.h"
19 
20 /**
21  * Broadcast request of starting data-path to secondary processes. The request
22  * is synchronous.
23  *
24  * @param[in] dev
25  *   Pointer to Ethernet structure.
26  */
27 void
mlx5_mp_os_req_start_rxtx(struct rte_eth_dev * dev)28 mlx5_mp_os_req_start_rxtx(struct rte_eth_dev *dev)
29 {
30 	RTE_SET_USED(dev);
31 }
32 
33 /**
34  * Broadcast request of stopping data-path to secondary processes. The request
35  * is synchronous.
36  *
37  * @param[in] dev
38  *   Pointer to Ethernet structure.
39  */
40 void
mlx5_mp_os_req_stop_rxtx(struct rte_eth_dev * dev)41 mlx5_mp_os_req_stop_rxtx(struct rte_eth_dev *dev)
42 {
43 	RTE_SET_USED(dev);
44 }
45 
46 /**
47  * Request Verbs Rx/Tx queue stop or start to the primary process.
48  *
49  * @param[in] dev
50  *   Pointer to Ethernet structure.
51  * @param queue_id
52  *   Queue ID to control.
53  * @param req_type
54  *   request type
55  *     MLX5_MP_REQ_QUEUE_RX_START - start Rx queue
56  *     MLX5_MP_REQ_QUEUE_TX_START - stop Tx queue
57  *     MLX5_MP_REQ_QUEUE_RX_STOP - stop Rx queue
58  *     MLX5_MP_REQ_QUEUE_TX_STOP - stop Tx queue
59  * @return
60  *   0 on success, a negative errno value otherwise and
61  *     rte_errno is set.
62  */
63 int
mlx5_mp_os_req_queue_control(struct rte_eth_dev * dev,uint16_t queue_id,enum mlx5_mp_req_type req_type)64 mlx5_mp_os_req_queue_control(struct rte_eth_dev *dev, uint16_t queue_id,
65 			  enum mlx5_mp_req_type req_type)
66 {
67 	RTE_SET_USED(dev);
68 	RTE_SET_USED(queue_id);
69 	RTE_SET_USED(req_type);
70 	return -ENOTSUP;
71 }
72