Subject: Re: [PATCH net-next] net/tcp: refactor tcp_inet6_sk()

From: Simon Horman <[email-masked]>
Date: Fri, 19 May 2023 16:08:50 +0200

On Fri, May 19, 2023 at 02:30:36PM +0100, Pavel Begunkov wrote:
> Don't keep hand coded offset caluclations and replace it with
> container_of(). It should be type safer and a bit less confusing.
> 
> It also makes it with a macro instead of inline function to preserve
> constness, which was previously casted out like in case of
> tcp_v6_send_synack().
> 
> Signed-off-by: Pavel Begunkov <[email-masked]>

Thanks,

this looks good to me.

For the record: looking at the x86_64 assembly (objdump -d) before and
after it seems that the offset is consistently 3064 (0xbf8). Which is
consistent with the layout of tcp6_sock reported by pahole.

Reviewed-by: Simon Horman <[email-masked]>

...