19/09/2022 18:37, Dariusz Sosnowski: > This patch introduces new hairpin queue configuration options through > rte_eth_hairpin_conf struct, allowing to tune Rx and Tx hairpin queues > memory configuration. Hairpin configuration is extended with the > following fields:
What is the benefit? How the user knows what to use? Isn't it too much low level for a user? Why it is not automatic in the driver? [...] > + /** > + * Use locked device memory as a backing storage. > + * > + * - When set, PMD will attempt to use on-device memory as a backing > storage for descriptors > + * and/or data in hairpin queue. > + * - When set, PMD will use detault memory type as a backing storage. > Please refer to PMD You probably mean "clear". Please make lines shorter. You should split lines logically, after a dot or at the end of a part. > + * documentation for details. > + * > + * API user should check if PMD supports this configuration flag using > + * @see rte_eth_dev_hairpin_capability_get. > + */ > + uint32_t use_locked_device_memory:1; > + > + /** > + * Use DPDK memory as backing storage. > + * > + * - When set, PMD will attempt to use memory managed by DPDK as a > backing storage > + * for descriptors and/or data in hairpin queue. > + * - When clear, PMD will use default memory type as a backing storage. > Please refer > + * to PMD documentation for details. > + * > + * API user should check if PMD supports this configuration flag using > + * @see rte_eth_dev_hairpin_capability_get. > + */ > + uint32_t use_rte_memory:1; > + > + /** > + * Force usage of hairpin memory configuration. > + * > + * - When set, PMD will attempt to use specified memory settings and > + * if resource allocation fails, then hairpin queue setup will result > in an > + * error. > + * - When clear, PMD will attempt to use specified memory settings and > + * if resource allocation fails, then PMD will retry allocation with > default > + * configuration. > + */ > + uint32_t force_memory:1; > + > + uint32_t reserved:11; /**< Reserved bits. */ You can insert a blank line here. > struct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS]; > };