[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEP_g=-9ezK5MqiHKvKuFNn3SVoGBRy7p6V5JanKFFG86i8EDw@mail.gmail.com>
Date: Tue, 3 Sep 2013 15:06:36 -0700
From: Jesse Gross <jesse@...ira.com>
To: David Miller <davem@...emloft.net>
Cc: Andy Zhou <azhou@...ira.com>,
"dev@...nvswitch.org" <dev@...nvswitch.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] openvswitch: fix sw_flow_key alignment
On Fri, Aug 30, 2013 at 9:16 PM, David Miller <davem@...emloft.net> wrote:
> From: Jesse Gross <jesse@...ira.com>
> Date: Fri, 30 Aug 2013 16:20:25 -0700
>
>> I looked through the struct definition and I think that the idea of
>> manually padding as Geert did in his patch will be difficult to
>> maintain over time (and actually there are a few that he missed) since
>> there are a number of different structs/unions contained in there.
>
> You have to be mindful of the gaps and wasted space for performance
> reasons anyways.
Yes, although the approaches for performance and correctness are not
necessarily the same. For example, we're taking about potentially
packing the struct, in which case we would still have the same
alignment needs even without any gaps. If the correctness is clearly
handled (through an explicit align and build assert) then it's easier
to pack/rearrange/whatever for performance since the whole thing isn't
fragile.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists