On Thu, May 28, 2020 at 01:07:40PM +0200, Martin Pieuchot wrote: > On 27/05/20(Wed) 20:18, Matt Dunwoodie wrote: > > On Wed, 27 May 2020 09:34:53 +0200 > > Martin Pieuchot <m...@openbsd.org> wrote: > > > Regarding the kernel, I'd suggest you use "#if NWG > 0" like it is > > > done for other pseudo-drives with 'needs-flag'. > > > > For the most part there is no significant changes to other parts of the > > network stack, so I don't believe this should be necessary. If there is > > anything in particular that you think should be flagged like that then > > please do say. > > I'm thinking of the `inp_upcall' abstraction and the in6_ifattach() > chunk. Is it possible to do without adding a function pointer to > "struct inpcb" and guard the logic with #if NWG > 0" instead? I'm not > saying that such abstraction is not wanted, but I would prefer we think > it through rather than add it for one particular driver/subsystem. > > Have you seen the "#if NVXLAN" chunk in udp_input()? Maybe this hook > could also be considered for the abstraction you're suggesting.
Why is this code not just using the existing kernel socket API? Why is there a need for yet another upcall interface? I would not like to have more #if XYZ in udp_input() I already feel that other codepaths in there should be reworked because this spaghetti coding in the input path needs to stop. -- :wq Claudio