[PATCH v2] ethdev: add template table resize API
Etelson, Gregory
getelson at nvidia.com
Wed Feb 7 08:09:08 CET 2024
Hello Thomas,
>> --- a/lib/ethdev/rte_flow.h
>> +++ b/lib/ethdev/rte_flow.h
>> #define RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG RTE_BIT32(1)
>> +/**
>> + * Specialize table for resize.
>> + */
>> +#define RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE RTE_BIT32(2)
>
> I'm not sure about the repeating "TABLE" at the end of this flag name.
>
> [...]
>> +/**
>> + * @warning
>> + * @b EXPERIMENTAL: this API may change without prior notice.
>> + *
>> + * Query if a table can be resized
>
> s/if/whether/
> A dot is missing.
>
>> + *
>> + * @param port_id
>> + * Port identifier of Ethernet device.
>> + * @param tbl_attr
>> + * Template table
>
> Every lines should end with a dot in Doxygen for consistency.
>
>> + *
>> + * @return
>> + * True if the table can be resized.
>> + */
>> +static __rte_always_inline bool
>
> Why is it inline?
> In general we avoid inline except for few performance sensitive ones.
>
>> +rte_flow_table_resizable(__rte_unused uint16_t port_id,
>> + const struct rte_flow_template_table_attr *tbl_attr)
>> +{
>> + return (tbl_attr->specialize &
>> + RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE) != 0;
>> +}
>
> [...]
>> + # added in 24.03
>> + rte_flow_template_table_resize;
>> + rte_flow_async_update_resized;
>> + rte_flow_template_table_resize_complete;
>
> I like the idea of these 3 new functions.
> The scenario should be described in doc/guides/prog_guide/rte_flow.rst
>
>
>
I'll post an update.
More information about the dev
mailing list