Thread (63 messages) 63 messages, 11 authors, 2020-08-08

Re: [PATCH 19/26] net/ipv6: switch ipv6_flowlabel_opt to sockptr_t

From: Christoph Hellwig <hch@lst.de>
Date: 2020-07-27 13:00:37
Also in: bpf, bridge, linux-bluetooth, linux-can, linux-crypto, linux-hams, linux-s390, linux-sctp, lkml, lvs-devel, mptcp, netfilter-devel

On Mon, Jul 27, 2020 at 03:15:05PM +0300, Ido Schimmel wrote:
I see a regression with IPv6 flowlabel that I bisected to this patch.
When passing '-F 0' to 'ping' the flow label should be random, yet it's
the same every time after this patch.
Can you send a reproducer?
It seems that the pointer is never advanced after the call to
sockptr_advance() because it is passed by value and not by reference.
Even if you were to pass it by reference I think you would later need to
call sockptr_decrease() or something similar. Otherwise it is very
error-prone.

Maybe adding an offset to copy_to_sockptr() and copy_from_sockptr() is
better?
We could do that, although I wouldn't add it to the existing functions
to avoid the churns and instead add copy_to_sockptr_offset or something
like that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help