[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8559d4df-71a8-8d4f-b2f6-91f69281f2d9@intel.com>
Date: Wed, 5 Apr 2023 15:31:01 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<wojciech.drewek@...el.com>, <piotr.raczynski@...el.com>,
<pmenzel@...gen.mpg.de>
Subject: Re: [PATCH net-next v3 3/5] ice: allow matching on meta data
From: Michal Swiatkowski <michal.swiatkowski@...ux.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
Powered by blists - more mailing lists