Messages in this thread Patch in this message | | | From | Frederick (Rick) A Niles <> | Subject | Re: select()/socket has problems under 2.2.x. | Date | Fri, 05 Mar 99 08:27:16 -0500 |
| |
> >setsockopt getsockopt select() works? > >-------------------------------------------- > > 1008 2016 No > > 1009 2018 Yes > > You may give a try at this my patch I've done now (the first part is a > jiffy wrap fix I catched today and is unrelated). > > I'm curious about the other part. Changing prune_queue()'s behavior > is not such a good idea, if the effect we want to change is in the > caller.
Andrea's patch only seemed to make the problem twice as bad. :) With it requires a minimum setsockopt value of 2016 to have the socket work. (It comes out to a getsockopt length of 4032)
No one else has responded to this bug. I agree it's a "user" error to set the setsockopt() too low, but I still say this is a kernel bug. I'm not a "real" kernel hacker but why can't we just change the minimum value from 256 to 2048? It works perfect for me. Like this:
---------------------------------------------------------------------- --- linux/net/core/sock.c.orig Fri Mar 5 08:02:08 1999 +++ linux/net/core/sock.c Fri Mar 5 08:09:33 1999 @@ -229,7 +229,7 @@ int sock_setsockopt(struct socket *sock, val = sysctl_rmem_max; /* FIXME: is this lower bound the right one? */ - sk->rcvbuf = max(val*2,256); + sk->rcvbuf = max(val*2,2048); break; case SO_KEEPALIVE: ---------------------------------------------------------------------- Rick Niles.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |