Re: sosetopt(): merge SO_SND* with corresponding SO_RCV* cases

2023-08-08 Thread Alexander Bluhm
On Wed, Aug 09, 2023 at 12:41:18AM +0300, Vitaliy Makkoveev wrote: > I think it's better to merge SO_BINDANY cases from both switch blocks. > This time SO_LINGER case is separated, so there is no reason for > dedicated switch block. OK bluhm@ > Index: sys/kern/uipc_socket.c >

Re: sosetopt(): merge SO_SND* with corresponding SO_RCV* cases

2023-08-08 Thread Vitaliy Makkoveev
On Tue, Aug 08, 2023 at 10:40:46PM +0200, Alexander Bluhm wrote: > On Fri, Aug 04, 2023 at 12:38:23AM +0300, Vitaliy Makkoveev wrote: > > @@ -1856,6 +1856,9 @@ sosetopt(struct socket *so, int level, i > > case SO_SNDLOWAT: > > case SO_RCVLOWAT: > > { > > +

Re: sosetopt(): merge SO_SND* with corresponding SO_RCV* cases

2023-08-08 Thread Alexander Bluhm
On Fri, Aug 04, 2023 at 12:38:23AM +0300, Vitaliy Makkoveev wrote: > @@ -1856,6 +1856,9 @@ sosetopt(struct socket *so, int level, i > case SO_SNDLOWAT: > case SO_RCVLOWAT: > { > + struct sockbuf *sb = (optname == SO_SNDBUF || > +

sosetopt(): merge SO_SND* with corresponding SO_RCV* cases

2023-08-03 Thread Vitaliy Makkoveev
The only difference is the socket buffer. As bonus, in the future solock() will be easily replaced by sblock() instead pushing it down to each SO_SND* and SO_RCV* case. Index: sys/kern/uipc_socket.c === RCS file: