Re: [PATCH v10 net-next 08/15] p4tc: add template pipeline create, get, update, delete
From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2024-02-14 15:30:20
Also in:
bpf
On Mon, Feb 12, 2024 at 11:27 AM Arnaldo Carvalho de Melo [off-list ref] wrote:
On Mon, Feb 12, 2024, 11:30 AM Jamal Hadi Salim [off-list ref] wrote:quoted
On Fri, Feb 9, 2024 at 3:44 PM Marcelo Ricardo Leitner [off-list ref] wrote:quoted
On Mon, Jan 22, 2024 at 02:47:54PM -0500, Jamal Hadi Salim wrote:quoted
@@ -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
- Arnaldoquoted
quoted
quoted
+};Only nit. Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>Thanks for this and all the other reviews. Much appreciated! cheers, jamal