Re: [RFC PATCH net-next 1/9] net/sched: flower: define new tunnel flags

From: Davide Caratti
Date: Wed Jun 12 2024 - 11:02:32 EST


On Tue, Jun 11, 2024 at 11:53:34PM +0000, Asbjørn Sloth Tønnesen wrote:
> Define new TCA_FLOWER_KEY_FLAGS_* flags for use in struct
> flow_dissector_key_control, covering the same flags
> as currently exposed through TCA_FLOWER_KEY_ENC_FLAGS,
> but assign them new bit positions in so that they don't
> conflict with existing TCA_FLOWER_KEY_FLAGS_* flags.
>
> Synchronize FLOW_DIS_* flags, but put the new flags
> under FLOW_DIS_F_*. The idea is that we can later, move
> the existing flags under FLOW_DIS_F_* as well.
>
> Signed-off-by: Asbjørn Sloth Tønnesen <ast@xxxxxxxxxxx>
> ---
> include/net/flow_dissector.h | 17 +++++++++++++----
> include/uapi/linux/pkt_cls.h | 5 +++++
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h
> index 99626475c3f4a..1f0fddb29a0d8 100644
> --- a/include/net/flow_dissector.h
> +++ b/include/net/flow_dissector.h
> @@ -16,7 +16,8 @@ struct sk_buff;
> * struct flow_dissector_key_control:
> * @thoff: Transport header offset
> * @addr_type: Type of key. One of FLOW_DISSECTOR_KEY_*
> - * @flags: Key flags. Any of FLOW_DIS_(IS_FRAGMENT|FIRST_FRAGENCAPSULATION)
> + * @flags: Key flags.
> + * Any of FLOW_DIS_(IS_FRAGMENT|FIRST_FRAGENCAPSULATION|F_*)

^^ nit: there was a typo in the original line above. Maybe this is a
good chance to put the missing '|' before 'ENCAPSULATION'