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: [EMAIL PROTECTED]
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: <[EMAIL PROTECTED]>
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
[EMAIL PROTECTED] 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
[EMAIL PROTECTED] designates 69.147.83.53 as permitted
sender) [EMAIL PROTECTED]
Received: from hub.freebsd.org (hub.freebsd.org
[IPv6:2001:4f8:fff6::36])
        by mx2.freebsd.org (Postfix) with ESMTP id 0D1B7179A0D
        for <[EMAIL PROTECTED]>; Mon,  1 Sep 2008 05:30:32 +0000
(UTC)
        (envelope-from [EMAIL PROTECTED])
Received: by hub.freebsd.org (Postfix)
        id 760A810657A9; Mon,  1 Sep 2008 05:30:28 +0000 (UTC)
Delivered-To: [EMAIL PROTECTED]
Received: by hub.freebsd.org (Postfix, from userid 538)
        id 2900E106571B; Mon,  1 Sep 2008 05:30:28 +0000 (UTC)
Delivered-To: [EMAIL PROTECTED]
Received: from mx1.freebsd.org (mx1.freebsd.org
[IPv6:2001:4f8:fff6::34])
        by hub.freebsd.org (Postfix) with ESMTP id D6EC1106566B
        for <[EMAIL PROTECTED]>; Mon,  1 Sep 2008 05:30:22
+0000 (UTC)
        (envelope-from [EMAIL PROTECTED])
Received: from svn.freebsd.org (svn.freebsd.org
[IPv6:2001:4f8:fff6::2c])
        by mx1.freebsd.org (Postfix) with ESMTP id C848F8FC1D
        for <[EMAIL PROTECTED]>; Mon,  1 Sep 2008 05:30:22
+0000 (UTC)
        (envelope-from [EMAIL PROTECTED])
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 <[EMAIL PROTECTED]>; Mon, 1 Sep 2008 05:30:22 GMT
        (envelope-from [EMAIL PROTECTED])
Received: (from [EMAIL PROTECTED])
        by svn.freebsd.org (8.14.2/8.14.2/Submit) id m815UMvI008243
        for [EMAIL PROTECTED]; Mon, 1 Sep 2008 05:30:22 GMT
        (envelope-from [EMAIL PROTECTED])
Message-Id: <[EMAIL PROTECTED]>
From: Kip Macy <[EMAIL PROTECTED]>
Date: Mon, 1 Sep 2008 05:30:22 +0000 (UTC)
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
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,
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to