[dpdk-dev] [PATCH v6] ethdev: add HIGIG2 key field to flow API
Jerin Jacob
jerinjacobk at gmail.com
Sat Oct 19 11:47:53 CEST 2019
On Sat, Oct 19, 2019 at 10:27 AM <kirankumark at marvell.com> wrote:
>
> From: Kiran Kumar K <kirankumark at marvell.com>
>
> Add new rte_flow_item_higig2_hdr in order to match higig2 header.
> It is a layer 2.5 protocol and used in Broadcom switches.
> Header format is based on the following document.
> http://read.pudn.com/downloads558/doc/comm/2301468/HiGig_protocol.pdf
>
> Signed-off-by: Kiran Kumar K <kirankumark at marvell.com>
> index 000000000..7c0dec449
> --- /dev/null
> +++ b/lib/librte_net/rte_higig.h
> @@ -0,0 +1,138 @@
[snip]
> +/**
> + * RTE_FLOW_ITEM_TYPE_HIGIG2
> + * Matches higig2 header.
> + */
rte_higig.h is a generic file, it should not have any reference to rte_flow
Doxygen comment could be "higig2 frc header"
> +struct rte_higig2_frc {
> +};
Missing doxygen comments here.
> +struct rte_higig2_ppt_type0 {
> +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
> +#endif
> +};
Missing Doxygen comments here.
> +struct rte_higig2_ppt_type1 {
> +#endif
> +};
> +
Missing Doxygen comments here.
> +RTE_STD_C11
> +struct rte_flow_item_higig2_hdr {
Change to rte_higig2_hdr and see below.
> + struct rte_higig2_frc fcr;
> + union {
> + struct rte_higig2_ppt_type0 ppt0;
> + struct rte_higig2_ppt_type1 ppt1;
> + };
> +};
> +/** Default mask for RTE_FLOW_ITEM_TYPE_HIGIG2. */
> +#ifndef __cplusplus
> +static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask = {
> + .ppt1.classification = 0xffff,
> + .ppt1.vid = 0xfff,
> +};
> +#endif
move this to rte_flow.h and add the following rte_flow.h so that
rte_higig.h is standalone it can be used for other purposes other than
rte_flow.
/**
* RTE_FLOW_ITEM_TYPE_HIGIG2.
*
* Matches higig2 header.
*/
struct rte_flow_item_higig2_hdr {
struct rte_higig2_hdr hdr; /**< Higig2 header definition. */
};
See rte_flow_item_tcp and rte_tcp_hdr as reference usage.
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* RTE_HIGIG_H_ */
> --
> 2.17.1
>
More information about the dev
mailing list