[Intel-wired-lan] [PATCH net-next v3 3/5] ice: allow matching on meta data
Alexander Lobakin
aleksander.lobakin at intel.com
Wed Apr 5 13:31:01 UTC 2023
From: Michal Swiatkowski <michal.swiatkowski at linux.intel.com>
Date: Wed, 5 Apr 2023 09:51:11 +0200
> Add meta data matching criteria in the same place as protocol matching
> criteria. There is no need to add meta data as special words after
> parsing all lookups. Trade meta data in the same why as other lookups.
>
> The one difference between meta data lookups and protocol lookups is
> that meta data doesn't impact how the packets looks like. Because of that
> ignore it when filling testing packet.
[...]
> --- a/drivers/net/ethernet/intel/ice/ice_switch.h
> +++ b/drivers/net/ethernet/intel/ice/ice_switch.h
> @@ -186,12 +186,14 @@ struct ice_adv_rule_flags_info {
> };
>
> struct ice_adv_rule_info {
> + /* Store metadata values in rule info */
> enum ice_sw_tunnel_type tun_type;
> u16 vlan_type;
> u16 fltr_rule_id;
> u32 priority;
> struct ice_sw_act_ctrl sw_act;
> struct ice_adv_rule_flags_info flags_info;
> + u16 src_vsi;
Minor: since these 2 bytes will introduce 2-byte hole or padding either
way, I think it's okay to put this field somewhere around rule ID or
priority, i.e. other primitives. So that when someone is adding new
short field, he'll see there is a hole and use it. u16 after 2 big
structures looks a bit off to me, sorry for the initial confusion with
this "please no holes at all!11" -- it's highly desired, but not by
sacrificing logical grouping :D
> };
>
> /* A collection of one or more four word recipe */
[...]
Thanks,
Olek
More information about the Intel-wired-lan
mailing list