From owner-freebsd-current@FreeBSD.ORG Sun Sep 1 23:38:31 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 11364EAC; Sun, 1 Sep 2013 23:38:31 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [IPv6:2607:f8b0:400c:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B23472DB1; Sun, 1 Sep 2013 23:38:30 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id m1so2623953ves.41 for ; Sun, 01 Sep 2013 16:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=jA2KQOjHwNRsi61zsxbn3eUj63JQel8e4ej8nnAFyXs=; b=Y9jIKDDiN6yzzeh6OYwWFYyByrDv4tVRu/snALkfNxEcgsRYfnMxYBDVA/dkLVRubo uWTySUcpLdj64cQgH12j2pCjBPxnyRdR/8RVfL7tFFeqqObysKxuvOORDEDjsrtasulI qH4a5IAs+RPhbJmPowdS6bYsNCwivP48aLA3luHQo38oKCX7x/V86Rk7V2BgFybpNC4Y L+xere4e7fxdSGrcPmz0sYM/E+helUJF/fEXR62Uimtom9pjlsXwPggHII+HaGybztte E1uT/eoQqv28roBJRiEFqxbOWNLpPwhWfy5euOWIVc+fBaRLoCFbLcA1281r8iIoVZWO 8NQg== MIME-Version: 1.0 X-Received: by 10.52.103.35 with SMTP id ft3mr16486997vdb.5.1378078709266; Sun, 01 Sep 2013 16:38:29 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Sun, 1 Sep 2013 16:38:29 -0700 (PDT) In-Reply-To: <201308291203.23055.jhb@freebsd.org> References: <201308261505.06342.jhb@freebsd.org> <201308291203.23055.jhb@freebsd.org> Date: Mon, 2 Sep 2013 01:38:29 +0200 X-Google-Sender-Auth: nVpxkOKyLdLxj89dNT074UxqFqo Message-ID: Subject: Re: Question about socket timeouts From: Davide Italiano To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: Vitja Makarov , freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 23:38:31 -0000 On Thu, Aug 29, 2013 at 6:03 PM, John Baldwin wrote: > On Monday, August 26, 2013 3:05:06 pm John Baldwin wrote: >> On Monday, August 26, 2013 2:23:44 pm Davide Italiano wrote: >> > Please consider the following patch: >> > http://people.freebsd.org/~davide/review/socket_timeout.diff >> > I've tested it and it works OK. I got a timeout which is ~= 25ms using >> > the testcase provided by the user. >> > The only doubt I have is about the range check, I've changed a bit >> > because the 'integer' part of sbintime_t fits in 32-bits, but I'm not >> > sure it's the best way of doing this. >> >> Nice! Bruce actually wants me to adjust the range check a bit (which will >> fit in well with your changes I think). Please let me get that fix in >> (so it can be part of the future MFC) and then you can commit this. Thanks! >> >> Actually, I think you still need to patch the sogetopt() case to work correctly >> (it is still doing a manual conversion from 'val' to a timeval assuming it is >> in 'hz' units). > > I'm done with my range check changes, please move forward with your change > (though make sure you fix the sogetsockopt() case please). > > -- > John Baldwin For the archives, this should be fixed in r255138. Thanks to both, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare