[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAM0EoMm7JDwa_1qavJWwM=2e8TsX=zJQsToFaEHuf0zkWrm74Q@mail.gmail.com>
Date: Wed, 14 Feb 2024 10:30:08 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc: Marcelo Ricardo Leitner <mleitner@...hat.com>, netdev <netdev@...r.kernel.org>,
deb.chatterjee@...el.com, anjali.singhai@...el.com, namrata.limaye@...el.com,
tom@...anda.io, Mahesh.Shirshyad@....com, tomasz.osinski@...el.com,
jiri@...nulli.us, Cong Wang <xiyou.wangcong@...il.com>,
David Miller <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, vladbu@...dia.com, horms@...nel.org,
khalidm@...dia.com, Toke Høiland-Jørgensen <toke@...hat.com>,
mattyk@...dia.com, Daniel Borkmann <daniel@...earbox.net>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH v10 net-next 08/15] p4tc: add template pipeline create,
get, update, delete
On Mon, Feb 12, 2024 at 11:27 AM Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
>
>
>
> On Mon, Feb 12, 2024, 11:30 AM Jamal Hadi Salim <jhs@...atatu.com> wrote:
>>
>> On Fri, Feb 9, 2024 at 3:44 PM Marcelo Ricardo Leitner
>> <mleitner@...hat.com> wrote:
>> >
>> > On Mon, Jan 22, 2024 at 02:47:54PM -0500, Jamal Hadi Salim wrote:
>> > > @@ -39,6 +55,27 @@ struct p4tc_template_ops {
>> > > struct p4tc_template_common {
>> > > char name[P4TC_TMPL_NAMSZ];
>> > > struct p4tc_template_ops *ops;
>> > > + u32 p_id;
>> > > + u32 PAD0;
>> >
>> > Perhaps __pad0 is more common. But, is it really needed?
>> >
>>
>> $ pahole -C p4tc_template_common net/sched/p4tc/p4tc_tmpl_api.o
>> struct p4tc_template_common {
>> char name[32]; /* 0 32 */
>> struct p4tc_template_ops * ops; /* 32 8 */
>> u32 p_id; /* 40 4 */
>> u32 PAD0; /* 44 4 */
>>
>> /* size: 48, cachelines: 1, members: 4 */
>> /* last cacheline: 48 bytes */
>> };
>>
>> Looks good for 64b alignment. We can change the name.
>
>
> I bet that is you just remove PAD0 the compiler will introduce our for you.
>
True dat.
> Doing it explicitly documents explicitly tho.
Documentation justifies it - so we'll leave it there.
cheers,
jamal
> - Arnaldo
>>
>>
>> > > +};
>> >
>> > Only nit.
>> >
>> > Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
>>
>> Thanks for this and all the other reviews. Much appreciated!
>>
>> cheers,
>> jamal
>>
Powered by blists - more mailing lists