150da8b0dSAllain Legacy /* SPDX-License-Identifier: (BSD-3-Clause OR LGPL-2.1) 250da8b0dSAllain Legacy * Copyright(c) 2010-2013 Intel Corporation. 350da8b0dSAllain Legacy * Copyright(c) 2014-2017 Wind River Systems, Inc. 48e680655SAllain Legacy */ 58e680655SAllain Legacy 68e680655SAllain Legacy #ifndef _RTE_AVP_COMMON_H_ 78e680655SAllain Legacy #define _RTE_AVP_COMMON_H_ 88e680655SAllain Legacy 98e680655SAllain Legacy #ifdef __KERNEL__ 108e680655SAllain Legacy #include <linux/if.h> 1180fcb5caSAdrien Mazarguil #else 1280fcb5caSAdrien Mazarguil #include <stdint.h> 1380fcb5caSAdrien Mazarguil #include <rte_common.h> 140d440d08SAdrien Mazarguil #include <rte_config.h> 1580fcb5caSAdrien Mazarguil #include <rte_memory.h> 1680fcb5caSAdrien Mazarguil #include <rte_ether.h> 1780fcb5caSAdrien Mazarguil #include <rte_atomic.h> 1880fcb5caSAdrien Mazarguil #endif 1980fcb5caSAdrien Mazarguil 2080fcb5caSAdrien Mazarguil #ifdef __cplusplus 2180fcb5caSAdrien Mazarguil extern "C" { 228e680655SAllain Legacy #endif 238e680655SAllain Legacy 248e680655SAllain Legacy /** 258e680655SAllain Legacy * AVP name is part of network device name. 268e680655SAllain Legacy */ 278e680655SAllain Legacy #define RTE_AVP_NAMESIZE 32 288e680655SAllain Legacy 298e680655SAllain Legacy /** 308e680655SAllain Legacy * AVP alias is a user-defined value used for lookups from secondary 318e680655SAllain Legacy * processes. Typically, this is a UUID. 328e680655SAllain Legacy */ 338e680655SAllain Legacy #define RTE_AVP_ALIASSIZE 128 348e680655SAllain Legacy 358e680655SAllain Legacy /* 368e680655SAllain Legacy * Request id. 378e680655SAllain Legacy */ 388e680655SAllain Legacy enum rte_avp_req_id { 398e680655SAllain Legacy RTE_AVP_REQ_UNKNOWN = 0, 408e680655SAllain Legacy RTE_AVP_REQ_CHANGE_MTU, 418e680655SAllain Legacy RTE_AVP_REQ_CFG_NETWORK_IF, 428e680655SAllain Legacy RTE_AVP_REQ_CFG_DEVICE, 438e680655SAllain Legacy RTE_AVP_REQ_SHUTDOWN_DEVICE, 448e680655SAllain Legacy RTE_AVP_REQ_MAX, 458e680655SAllain Legacy }; 468e680655SAllain Legacy 478e680655SAllain Legacy /**@{ AVP device driver types */ 488e680655SAllain Legacy #define RTE_AVP_DRIVER_TYPE_UNKNOWN 0 498e680655SAllain Legacy #define RTE_AVP_DRIVER_TYPE_DPDK 1 508e680655SAllain Legacy #define RTE_AVP_DRIVER_TYPE_KERNEL 2 518e680655SAllain Legacy #define RTE_AVP_DRIVER_TYPE_QEMU 3 528e680655SAllain Legacy /**@} */ 538e680655SAllain Legacy 548e680655SAllain Legacy /**@{ AVP device operational modes */ 558e680655SAllain Legacy #define RTE_AVP_MODE_HOST 0 /**< AVP interface created in host */ 568e680655SAllain Legacy #define RTE_AVP_MODE_GUEST 1 /**< AVP interface created for export to guest */ 578e680655SAllain Legacy #define RTE_AVP_MODE_TRACE 2 /**< AVP interface created for packet tracing */ 588e680655SAllain Legacy /**@} */ 598e680655SAllain Legacy 608e680655SAllain Legacy /* 618e680655SAllain Legacy * Structure for AVP queue configuration query request/result 628e680655SAllain Legacy */ 63*e7750639SAndre Muezerie struct __rte_packed_begin rte_avp_device_config { 648e680655SAllain Legacy uint64_t device_id; /**< Unique system identifier */ 658e680655SAllain Legacy uint32_t driver_type; /**< Device Driver type */ 668e680655SAllain Legacy uint32_t driver_version; /**< Device Driver version */ 678e680655SAllain Legacy uint32_t features; /**< Negotiated features */ 688e680655SAllain Legacy uint16_t num_tx_queues; /**< Number of active transmit queues */ 698e680655SAllain Legacy uint16_t num_rx_queues; /**< Number of active receive queues */ 708e680655SAllain Legacy uint8_t if_up; /**< 1: interface up, 0: interface down */ 71*e7750639SAndre Muezerie } __rte_packed_end; 728e680655SAllain Legacy 738e680655SAllain Legacy /* 748e680655SAllain Legacy * Structure for AVP request. 758e680655SAllain Legacy */ 76*e7750639SAndre Muezerie struct __rte_packed_begin rte_avp_request { 778e680655SAllain Legacy uint32_t req_id; /**< Request id */ 788e680655SAllain Legacy union { 798e680655SAllain Legacy uint32_t new_mtu; /**< New MTU */ 808e680655SAllain Legacy uint8_t if_up; /**< 1: interface up, 0: interface down */ 818e680655SAllain Legacy struct rte_avp_device_config config; /**< Queue configuration */ 828e680655SAllain Legacy }; 838e680655SAllain Legacy int32_t result; /**< Result for processing request */ 84*e7750639SAndre Muezerie } __rte_packed_end; 858e680655SAllain Legacy 868e680655SAllain Legacy /* 878e680655SAllain Legacy * FIFO struct mapped in a shared memory. It describes a circular buffer FIFO 888e680655SAllain Legacy * Write and read should wrap around. FIFO is empty when write == read 898e680655SAllain Legacy * Writing should never overwrite the read position 908e680655SAllain Legacy */ 918e680655SAllain Legacy struct rte_avp_fifo { 928e680655SAllain Legacy volatile unsigned int write; /**< Next position to be written*/ 938e680655SAllain Legacy volatile unsigned int read; /**< Next position to be read */ 948e680655SAllain Legacy unsigned int len; /**< Circular buffer length */ 958e680655SAllain Legacy unsigned int elem_size; /**< Pointer size - for 32/64 bit OS */ 9680fcb5caSAdrien Mazarguil void *volatile buffer[]; /**< The buffer contains mbuf pointers */ 978e680655SAllain Legacy }; 988e680655SAllain Legacy 998e680655SAllain Legacy 1008e680655SAllain Legacy /* 1018e680655SAllain Legacy * AVP packet buffer header used to define the exchange of packet data. 1028e680655SAllain Legacy */ 103*e7750639SAndre Muezerie struct __rte_cache_aligned __rte_packed_begin rte_avp_desc { 1048e680655SAllain Legacy uint64_t pad0; 1058e680655SAllain Legacy void *pkt_mbuf; /**< Reference to packet mbuf */ 1068e680655SAllain Legacy uint8_t pad1[14]; 1078e680655SAllain Legacy uint16_t ol_flags; /**< Offload features. */ 1088e680655SAllain Legacy void *next; /**< Reference to next buffer in chain */ 1098e680655SAllain Legacy void *data; /**< Start address of data in segment buffer. */ 1108e680655SAllain Legacy uint16_t data_len; /**< Amount of data in segment buffer. */ 1118e680655SAllain Legacy uint8_t nb_segs; /**< Number of segments */ 1128e680655SAllain Legacy uint8_t pad2; 1138e680655SAllain Legacy uint16_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ 1148e680655SAllain Legacy uint32_t pad3; 1158e680655SAllain Legacy uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order). */ 1168e680655SAllain Legacy uint32_t pad4; 117*e7750639SAndre Muezerie } __rte_packed_end; 1188e680655SAllain Legacy 1198e680655SAllain Legacy 1208e680655SAllain Legacy /**{ AVP device features */ 1218e680655SAllain Legacy #define RTE_AVP_FEATURE_VLAN_OFFLOAD (1 << 0) /**< Emulated HW VLAN offload */ 1228e680655SAllain Legacy /**@} */ 1238e680655SAllain Legacy 1248e680655SAllain Legacy 1258e680655SAllain Legacy /**@{ Offload feature flags */ 1268e680655SAllain Legacy #define RTE_AVP_TX_VLAN_PKT 0x0001 /**< TX packet is a 802.1q VLAN packet. */ 1278e680655SAllain Legacy #define RTE_AVP_RX_VLAN_PKT 0x0800 /**< RX packet is a 802.1q VLAN packet. */ 1288e680655SAllain Legacy /**@} */ 1298e680655SAllain Legacy 1308e680655SAllain Legacy 1318e680655SAllain Legacy /**@{ AVP PCI identifiers */ 1328e680655SAllain Legacy #define RTE_AVP_PCI_VENDOR_ID 0x1af4 1338e680655SAllain Legacy #define RTE_AVP_PCI_DEVICE_ID 0x1110 1348e680655SAllain Legacy /**@} */ 1358e680655SAllain Legacy 1368e680655SAllain Legacy /**@{ AVP PCI subsystem identifiers */ 1378e680655SAllain Legacy #define RTE_AVP_PCI_SUB_VENDOR_ID RTE_AVP_PCI_VENDOR_ID 1388e680655SAllain Legacy #define RTE_AVP_PCI_SUB_DEVICE_ID 0x1104 1398e680655SAllain Legacy /**@} */ 1408e680655SAllain Legacy 1418e680655SAllain Legacy /**@{ AVP PCI BAR definitions */ 1428e680655SAllain Legacy #define RTE_AVP_PCI_MMIO_BAR 0 1438e680655SAllain Legacy #define RTE_AVP_PCI_MSIX_BAR 1 1448e680655SAllain Legacy #define RTE_AVP_PCI_MEMORY_BAR 2 1458e680655SAllain Legacy #define RTE_AVP_PCI_MEMMAP_BAR 4 1468e680655SAllain Legacy #define RTE_AVP_PCI_DEVICE_BAR 5 1478e680655SAllain Legacy #define RTE_AVP_PCI_MAX_BAR 6 1488e680655SAllain Legacy /**@} */ 1498e680655SAllain Legacy 1508e680655SAllain Legacy /**@{ AVP PCI BAR name definitions */ 1518e680655SAllain Legacy #define RTE_AVP_MMIO_BAR_NAME "avp-mmio" 1528e680655SAllain Legacy #define RTE_AVP_MSIX_BAR_NAME "avp-msix" 1538e680655SAllain Legacy #define RTE_AVP_MEMORY_BAR_NAME "avp-memory" 1548e680655SAllain Legacy #define RTE_AVP_MEMMAP_BAR_NAME "avp-memmap" 1558e680655SAllain Legacy #define RTE_AVP_DEVICE_BAR_NAME "avp-device" 1568e680655SAllain Legacy /**@} */ 1578e680655SAllain Legacy 1588e680655SAllain Legacy /**@{ AVP PCI MSI-X vectors */ 1598e680655SAllain Legacy #define RTE_AVP_MIGRATION_MSIX_VECTOR 0 /**< Migration interrupts */ 1608e680655SAllain Legacy #define RTE_AVP_MAX_MSIX_VECTORS 1 1618e680655SAllain Legacy /**@} */ 1628e680655SAllain Legacy 1638e680655SAllain Legacy /**@} AVP Migration status/ack register values */ 1648e680655SAllain Legacy #define RTE_AVP_MIGRATION_NONE 0 /**< Migration never executed */ 1658e680655SAllain Legacy #define RTE_AVP_MIGRATION_DETACHED 1 /**< Device attached during migration */ 1668e680655SAllain Legacy #define RTE_AVP_MIGRATION_ATTACHED 2 /**< Device reattached during migration */ 1678e680655SAllain Legacy #define RTE_AVP_MIGRATION_ERROR 3 /**< Device failed to attach/detach */ 1688e680655SAllain Legacy /**@} */ 1698e680655SAllain Legacy 1708e680655SAllain Legacy /**@} AVP MMIO Register Offsets */ 1718e680655SAllain Legacy #define RTE_AVP_REGISTER_BASE 0 1728e680655SAllain Legacy #define RTE_AVP_INTERRUPT_MASK_OFFSET (RTE_AVP_REGISTER_BASE + 0) 1738e680655SAllain Legacy #define RTE_AVP_INTERRUPT_STATUS_OFFSET (RTE_AVP_REGISTER_BASE + 4) 1748e680655SAllain Legacy #define RTE_AVP_MIGRATION_STATUS_OFFSET (RTE_AVP_REGISTER_BASE + 8) 1758e680655SAllain Legacy #define RTE_AVP_MIGRATION_ACK_OFFSET (RTE_AVP_REGISTER_BASE + 12) 1768e680655SAllain Legacy /**@} */ 1778e680655SAllain Legacy 1788e680655SAllain Legacy /**@} AVP Interrupt Status Mask */ 1798e680655SAllain Legacy #define RTE_AVP_MIGRATION_INTERRUPT_MASK (1 << 1) 1808e680655SAllain Legacy #define RTE_AVP_APP_INTERRUPTS_MASK 0xFFFFFFFF 1818e680655SAllain Legacy #define RTE_AVP_NO_INTERRUPTS_MASK 0 1828e680655SAllain Legacy /**@} */ 1838e680655SAllain Legacy 1848e680655SAllain Legacy /* 1858e680655SAllain Legacy * Maximum number of memory regions to export 1868e680655SAllain Legacy */ 1878e680655SAllain Legacy #define RTE_AVP_MAX_MAPS 2048 1888e680655SAllain Legacy 1898e680655SAllain Legacy /* 1908e680655SAllain Legacy * Description of a single memory region 1918e680655SAllain Legacy */ 1928e680655SAllain Legacy struct rte_avp_memmap { 1938e680655SAllain Legacy void *addr; 194df6e0a06SSantosh Shukla rte_iova_t phys_addr; 1958e680655SAllain Legacy uint64_t length; 1968e680655SAllain Legacy }; 1978e680655SAllain Legacy 1988e680655SAllain Legacy /* 1998e680655SAllain Legacy * AVP memory mapping validation marker 2008e680655SAllain Legacy */ 2018e680655SAllain Legacy #define RTE_AVP_MEMMAP_MAGIC 0x20131969 2028e680655SAllain Legacy 2038e680655SAllain Legacy /**@{ AVP memory map versions */ 2048e680655SAllain Legacy #define RTE_AVP_MEMMAP_VERSION_1 1 2058e680655SAllain Legacy #define RTE_AVP_MEMMAP_VERSION RTE_AVP_MEMMAP_VERSION_1 2068e680655SAllain Legacy /**@} */ 2078e680655SAllain Legacy 2088e680655SAllain Legacy /* 2098e680655SAllain Legacy * Defines a list of memory regions exported from the host to the guest 2108e680655SAllain Legacy */ 2118e680655SAllain Legacy struct rte_avp_memmap_info { 2128e680655SAllain Legacy uint32_t magic; /**< Memory validation marker */ 2138e680655SAllain Legacy uint32_t version; /**< Data format version */ 2148e680655SAllain Legacy uint32_t nb_maps; 2158e680655SAllain Legacy struct rte_avp_memmap maps[RTE_AVP_MAX_MAPS]; 2168e680655SAllain Legacy }; 2178e680655SAllain Legacy 2188e680655SAllain Legacy /* 2198e680655SAllain Legacy * AVP device memory validation marker 2208e680655SAllain Legacy */ 2218e680655SAllain Legacy #define RTE_AVP_DEVICE_MAGIC 0x20131975 2228e680655SAllain Legacy 2238e680655SAllain Legacy /**@{ AVP device map versions 2248e680655SAllain Legacy * WARNING: do not change the format or names of these variables. They are 2258e680655SAllain Legacy * automatically parsed from the build system to generate the SDK package 2268e680655SAllain Legacy * name. 2278e680655SAllain Legacy **/ 2288e680655SAllain Legacy #define RTE_AVP_RELEASE_VERSION_1 1 2298e680655SAllain Legacy #define RTE_AVP_RELEASE_VERSION RTE_AVP_RELEASE_VERSION_1 2308e680655SAllain Legacy #define RTE_AVP_MAJOR_VERSION_0 0 2318e680655SAllain Legacy #define RTE_AVP_MAJOR_VERSION_1 1 2328e680655SAllain Legacy #define RTE_AVP_MAJOR_VERSION_2 2 2338e680655SAllain Legacy #define RTE_AVP_MAJOR_VERSION RTE_AVP_MAJOR_VERSION_2 2348e680655SAllain Legacy #define RTE_AVP_MINOR_VERSION_0 0 2358e680655SAllain Legacy #define RTE_AVP_MINOR_VERSION_1 1 2368e680655SAllain Legacy #define RTE_AVP_MINOR_VERSION_13 13 2378e680655SAllain Legacy #define RTE_AVP_MINOR_VERSION RTE_AVP_MINOR_VERSION_13 2388e680655SAllain Legacy /**@} */ 2398e680655SAllain Legacy 2408e680655SAllain Legacy 2418e680655SAllain Legacy /** 2428e680655SAllain Legacy * Generates a 32-bit version number from the specified version number 2438e680655SAllain Legacy * components 2448e680655SAllain Legacy */ 2458e680655SAllain Legacy #define RTE_AVP_MAKE_VERSION(_release, _major, _minor) \ 2468e680655SAllain Legacy ((((_release) & 0xffff) << 16) | (((_major) & 0xff) << 8) | ((_minor) & 0xff)) 2478e680655SAllain Legacy 2488e680655SAllain Legacy 2498e680655SAllain Legacy /** 2508e680655SAllain Legacy * Represents the current version of the AVP host driver 2518e680655SAllain Legacy * WARNING: in the current development branch the host and guest driver 2528e680655SAllain Legacy * version should always be the same. When patching guest features back to 2538e680655SAllain Legacy * GA releases the host version number should not be updated unless there was 2548e680655SAllain Legacy * an actual change made to the host driver. 2558e680655SAllain Legacy */ 2568e680655SAllain Legacy #define RTE_AVP_CURRENT_HOST_VERSION \ 2578e680655SAllain Legacy RTE_AVP_MAKE_VERSION(RTE_AVP_RELEASE_VERSION_1, \ 2588e680655SAllain Legacy RTE_AVP_MAJOR_VERSION_0, \ 2598e680655SAllain Legacy RTE_AVP_MINOR_VERSION_1) 2608e680655SAllain Legacy 2618e680655SAllain Legacy 2628e680655SAllain Legacy /** 2638e680655SAllain Legacy * Represents the current version of the AVP guest drivers 2648e680655SAllain Legacy */ 2658e680655SAllain Legacy #define RTE_AVP_CURRENT_GUEST_VERSION \ 2668e680655SAllain Legacy RTE_AVP_MAKE_VERSION(RTE_AVP_RELEASE_VERSION_1, \ 2678e680655SAllain Legacy RTE_AVP_MAJOR_VERSION_2, \ 2688e680655SAllain Legacy RTE_AVP_MINOR_VERSION_13) 2698e680655SAllain Legacy 2708e680655SAllain Legacy /** 2718e680655SAllain Legacy * Access AVP device version values 2728e680655SAllain Legacy */ 2738e680655SAllain Legacy #define RTE_AVP_GET_RELEASE_VERSION(_version) (((_version) >> 16) & 0xffff) 2748e680655SAllain Legacy #define RTE_AVP_GET_MAJOR_VERSION(_version) (((_version) >> 8) & 0xff) 2758e680655SAllain Legacy #define RTE_AVP_GET_MINOR_VERSION(_version) ((_version) & 0xff) 2768e680655SAllain Legacy /**@}*/ 2778e680655SAllain Legacy 2788e680655SAllain Legacy 2798e680655SAllain Legacy /** 2808e680655SAllain Legacy * Remove the minor version number so that only the release and major versions 2818e680655SAllain Legacy * are used for comparisons. 2828e680655SAllain Legacy */ 2838e680655SAllain Legacy #define RTE_AVP_STRIP_MINOR_VERSION(_version) ((_version) >> 8) 2848e680655SAllain Legacy 2858e680655SAllain Legacy 2868e680655SAllain Legacy /** 2878e680655SAllain Legacy * Defines the number of mbuf pools supported per device (1 per socket) 2888e680655SAllain Legacy */ 2898e680655SAllain Legacy #define RTE_AVP_MAX_MEMPOOLS 8 2908e680655SAllain Legacy 2918e680655SAllain Legacy /* 2928e680655SAllain Legacy * Defines address translation parameters for each support mbuf pool 2938e680655SAllain Legacy */ 2948e680655SAllain Legacy struct rte_avp_mempool_info { 2958e680655SAllain Legacy void *addr; 296df6e0a06SSantosh Shukla rte_iova_t phys_addr; 2978e680655SAllain Legacy uint64_t length; 2988e680655SAllain Legacy }; 2998e680655SAllain Legacy 3008e680655SAllain Legacy /* 3018e680655SAllain Legacy * Struct used to create a AVP device. Passed to the kernel in IOCTL call or 3028e680655SAllain Legacy * via inter-VM shared memory when used in a guest. 3038e680655SAllain Legacy */ 3048e680655SAllain Legacy struct rte_avp_device_info { 3058e680655SAllain Legacy uint32_t magic; /**< Memory validation marker */ 3068e680655SAllain Legacy uint32_t version; /**< Data format version */ 3078e680655SAllain Legacy 3088e680655SAllain Legacy char ifname[RTE_AVP_NAMESIZE]; /**< Network device name for AVP */ 3098e680655SAllain Legacy 310df6e0a06SSantosh Shukla rte_iova_t tx_phys; 311df6e0a06SSantosh Shukla rte_iova_t rx_phys; 312df6e0a06SSantosh Shukla rte_iova_t alloc_phys; 313df6e0a06SSantosh Shukla rte_iova_t free_phys; 3148e680655SAllain Legacy 3158e680655SAllain Legacy uint32_t features; /**< Supported feature bitmap */ 3168e680655SAllain Legacy uint8_t min_rx_queues; /**< Minimum supported receive/free queues */ 3178e680655SAllain Legacy uint8_t num_rx_queues; /**< Recommended number of receive/free queues */ 3188e680655SAllain Legacy uint8_t max_rx_queues; /**< Maximum supported receive/free queues */ 3198e680655SAllain Legacy uint8_t min_tx_queues; /**< Minimum supported transmit/alloc queues */ 3208e680655SAllain Legacy uint8_t num_tx_queues; 3218e680655SAllain Legacy /**< Recommended number of transmit/alloc queues */ 3228e680655SAllain Legacy uint8_t max_tx_queues; /**< Maximum supported transmit/alloc queues */ 3238e680655SAllain Legacy 3248e680655SAllain Legacy uint32_t tx_size; /**< Size of each transmit queue */ 3258e680655SAllain Legacy uint32_t rx_size; /**< Size of each receive queue */ 3268e680655SAllain Legacy uint32_t alloc_size; /**< Size of each alloc queue */ 3278e680655SAllain Legacy uint32_t free_size; /**< Size of each free queue */ 3288e680655SAllain Legacy 3298e680655SAllain Legacy /* Used by Ethtool */ 330df6e0a06SSantosh Shukla rte_iova_t req_phys; 331df6e0a06SSantosh Shukla rte_iova_t resp_phys; 332df6e0a06SSantosh Shukla rte_iova_t sync_phys; 3338e680655SAllain Legacy void *sync_va; 3348e680655SAllain Legacy 3358e680655SAllain Legacy /* mbuf mempool (used when a single memory area is supported) */ 3368e680655SAllain Legacy void *mbuf_va; 337df6e0a06SSantosh Shukla rte_iova_t mbuf_phys; 3388e680655SAllain Legacy 3398e680655SAllain Legacy /* mbuf mempools */ 3408e680655SAllain Legacy struct rte_avp_mempool_info pool[RTE_AVP_MAX_MEMPOOLS]; 3418e680655SAllain Legacy 3428e680655SAllain Legacy #ifdef __KERNEL__ 3438e680655SAllain Legacy /* Ethernet info */ 3448e680655SAllain Legacy char ethaddr[ETH_ALEN]; 3458e680655SAllain Legacy #else 34635b2d13fSOlivier Matz char ethaddr[RTE_ETHER_ADDR_LEN]; 3478e680655SAllain Legacy #endif 3488e680655SAllain Legacy 3498e680655SAllain Legacy uint8_t mode; /**< device mode, i.e guest, host, trace */ 3508e680655SAllain Legacy 3518e680655SAllain Legacy /* mbuf size */ 3528e680655SAllain Legacy unsigned int mbuf_size; 3538e680655SAllain Legacy 3548e680655SAllain Legacy /* 3558e680655SAllain Legacy * unique id to differentiate between two instantiations of the same 3568e680655SAllain Legacy * AVP device (i.e., the guest needs to know if the device has been 3578e680655SAllain Legacy * deleted and recreated). 3588e680655SAllain Legacy */ 3598e680655SAllain Legacy uint64_t device_id; 3608e680655SAllain Legacy 3618e680655SAllain Legacy uint32_t max_rx_pkt_len; /**< Maximum receive unit size */ 3628e680655SAllain Legacy }; 3638e680655SAllain Legacy 3648e680655SAllain Legacy #define RTE_AVP_MAX_QUEUES 8 /**< Maximum number of queues per device */ 3658e680655SAllain Legacy 3668e680655SAllain Legacy /** Maximum number of chained mbufs in a packet */ 3678e680655SAllain Legacy #define RTE_AVP_MAX_MBUF_SEGMENTS 5 3688e680655SAllain Legacy 3698e680655SAllain Legacy #define RTE_AVP_DEVICE "avp" 3708e680655SAllain Legacy 3718e680655SAllain Legacy #define RTE_AVP_IOCTL_TEST _IOWR(0, 1, int) 3728e680655SAllain Legacy #define RTE_AVP_IOCTL_CREATE _IOWR(0, 2, struct rte_avp_device_info) 3738e680655SAllain Legacy #define RTE_AVP_IOCTL_RELEASE _IOWR(0, 3, struct rte_avp_device_info) 3748e680655SAllain Legacy #define RTE_AVP_IOCTL_QUERY _IOWR(0, 4, struct rte_avp_device_config) 3758e680655SAllain Legacy 37680fcb5caSAdrien Mazarguil #ifdef __cplusplus 37780fcb5caSAdrien Mazarguil } 37880fcb5caSAdrien Mazarguil #endif 37980fcb5caSAdrien Mazarguil 3808e680655SAllain Legacy #endif /* _RTE_AVP_COMMON_H_ */ 381