xref: /dpdk/lib/port/rte_swx_port_ethdev.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
299a2dd95SBruce Richardson  * Copyright(c) 2020 Intel Corporation
399a2dd95SBruce Richardson  */
499a2dd95SBruce Richardson #ifndef __INCLUDE_RTE_SWX_PORT_ETHDEV_H__
599a2dd95SBruce Richardson #define __INCLUDE_RTE_SWX_PORT_ETHDEV_H__
699a2dd95SBruce Richardson 
799a2dd95SBruce Richardson /**
899a2dd95SBruce Richardson  * @file
999a2dd95SBruce Richardson  * RTE SWX Ethernet Device Input and Output Ports
1099a2dd95SBruce Richardson  */
1199a2dd95SBruce Richardson 
1299a2dd95SBruce Richardson #include <stdint.h>
1399a2dd95SBruce Richardson 
1499a2dd95SBruce Richardson #include "rte_swx_port.h"
1599a2dd95SBruce Richardson 
16*719834a6SMattias Rönnblom #ifdef __cplusplus
17*719834a6SMattias Rönnblom extern "C" {
18*719834a6SMattias Rönnblom #endif
19*719834a6SMattias Rönnblom 
2099a2dd95SBruce Richardson /** Ethernet device input port (reader) creation parameters. */
2199a2dd95SBruce Richardson struct rte_swx_port_ethdev_reader_params {
2299a2dd95SBruce Richardson 	/** Name of a valid and fully configured Ethernet device. */
2399a2dd95SBruce Richardson 	const char *dev_name;
2499a2dd95SBruce Richardson 
2599a2dd95SBruce Richardson 	/** Ethernet device receive queue ID. */
2699a2dd95SBruce Richardson 	uint16_t queue_id;
2799a2dd95SBruce Richardson 
2899a2dd95SBruce Richardson 	/** Ethernet device receive burst size. */
2999a2dd95SBruce Richardson 	uint32_t burst_size;
3099a2dd95SBruce Richardson };
3199a2dd95SBruce Richardson 
3299a2dd95SBruce Richardson /** Ethernet device reader operations. */
3399a2dd95SBruce Richardson extern struct rte_swx_port_in_ops rte_swx_port_ethdev_reader_ops;
3499a2dd95SBruce Richardson 
3599a2dd95SBruce Richardson /** Ethernet device output port (writer) creation parameters. */
3699a2dd95SBruce Richardson struct rte_swx_port_ethdev_writer_params {
3799a2dd95SBruce Richardson 	/** Name of a valid and fully configured Ethernet device. */
3899a2dd95SBruce Richardson 	const char *dev_name;
3999a2dd95SBruce Richardson 
4099a2dd95SBruce Richardson 	/** Ethernet device transmit queue ID. */
4199a2dd95SBruce Richardson 	uint16_t queue_id;
4299a2dd95SBruce Richardson 
4399a2dd95SBruce Richardson 	/** Ethernet device transmit burst size. */
4499a2dd95SBruce Richardson 	uint32_t burst_size;
4599a2dd95SBruce Richardson };
4699a2dd95SBruce Richardson 
4799a2dd95SBruce Richardson /** Ethernet device writer operations. */
4899a2dd95SBruce Richardson extern struct rte_swx_port_out_ops rte_swx_port_ethdev_writer_ops;
4999a2dd95SBruce Richardson 
5099a2dd95SBruce Richardson #ifdef __cplusplus
5199a2dd95SBruce Richardson }
5299a2dd95SBruce Richardson #endif
5399a2dd95SBruce Richardson 
5499a2dd95SBruce Richardson #endif
55