From owner-freebsd-net@FreeBSD.ORG Thu May 27 15:16:48 2010 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61212106566C for ; Thu, 27 May 2010 15:16:48 +0000 (UTC) (envelope-from renmaosheng@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0BA8FC1C for ; Thu, 27 May 2010 15:16:47 +0000 (UTC) Received: by vws12 with SMTP id 12so64495vws.13 for ; Thu, 27 May 2010 08:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=rjwtkYcRYYafhlaxkSxEEUj9CCX3O/tu49dMrShcRGI=; b=SMTSAbAhWgy3aHfaxznOw+ffAOiEu9Ox6Pi5e2XJOk3uUkFHkLNN7MqKTQwP+Zwnfy yL5+bNm2aYKypIebG0OV2LPNfyyoWLQ8tRPPf4QRFNprOq0U+V0JdgmChefX+6pK+hXN fRF+/m+2KpDo2pMlx3SWKh9cES1dWE8cG6fwY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mmml/MaiIHscWJiuw/B23L1XKu/7K1n43T/2RtFLfpRrBea4Sw6t7jChBxKY5qUbMx E2AkJoMbq43tsu5RU3zWRgthYQxbqOWQZiK2iTOlzToq076cK0Fh8RXWG6MWuG0ShE0r 4RMiNHVLTlHZGMPpyRJ9Jjukihoe28P4f9xxc= MIME-Version: 1.0 Received: by 10.220.107.161 with SMTP id b33mr7619808vcp.113.1274971699151; Thu, 27 May 2010 07:48:19 -0700 (PDT) Received: by 10.220.85.80 with HTTP; Thu, 27 May 2010 07:48:19 -0700 (PDT) Date: Thu, 27 May 2010 22:48:19 +0800 Message-ID: From: ren maosheng To: freebsd-net@FreeBSD.org X-Mailman-Approved-At: Thu, 27 May 2010 15:44:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: One question about tcp_input function X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2010 15:16:48 -0000 Hi folks, I have a question about below source code when I study the stack: if (acked > so->so_snd.sb_cc) { tp->snd_wnd -= so->so_snd.sb_cc; ====================> sbdrop_locked(&so->so_snd, (int)so->so_snd.sb_cc); ourfinisacked = 1; } else { sbdrop_locked(&so->so_snd, acked); tp->snd_wnd -= acked; =====================> ourfinisacked = 0; } We reduce the snd_wnd by acked number, I investigate the RFC793 and didn't find tcp will need to do this. Could you please shed a light on this? Is there any reason freebsd stack considering doing this? Thanks a lot! Best Regards, Ren Maosheng