From owner-freebsd-net@FreeBSD.ORG Thu May 27 15:25:03 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 DDCF0106566C for ; Thu, 27 May 2010 15:25:03 +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 8F36C8FC16 for ; Thu, 27 May 2010 15:25:03 +0000 (UTC) Received: by vws12 with SMTP id 12so75626vws.13 for ; Thu, 27 May 2010 08:25:02 -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=S2WOaGQdiGXVwP0hQQ/4quyFTqF7PcNfViK6KTqvQBI=; b=eR38pOKIH/M8oA7Z5IO4UY5zxuIb4hVP4iU7O8mXWugHIOClg740Z6+VswFpyHFX6Q fkrc/qCOVq7rPsrmEe+slNARJAB+08SfdfBFK9+L1LNaDQD9gmuuiUYKP1IQLeg7Bj/q vqKhiOqa4dpYaY6CZHkGTkfgNb5EuGr6IojTA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=scTt5anjIA5dPCMskXJNZzVR9ACaxPjiGSGwJkYAq+hZ5Mo/ym+0icY5O/j4no5H0l Jf3kSKrmFM3TKfiJJH57Y9kfNcc4b5Uh2weKMwL56o5Ct2Z34Dn0PyTXXmjw02FUMHzT Jkyf++eDtQjNr8UuS0s8zb5D+PTLDAiCFUM54= MIME-Version: 1.0 Received: by 10.220.107.8 with SMTP id z8mr7570080vco.214.1274973902447; Thu, 27 May 2010 08:25:02 -0700 (PDT) Received: by 10.220.85.80 with HTTP; Thu, 27 May 2010 08:25:02 -0700 (PDT) Date: Thu, 27 May 2010 23:25:02 +0800 Message-ID: From: ren maosheng To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: One question for 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:25:03 -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