[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66d1c67b-ecda-69a5-a8be-feddeee4a5d0@gmail.com>
Date: Mon, 27 Mar 2023 09:28:57 +0100
From: Edward Cree <ecree.xilinx@...il.com>
To: Simon Horman <simon.horman@...igine.com>, edward.cree@....com
Cc: linux-net-drivers@....com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, netdev@...r.kernel.org,
habetsm.xilinx@...il.com, michal.swiatkowski@...ux.intel.com
Subject: Re: [PATCH net-next v2 4/6] sfc: add functions to insert encap
matches into the MAE
On 25/03/2023 12:04, Simon Horman wrote:
> On Thu, Mar 23, 2023 at 08:45:12PM +0000, edward.cree@....com wrote:
>> diff --git a/drivers/net/ethernet/sfc/tc.h b/drivers/net/ethernet/sfc/tc.h
>> index c1485679507c..19782c9a4354 100644
>> --- a/drivers/net/ethernet/sfc/tc.h
>> +++ b/drivers/net/ethernet/sfc/tc.h
>> @@ -70,6 +70,7 @@ struct efx_tc_encap_match {
>> __be32 src_ip, dst_ip;
>> struct in6_addr src_ip6, dst_ip6;
>> __be16 udp_dport;
>> + u16 tun_type; /* enum efx_encap_type */
>
> nit: maybe the type of tyn_type can be enum efx_encap_type.
Yeah, it probably should. Looking at my git history I think the
initial reason was for struct-packing reasons (enums are int-sized
at minimum, which is excessive for a field whose largest value is
3), but with the rhash_head that later appears between these two
fields, using the narrower type doesn't actually avoid a 16-bit
hole like it appears to here.
Will change in v3.
Powered by blists - more mailing lists