On Fri, Aug 08, 2025 at 03:59:51PM +0200, Laurent Vivier wrote: > On 06/08/2025 06:14, David Gibson wrote: > > On Tue, Aug 05, 2025 at 05:46:14PM +0200, Laurent Vivier wrote: > > > dhcpv6_opt() and its callers are refactored for iov_tail option parsing, > > > replacing direct offset management for improved robustness. > > > > > > Its signature is now `bool dhcpv6_opt(iov_tail *data, type)`. `*data` (in/out) > > > points to a found option on `true` return or is restored on `false`. > > > The main dhcpv6() function uses IOV_REMOVE_HEADER for the msg_hdr, then > > > passes the iov_tail (now at options start) to the new dhcpv6_opt(). > > > > > > Signed-off-by: Laurent Vivier > > > > Hmm. I'm not sure this is a great use case for iov_tail - the code is > > repeatedly scanning the same options, so there's a whole bunch of > > rewinding. It works, but it seems awkward. > > > > DHCP is a slow path, anyway, so maybe we'd be better off just > > linearizing the entire packet and using plain old pointers to scan > > through the options. > > > > Well, I'd like to avoid to rewrite this patch as it has a lot of > changes. Yeah, fair enough. > But if you think it's really needed I will do in a new version of > the series. No, I don't think it's important enough. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson