cvs commit: src/sys/dev/cxgb/ulp/toecore toedev.c
src/sys/netinet tcp_offload.c toedev.h
mike at sentex.net
mike at sentex.net
Tue Sep 9 01:33:16 UTC 2008
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 = rtalloc1(nam, 1 /*report*/, 0 /*ignflags*/);
>> > + rt = 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 at 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 at 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 at freebsd.org designates 69.147.83.53 as permitted
sender) client-ip=69.147.83.53;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of
owner-src-committers at freebsd.org designates 69.147.83.53 as permitted
sender) smtp.mail=owner-src-committers at 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 at gmail.com>; Mon, 1 Sep 2008 05:30:32 +0000
(UTC)
(envelope-from owner-src-committers at FreeBSD.org)
Received: by hub.freebsd.org (Postfix)
id 760A810657A9; Mon, 1 Sep 2008 05:30:28 +0000 (UTC)
Delivered-To: kmacy at 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 at 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 at freebsd.org>; Mon, 1 Sep 2008 05:30:22
+0000 (UTC)
(envelope-from kmacy at 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 at freebsd.org>; Mon, 1 Sep 2008 05:30:22
+0000 (UTC)
(envelope-from kmacy at 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 at freebsd.org>; Mon, 1 Sep 2008 05:30:22 GMT
(envelope-from kmacy at svn.freebsd.org)
Received: (from kmacy at localhost)
by svn.freebsd.org (8.14.2/8.14.2/Submit) id m815UMvI008243
for src-committers at freebsd.org; Mon, 1 Sep 2008 05:30:22 GMT
(envelope-from kmacy at svn.freebsd.org)
Message-Id: <200809010530.m815UMvI008243 at svn.freebsd.org>
From: Kip Macy <kmacy at FreeBSD.org>
Date: Mon, 1 Sep 2008 05:30:22 +0000 (UTC)
To: src-committers at freebsd.org
Subject: svn commit: r182591 - in head/sys: dev/cxgb/ulp/toecore
netinet
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Sender: owner-src-committers at 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.
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
==============================================================================
--- 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
==============================================================================
--- 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>
+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;
+ if (toedev_registration_count == 0)
+ return (EINVAL);
+
/*
* Look up the route used for the connection to
* determine if it uses an interface capable of
* offloading the connection.
*/
- rt = rtalloc1(nam, 1 /*report*/, 0 /*ignflags*/);
+ rt = rtalloc1(nam, 0 /*report*/, 0 /*ignflags*/);
if (rt)
RT_UNLOCK(rt);
else
Modified: head/sys/netinet/toedev.h
==============================================================================
--- 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
+extern uint32_t toedev_registration_count;
+
/* Parameter values for offload_get_phys_egress(). */
enum {
TOE_OPEN,
More information about the cvs-all
mailing list