Subject: Re: [net-next PATCH v3 01/12] net: flow_table: create interface for hw match/action tables

From: Simon Horman <[email-masked]>
Date: Thu, 22 Jan 2015 13:37:58 +0900

On Tue, Jan 20, 2015 at 12:26:37PM -0800, John Fastabend wrote:

[snip]

> diff --git a/include/linux/if_flow.h b/include/linux/if_flow.h
> new file mode 100644
> index 0000000..7ce1e1d
> --- /dev/null
> +++ b/include/linux/if_flow.h
> @@ -0,0 +1,188 @@

[snip]

> +#define NFL_JUMP_TABLE_DONE 0
> +enum {
> +	NFL_JUMP_ENTRY_UNSPEC,
> +	NFL_JUMP_ENTRY,
> +	__NFL_JUMP_ENTRY_MAX,
> +};

For consistency it seems that the following could go here:

#define NFL_JUMP_ENTRY_MAX (__NFL_JUMP_ENTRY_MAX - 1)

> +enum {
> +	NFL_HEADER_NODE_HDRS_UNSPEC,
> +	NFL_HEADER_NODE_HDRS_VALUE,
> +	__NFL_HEADER_NODE_HDRS_MAX,
> +};
> +
> +#define NFL_HEADER_NODE_HDRS_MAX (__NFL_HEADER_NODE_HDRS_MAX - 1)
> +
> +enum {
> +	NFL_HEADER_NODE_UNSPEC,
> +	NFL_HEADER_NODE_NAME,
> +	NFL_HEADER_NODE_UID,
> +	NFL_HEADER_NODE_HDRS,
> +	NFL_HEADER_NODE_JUMP,
> +	__NFL_HEADER_NODE_MAX,
> +};
> +
> +#define NFL_HEADER_NODE_MAX (__NFL_HEADER_NODE_MAX - 1)
> +
> +enum {
> +	NFL_HEADER_GRAPH_UNSPEC,
> +	NFL_HEADER_GRAPH_NODE,
> +	__NFL_HEADER_GRAPH_MAX,
> +};
> +
> +#define NFL_HEADER_GRAPH_MAX (__NFL_HEADER_GRAPH_MAX - 1)

[snip]