[dpdk-dev] [PATCH 07/11] net/sfc: add IPV4 in flow API filters support

Ferruh Yigit ferruh.yigit at intel.com
Tue Mar 7 14:21:25 CET 2017


On 3/2/2017 4:03 PM, Andrew Rybchenko wrote:
> From: Roman Zhukov <Roman.Zhukov at oktetlabs.ru>
> 
> Exact match of IP protocol, source and destination
> addresses is supported by parser.
> EtherType match is enforced to IPv4 EtherType.
> 
> Signed-off-by: Roman Zhukov <Roman.Zhukov at oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
> Reviewed-by: Andrew Lee <alee at solarflare.com>

<...>

>  
> +static int
> +sfc_flow_parse_ipv4(const struct rte_flow_item *item,

Adding a function comment to all parser types can be useful. What do you
think?

It can help to verify implementation against intention. Also gives quick
information about supported parser without digging from function each time.

A list of valid/expected spec, mask and last values for that parser.
Also details like "if the mask is NULL, default mask will be used" can
be documented here.

> +		    efx_filter_spec_t *efx_spec,
> +		    struct rte_flow_error *error)
> +{
<...>


More information about the dev mailing list