lkml.org 
[lkml]   [1999]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: select()/socket has problems under 2.2.x.
Date

> >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/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.108 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site