Date: Mon, 08 Sep 2008 21:19:49 -0400 From: mike@sentex.net To: John Baldwin <jhb@freebsd.org> Cc: sam@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/cxgb/ulp/toecore toedev.c src/sys/netinet tcp_offload.c toedev.h Message-ID: <2ijbc41vrvrapsquc2lilqef5fbj0moh85@4ax.com> In-Reply-To: <200809081410.57357.jhb@freebsd.org> References: <200809010531.m815VOf0085178@repoman.freebsd.org> <48BC102C.3080508@freebsd.org> <200809081410.57357.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Sep 2008 14:10:56 -0400, in sentex.lists.freebsd.cvs you wrote: >On Monday 01 September 2008 11:54:20 am Sam Leffler wrote: >> Kip Macy wrote: >> > kmacy 2008-09-01 05:30:22 UTC >> > >> > FreeBSD src repository >> > >> > Modified files: >> > sys/dev/cxgb/ulp/toecore toedev.c >> > sys/netinet tcp_offload.c toedev.h >> > Log: >> > SVN rev 182591 on 2008-09-01 05:30:22Z by kmacy >> > >> > Don't check if an interface can do tcp offload if there are no = offload >> > devices registered on the system. >> >> This appears to have an unrelated change as well: >> > /* >> > * Look up the route used for the connection to >> > * determine if it uses an interface capable of >> > * offloading the connection. >> > */ >> > - rt =3D rtalloc1(nam, 1 /*report*/, 0 /*ignflags*/); >> > + rt =3D rtalloc1(nam, 0 /*report*/, 0 /*ignflags*/); >> > if (rt) >> > RT_UNLOCK(rt); >> > else >> >> Was that intentional? > >Maybe that is the source of the ARP breakage on 7.x? I have been running with the patches below on RELENG_7 from the 1st and all is working well. Previously, the arp issue would crop up a few seconds after the box would boot up. Hopefully it can be MFC'd for 7.1R ---Mike -------------------------------------------- Delivered-To: mat.macy@gmail.com Received: by 10.141.49.9 with SMTP id b9cs27412rvk; Sun, 31 Aug 2008 22:41:49 -0700 (PDT) Received: by 10.140.133.9 with SMTP id g9mr3170571rvd.235.1220247709006; Sun, 31 Aug 2008 22:41:49 -0700 (PDT) Return-Path: <owner-src-committers@freebsd.org> Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by mx.google.com with ESMTP id f42si10208119rvb.6.2008.08.31.22.41.48; Sun, 31 Aug 2008 22:41:49 -0700 (PDT) Received-SPF: pass (google.com: domain of owner-src-committers@freebsd.org designates 69.147.83.53 as permitted sender) client-ip=3D69.147.83.53; Authentication-Results: mx.google.com; spf=3Dpass (google.com: domain of owner-src-committers@freebsd.org designates 69.147.83.53 as permitted sender) smtp.mail=3Downer-src-committers@freebsd.org Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0D1B7179A0D for <mat.macy@gmail.com>; Mon, 1 Sep 2008 05:30:32 +0000 (UTC) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id 760A810657A9; Mon, 1 Sep 2008 05:30:28 +0000 (UTC) Delivered-To: kmacy@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 2900E106571B; Mon, 1 Sep 2008 05:30:28 +0000 (UTC) Delivered-To: src-committers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6EC1106566B for <src-committers@freebsd.org>; Mon, 1 Sep 2008 05:30:22 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C848F8FC1D for <src-committers@freebsd.org>; Mon, 1 Sep 2008 05:30:22 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.2/8.14.2) with ESMTP id m815UMYD008246 for <src-committers@freebsd.org>; Mon, 1 Sep 2008 05:30:22 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.2/8.14.2/Submit) id m815UMvI008243 for src-committers@freebsd.org; Mon, 1 Sep 2008 05:30:22 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200809010530.m815UMvI008243@svn.freebsd.org> =46rom: Kip Macy <kmacy@FreeBSD.org> Date: Mon, 1 Sep 2008 05:30:22 +0000 (UTC) To: src-committers@freebsd.org Subject: svn commit: r182591 - in head/sys: dev/cxgb/ulp/toecore netinet MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG Author: kmacy Date: Mon Sep 1 05:30:22 2008 New Revision: 182591 URL: http://svn.freebsd.org/changeset/base/182591 Log: Don't check if an interface can do tcp offload if there are no offload devices registered on the system. =20 Suggested by: rwatson MFC after: 3 days Modified: head/sys/dev/cxgb/ulp/toecore/toedev.c head/sys/netinet/tcp_offload.c head/sys/netinet/toedev.h Modified: head/sys/dev/cxgb/ulp/toecore/toedev.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/dev/cxgb/ulp/toecore/toedev.c Mon Sep 1 04:54:29 2008 (r182590) +++ head/sys/dev/cxgb/ulp/toecore/toedev.c Mon Sep 1 05:30:22 2008 (r182591) @@ -119,6 +119,7 @@ int register_tom(struct tom_info *t) { mtx_lock(&offload_db_lock); + toedev_registration_count++; TAILQ_INSERT_HEAD(&offload_module_list, t, entry); mtx_unlock(&offload_db_lock); return 0; Modified: head/sys/netinet/tcp_offload.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/netinet/tcp_offload.c Mon Sep 1 04:54:29 2008 (r182590) +++ head/sys/netinet/tcp_offload.c Mon Sep 1 05:30:22 2008 (r182591) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include <netinet/tcp_offload.h> #include <netinet/toedev.h> =20 +uint32_t toedev_registration_count; + int tcp_offload_connect(struct socket *so, struct sockaddr *nam) { @@ -59,12 +61,15 @@ tcp_offload_connect(struct socket *so, s struct rtentry *rt; int error; =20 + if (toedev_registration_count =3D=3D 0) + return (EINVAL); +=09 /* * Look up the route used for the connection to=20 * determine if it uses an interface capable of * offloading the connection. */ - rt =3D rtalloc1(nam, 1 /*report*/, 0 /*ignflags*/); + rt =3D rtalloc1(nam, 0 /*report*/, 0 /*ignflags*/); if (rt)=20 RT_UNLOCK(rt); else=20 Modified: head/sys/netinet/toedev.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/netinet/toedev.h Mon Sep 1 04:54:29 2008 (r182590) +++ head/sys/netinet/toedev.h Mon Sep 1 05:30:22 2008 (r182591) @@ -34,6 +34,8 @@ #error "no user-serviceable parts inside" #endif =20 +extern uint32_t toedev_registration_count; + /* Parameter values for offload_get_phys_egress(). */ enum { TOE_OPEN,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2ijbc41vrvrapsquc2lilqef5fbj0moh85>