[dpdk-dev] [PATCH v5 01/11] ethdev: add extensions attributes to IPv6 item
Thomas Monjalon
thomas at monjalon.net
Mon Oct 12 22:41:56 CEST 2020
12/10/2020 12:43, Dekel Peled:
> - * Note: IPv6 options are handled by dedicated pattern items, see
> - * RTE_FLOW_ITEM_TYPE_IPV6_EXT.
> + * Dedicated flags indicate existence of specific extension headers.
> + * Every type of extension header can use a dedicated pattern item, or
> + * the generic item RTE_FLOW_ITEM_TYPE_IPV6_EXT.
I don't understand this last sentence.
> */
> struct rte_flow_item_ipv6 {
> struct rte_ipv6_hdr hdr; /**< IPv6 header definition. */
> + uint32_t hop_ext_exist:1;
> + /**< Hop-by-Hop Options extension header exists. */
> + uint32_t rout_ext_exist:1;
"rout" looks weird. Would be "route" appropriate?
> + /**< Routing extension header exists. */
> + uint32_t frag_ext_exist:1;
> + /**< Fragment extension header exists. */
> + uint32_t auth_ext_exist:1;
> + /**< Authentication extension header exists. */
> + uint32_t esp_ext_exist:1;
> + /**< Encapsulation Security Payload extension header exists. */
> + uint32_t dest_ext_exist:1;
> + /**< Destination Options extension header exists. */
> + uint32_t mobil_ext_exist:1;
> + /**< Mobility extension header exists. */
> + uint32_t hip_ext_exist:1;
> + /**< Host Identity Protocol extension header exists. */
> + uint32_t shim6_ext_exist:1;
> + /**< Shim6 Protocol extension header exists. */
About the field names, the "_exist" suffix is pretty clear,
but without being able to say why, I feel it is a strange name.
I was thinking about renaming the fields with a "has_" prefix.
Does it look better?
More information about the dev
mailing list