net/i40e: queue region set and flush
PATCH 1/2 net/i40e: queue region set and flush
From: root <[email protected]>
This feature enable queue regions configuration for RSS in PF/VF, so that different traffic classes or different packet classification types can be separated to different queues in different queue regions.This patch can set queue region range, it include queue number in a region and the index of first queue. This patch enable mapping between different priorities (UP) and different traffic classes.It also enable mapping between a region index and a sepcific flowtype(PCTYPE).It also provide the solution of flush all configuration about queue region the above described.
Signed-off-by Wei Zhao <[email protected]>
--- drivers/net/i40e/i40e_ethdev.h | 6 + drivers/net/i40e/rte_pmd_i40e.c | 287 ++++++++++++++++++++++++++++++ drivers/net/i40e/rte_pmd_i40e.h | 39 ++++ drivers/net/i40e/rte_pmd_i40e_version.map | 7 + 4 files changed, 339 insertions(+)
drivers/net/i40e/i40e_ethdev.h +6 -0
@@ -260,6 +260,12 @@ enum i40e_flxpld_layer_idx {#define I40E_QOS_BW_WEIGHT_MIN 1/* The max bandwidth weight is 127. */ #define I40E_QOS_BW_WEIGHT_MAX 127 +/* The max queue region index is 7. */ +#define I40E_TCREGION_MAX_INDEX 7 +/* The max queue region userpriority is 7. */ +#define I40E_REGION_USERPRIORITY_MAX_INDEX 7 +/* The max pctype index is 63. */ +#define I40E_REGION_PCTYPE_MAX_INDEX 63/** * The overhead from MTU to max frame size.
drivers/net/i40e/rte_pmd_i40e.c +287 -0
290 lines not on this page · raw message
drivers/net/i40e/rte_pmd_i40e.h +39 -0
@@ -91,6 +91,19 @@ enum rte_pmd_i40e_package_info { RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF }; +/** +* Option types of queue region. +*/ +enum rte_pmd_i40e_queue_region_op { +RTE_PMD_I40E_REGION_UNDEFINED =0 , +RTE_PMD_I40E_QUEUE_REGION_SET ,/**< add queue region set*/ +RTE_PMD_I40E_REGION_FLOWTYPE_PF_SET ,/**< add pf region pctype set */ +RTE_PMD_I40E_REGION_FLOWTYPE_VF_SET ,/**< add vf region pctype set */ +RTE_PMD_I40E_UP_TC_SET ,/**< add queue region pctype set */ +RTE_PMD_I40E_REGION_ALL_FLUSH ,/**< flush all configuration */ +RTE_PMD_I40E_QUEUE_REGION_OP_MAX +}; +#define RTE_PMD_I40E_DDP_NAME_SIZE 32/**
@@ -146,6 +159,19 @@ struct rte_pmd_i40e_ptype_mapping { };/** +* Queue region information get from CLI. +*/ +struct rte_i40e_rss_region_conf { +uint8_t region_id; +uint8_t flowtype; +uint8_t queue_startIndex; +uint8_t queue_num; +uint8_t UserPriority; +uint8_t TrafficClasses; +enum rte_pmd_i40e_queue_region_op op; +}; + +/** * Notify VF when PF link status changes. * * @param port
@@ -637,4 +663,17 @@ int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,uint8_t mask, uint32_t pkt_type); +/** +* Get RSS queue region info from CLI and do configuration for +* that port as the command otion type +* +* @param port +* pointer to port identifier of the device +* @param conf_ptr +* pointer to the struct that contain all the +* region configuration parameters +*/ +int rte_pmd_i40e_queue_region_conf (uint8_t port, +struct rte_i40e_rss_region_conf *conf_ptr); +#endif /* _PMD_I40E_H_ */
drivers/net/i40e/rte_pmd_i40e_version.map +7 -0
@@ -45,3 +45,10 @@ DPDK_17.08 { rte_pmd_i40e_get_ddp_info; } DPDK_17.05; + +DPDK_17.11 { + global: + + rte_pmd_i40e_queue_region_conf; + +} DPDK_17.08;
Signature · 1 line
2.9.3