lkml.org 
[lkml]   [2025]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v4 0/8] bpf: cpumap: enable GRO for XDP_PASS frames
From
From: Alexander Lobakin <aleksander.lobakin@intel.com>
Date: Wed, 12 Feb 2025 15:22:55 +0100

> From: Jakub Kicinski <kuba@kernel.org>
> Date: Mon, 10 Feb 2025 16:35:29 -0800
>
>> On Mon, 10 Feb 2025 16:31:52 +0100 Alexander Lobakin wrote:
>>> This was rejected by Kuba in v2.
>>> He didn't like to have napi_id two times within napi_struct (one inside
>>> gro_node, one outside).
>>
>> Do you mean:
>>
>> the napi_id in gro sticks out..
>>
>> https://lore.kernel.org/netdev/20250113130104.5c2c02e0@kernel.org/ ?
>>
>> That's more of a nudge to try harder than a "no". We explored
>> the alternatives, there's no perfect way to layer this. I think
>> Eric's suggestion is probably as clean as we can get.
>
> You mean to cache napi_id in gro_node?
>
> Then we get +8 bytes to sizeof(napi_struct) for little reason... Dunno,
> if you really prefer, I can do it that way.

Alternative to avoid +8 bytes:

struct napi_struct {
...

union {
struct gro_node gro;
struct {
u8 pad[offsetof(struct gro_node, napi_id)];
u32 napi_id;
};
};

This is effectively the same what struct_group() does, just more ugly.
But allows to declare gro_node separately.

>
> OTOH you gave Acked-by on struct_group(), then Eric appeared and you
> took your ack back :D
Thanks,
Olek

\
 
 \ /
  Last update: 2025-02-12 17:03    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog