From: Simon Horman <simon.horman@corigine.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: netdev@vger.kernel.org, edumazet@google.com, davem@davemloft.net,
dsahern@kernel.org, pabeni@redhat.com, kuba@kernel.org
Subject: Re: [PATCH net-next] net/tcp: refactor tcp_inet6_sk()
Date: Fri, 19 May 2023 16:08:50 +0200 [thread overview]
Message-ID: <ZGeC8vimPwUwJ9wk@corigine.com> (raw)
In-Reply-To: <16be6307909b25852744a67b2caf570efbb83c7f.1684502478.git.asml.silence@gmail.com>
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 <asml.silence@gmail.com>
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 <simon.horman@corigine.com>
...
next prev parent reply other threads:[~2023-05-19 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 13:30 [PATCH net-next] net/tcp: refactor tcp_inet6_sk() Pavel Begunkov
2023-05-19 14:08 ` Simon Horman [this message]
2023-05-22 10:30 ` patchwork-bot+netdevbpf
2023-08-04 14:50 ` Jason A. Donenfeld
2023-08-04 14:57 ` Eric Dumazet
2023-08-04 15:00 ` Jason A. Donenfeld
2023-08-04 15:04 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZGeC8vimPwUwJ9wk@corigine.com \
--to=simon.horman@corigine.com \
--cc=asml.silence@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.