On Fri, Aug 19, 2022 at 04:28:24PM -0900, Philip Guenther wrote:
> On Fri, Aug 19, 2022 at 12:42 PM Vitaliy Makkoveev <m...@openbsd.org> wrote:
> 
> > bluhm@ pointed, that many KASSERT()s are not welcomed, so I didn't
> > insert them into newly introduced handlers. Anyway except the tcp(4)
> > protocol, `so_pcb' cant be NULL here. But the socket lock assertion
> > looks reasonable.
> >
> > Some unp_*() functions could be merged with newly introduced uipc_*(),
> > but I want to do this after (*pru_usrreq)() split finished.
> >
> 
> Having multiple PROTO_bind() routines that just return EOPNOTSUPP seems
> like overkill to me.  I think I would tend to just have the pru_bind()
> inline do a NULL test and return EOPNOTSUPP if it is and leave the callback
> NULL for all those protocols,

I think a generic return(EOPNOTSUPP) in pru_bind() is good.

> but I could also see having a single
> prubind_eopnotsupp()  (or whatever you think is a clear name)
> implementation in some sys/kern/ file which could then be used by all the
> protocols that don't implement it.

I am not a fan of generic stubs.

bluhm

Reply via email to