From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 18 18:37:25 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E97F16A403 for ; Wed, 18 Apr 2007 18:37:25 +0000 (UTC) (envelope-from stas.ibragimov@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id DBAB613C459 for ; Wed, 18 Apr 2007 18:37:24 +0000 (UTC) (envelope-from stas.ibragimov@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so402921ugh for ; Wed, 18 Apr 2007 11:37:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:to:subject:mime-version:content-type:content-disposition:user-agent:from:message-id; b=kAURDWIB5EPfZLT7sgzE65OEbE3+Ip3FAGdnVDADEky/RvZKPdYcpHoQQ11+aQ/TF4m+uEXMlBw/a8nqqrahtBWlKwXMkpRjqdvByhWan4j8ws5rxsiW/i5JtbBhb1YVu7jfPB+zuh5BRBotZdK49gsanWjt7ZiOPkg4BPzN2Kw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:mime-version:content-type:content-disposition:user-agent:from:message-id; b=JfBJD2RSegvh5UrsT3tsODkgxzJrl8PqLUJhv7J/KDqMTUClpnBsP2eSC+JBqIM/51pjJKj4fnxaXwCSClhSsn7iQIpmw3d258f1s6QHbr1OQBoayqqVUMjlTFCQTMXDQtBGSM73GjRMDWJpWnGs2tcQCGP8OkdOKXEKfrareXA= Received: by 10.66.248.13 with SMTP id v13mr1427019ugh.1176919752536; Wed, 18 Apr 2007 11:09:12 -0700 (PDT) Received: from localhost ( [213.141.154.21]) by mx.google.com with ESMTP id s1sm2086814uge.2007.04.18.11.09.10; Wed, 18 Apr 2007 11:09:10 -0700 (PDT) Date: Wed, 18 Apr 2007 22:11:48 +0400 To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) From: stas.ibragimov@gmail.com Message-ID: <46265ec6.4bc81c47.0b0d.ffff97f3@mx.google.com> Subject: Routing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2007 18:37:25 -0000 Hi, hackers :) In /usr/src/sys/netinet/tcp_output.c if function tcp_output() there are code: error = ip_output(m, tp->t_inpcb->inp_options, NULL, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, tp->t_inpcb); In this function there are only one call ip_output function, but struct route is null. I think, that more optimaly is to keep the pointer to struct route in tcpcb.And not to search route every time, when tcp_output called.