/** The multi-queue packet distribution mode to be used, e.g. RSS. */
enum rte_eth_rx_mq_mode mq_mode;
uint32_t max_rx_pkt_len; /**< Only used if JUMBO_FRAME enabled. */
+ /** Maximum allowed size of LRO aggregated packet. */
+ uint32_t max_lro_pkt_size;
uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
/**
* Per-port Rx offloads to be set using DEV_RX_OFFLOAD_* flags.
* structure are allowed to be set.
*/
uint64_t offloads;
+
+ uint64_t reserved_64s[2]; /**< Reserved for future fields */
+ void *reserved_ptrs[2]; /**< Reserved for future fields */
};
/**
/**< If set, reject sending out untagged pkts */
hw_vlan_insert_pvid : 1;
/**< If set, enable port based VLAN insertion */
+
+ uint64_t reserved_64s[2]; /**< Reserved for future fields */
+ void *reserved_ptrs[2]; /**< Reserved for future fields */
};
/**
* fields on rte_eth_dev_info structure are allowed to be set.
*/
uint64_t offloads;
+
+ uint64_t reserved_64s[2]; /**< Reserved for future fields */
+ void *reserved_ptrs[2]; /**< Reserved for future fields */
};
/**
* fields on rte_eth_dev_info structure are allowed to be set.
*/
uint64_t offloads;
+
+ uint64_t reserved_64s[2]; /**< Reserved for future fields */
+ void *reserved_ptrs[2]; /**< Reserved for future fields */
};
/**
#define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000
#define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000
#define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000
+#define DEV_RX_OFFLOAD_RSS_HASH 0x00080000
#define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
DEV_RX_OFFLOAD_UDP_CKSUM | \
#define DEV_TX_OFFLOAD_IP_TNL_TSO 0x00080000
/** Device supports outer UDP checksum */
#define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM 0x00100000
-/**
- * Device supports match on metadata Tx offload..
- * Application must set PKT_TX_METADATA and mbuf metadata field.
- */
-#define DEV_TX_OFFLOAD_MATCH_METADATA 0x00200000
#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
/**< Device supports Rx queue setup after device started*/
const uint32_t *dev_flags; /**< Device flags */
uint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */
uint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */
+ /** Maximum configurable size of LRO aggregated packet. */
+ uint32_t max_lro_pkt_size;
uint16_t max_rx_queues; /**< Maximum number of RX queues. */
uint16_t max_tx_queues; /**< Maximum number of TX queues. */
uint32_t max_mac_addrs; /**< Maximum number of MAC addresses. */
* embedded managed interconnect/switch.
*/
struct rte_eth_switch_info switch_info;
+
+ uint64_t reserved_64s[2]; /**< Reserved for future fields */
+ void *reserved_ptrs[2]; /**< Reserved for future fields */
};
/**
uint16_t nb_desc; /**< configured number of TXDs. */
} __rte_cache_min_aligned;
+/* Generic Burst mode flag definition, values can be ORed. */
+
/**
- * Burst mode types, values can be ORed to define the burst mode of a driver.
+ * If the queues have different burst mode description, this bit will be set
+ * by PMD, then the application can iterate to retrieve burst description for
+ * all other queues.
*/
-enum rte_eth_burst_mode_option {
- RTE_ETH_BURST_SCALAR = (1 << 0),
- RTE_ETH_BURST_VECTOR = (1 << 1),
-
- /**< bits[15:2] are reserved for each vector type */
- RTE_ETH_BURST_ALTIVEC = (1 << 2),
- RTE_ETH_BURST_NEON = (1 << 3),
- RTE_ETH_BURST_SSE = (1 << 4),
- RTE_ETH_BURST_AVX2 = (1 << 5),
- RTE_ETH_BURST_AVX512 = (1 << 6),
-
- RTE_ETH_BURST_SCATTERED = (1 << 16), /**< Support scattered packets */
- RTE_ETH_BURST_BULK_ALLOC = (1 << 17), /**< Support mbuf bulk alloc */
- RTE_ETH_BURST_SIMPLE = (1 << 18),
-
- RTE_ETH_BURST_PER_QUEUE = (1 << 19), /**< Support per queue burst */
-};
+#define RTE_ETH_BURST_FLAG_PER_QUEUE (1ULL << 0)
/**
* Ethernet device RX/TX queue packet burst mode information structure.
* Used to retrieve information about packet burst mode setting.
*/
struct rte_eth_burst_mode {
- uint64_t options;
+ uint64_t flags; /**< The ORed values of RTE_ETH_BURST_FLAG_xxx */
+
+#define RTE_ETH_BURST_MODE_INFO_SIZE 1024 /**< Maximum size for information */
+ char info[RTE_ETH_BURST_MODE_INFO_SIZE]; /**< burst mode information */
};
/** Maximum name length for extended statistics counters */
*/
int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
uint32_t *ptypes, int num);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Inform Ethernet device about reduced range of packet types to handle.
+ *
+ * Application can use this function to set only specific ptypes that it's
+ * interested. This information can be used by the PMD to optimize Rx path.
+ *
+ * The function accepts an array `set_ptypes` allocated by the caller to
+ * store the packet types set by the driver, the last element of the array
+ * is set to RTE_PTYPE_UNKNOWN. The size of the `set_ptype` array should be
+ * `rte_eth_dev_get_supported_ptypes() + 1` else it might only be filled
+ * partially.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param ptype_mask
+ * The ptype family that application is interested in should be bitwise OR of
+ * RTE_PTYPE_*_MASK or 0.
+ * @param set_ptypes
+ * An array pointer to store set packet types, allocated by caller. The
+ * function marks the end of array with RTE_PTYPE_UNKNOWN.
+ * @param num
+ * Size of the array pointed by param ptypes.
+ * Should be rte_eth_dev_get_supported_ptypes() + 1 to accommodate the
+ * set ptypes.
+ * @return
+ * - (0) if Success.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if *ptype_mask* is invalid (or) set_ptypes is NULL and
+ * num > 0.
+ */
+__rte_experimental
+int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask,
+ uint32_t *set_ptypes, unsigned int num);
/**
* Retrieve the MTU of an Ethernet device.
int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
struct rte_eth_burst_mode *mode);
-/**
- * Retrieve name about burst mode option.
- *
- * @param option
- * The burst mode option of type *rte_eth_burst_mode_option*.
- *
- * @return
- * - "": Not found
- * - "xxx": name of the mode option.
- */
-__rte_experimental
-const char *
-rte_eth_burst_mode_option_name(uint64_t option);
-
/**
* Retrieve device registers and register attributes (number of registers and
* register size)