[PATCH v2 01/10] ethdev: introduce flow pre-configuration hints

Ivan Malov ivan.malov at oktetlabs.ru
Wed Jan 19 14:07:05 CET 2022


Hi,

> +Rules management configuration
> +------------------------------
> +
> +Configure flow rules management.

It is either "management OF ruleS" or "rule management".
Perhaps fix similar occurrences across the series.

> +	/**
> +	 * Number of counter actions pre-configured.
> +	 * If set to 0, PMD will allocate counters dynamically.
> +	 * @see RTE_FLOW_ACTION_TYPE_COUNT
> +	 */
> +	uint32_t nb_counters;
> +	/**
> +	 * Number of aging actions pre-configured.
> +	 * If set to 0, PMD will allocate aging dynamically.
> +	 * @see RTE_FLOW_ACTION_TYPE_AGE
> +	 */
> +	uint32_t nb_aging;
> +	/**
> +	 * Number of traffic metering actions pre-configured.
> +	 * If set to 0, PMD will allocate meters dynamically.
> +	 * @see RTE_FLOW_ACTION_TYPE_METER
> +	 */
> +	uint32_t nb_meters;

If duplication of the same description is undesirable,
consider adding a common description for these fields:

/**
  * Resource preallocation settings. Use zero to
  * request that allocations be done on demand.
  */

Instead of "nb_aging", perhaps consider something like "nb_age_timers".

> + * Configure flow rules module.
> + * To pre-allocate resources as per the flow port attributes
> + * this configuration function must be called before any flow rule is created.
> + * Must be called only after Ethernet device is configured, but may be called
> + * before or after the device is started as long as there are no flow rules.
> + * No other rte_flow function should be called while this function is invoked.
> + * This function can be called again to change the configuration.
> + * Some PMDs may not support re-configuration at all,
> + * or may only allow increasing the number of resources allocated.

Consider:

* Pre-configure the port's flow API engine.
*
* This API can only be invoked before the application
* starts using the rest of the flow library functions.
*
* The API can be invoked multiple times to change the
* settings. The port, however, may reject the changes.

--
Ivan M.


More information about the dev mailing list