From nobody@FreeBSD.org  Fri Sep  3 14:36:57 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 557691065801
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Sep 2010 14:36:57 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 445F18FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Sep 2010 14:36:57 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o83EavrQ014437
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 3 Sep 2010 14:36:57 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o83Eauge014436;
	Fri, 3 Sep 2010 14:36:56 GMT
	(envelope-from nobody)
Message-Id: <201009031436.o83Eauge014436@www.freebsd.org>
Date: Fri, 3 Sep 2010 14:36:56 GMT
From: Andrew Boyer <aboyer@averesystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] [ixgbe] Version in -current won't build on 7.x systems
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150247
>Category:       kern
>Synopsis:       [patch] [ixgbe] Version in -current won't build on 7.x systems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 03 14:40:04 UTC 2010
>Closed-Date:    Wed Feb 23 16:31:17 UTC 2011
>Last-Modified:  Wed Feb 23 16:31:17 UTC 2011
>Originator:     Andrew Boyer
>Release:        7.1p3
>Organization:
Avere Systems
>Environment:
N/A
>Description:
ixgbe.h added a version of drbr_needs_enqueue() for versions < 800504.  This breaks on systems < 800000 because buf_ring_empty() isn't defined in that case.  The #if should require version >= 800000.
>How-To-Repeat:
Pull the ixgbe driver from -current into a 7.x branch and build.
>Fix:


Patch attached with submission follows:

--- ixgbe.h	2010-09-03 10:32:19.000000000 -0400
+++ ixgbe.h	2010-09-03 10:32:52.000000000 -0400
@@ -477,7 +477,7 @@
 }
 
 /* Workaround to make 8.0 buildable */
-#if __FreeBSD_version < 800504
+#if __FreeBSD_version >= 800000 && __FreeBSD_version < 800504
 static __inline int
 drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
 {


>Release-Note:
>Audit-Trail:

From: Andrew Boyer <aboyer@averesystems.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/150247: [patch] [ixgbe] Version in -current won't build on 7.x systems
Date: Sun, 5 Sep 2010 09:24:41 -0400

 I should have filed this under misc, not amd64, so it can be targeted to =
 net.  Sorry for the confusion.
 
 Also, e1000/if_igb.h has the exact same issue.  Please fix it there as =
 well.
 
 Thanks,
   Andrew
 
 
Responsible-Changed-From-To: freebsd-amd64->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 6 07:24:31 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150247 

From: Andrew Boyer <aboyer@averesystems.com>
To: bug-followup@FreeBSD.org,
 Andrew Boyer <aboyer@averesystems.com>
Cc:  
Subject: Re: kern/150247: [patch] [ixgbe] Version in -current won't build on 7.x systems
Date: Fri, 7 Jan 2011 13:36:15 -0500

 The problem has spread to the new file ixv.h:
 
 --- ixv.h	2010-11-26 17:46:32.000000000 -0500
 +++ ixv.h	2011-01-07 13:08:45.000000000 -0500
 @@ -175,7 +175,11 @@
  #define VFTA_SIZE			128
 =20
  /* Offload bits in mbuf flag */
 +#if __FreeBSD_version >=3D 800000
  #define CSUM_OFFLOAD		(CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP)
 +#else
 +#define CSUM_OFFLOAD		(CSUM_IP|CSUM_TCP|CSUM_UDP)
 +#endif
 =20
  /*
   =
 **************************************************************************=
 ***
 @@ -400,7 +404,7 @@
  #define IXV_TX_LOCK_ASSERT(_sc)         mtx_assert(&(_sc)->tx_mtx, =
 MA_OWNED)
 =20
  /* Workaround to make 8.0 buildable */
 -#if __FreeBSD_version < 800504
 +#if __FreeBSD_version >=3D 800000 && __FreeBSD_version < 800504
  static __inline int
  drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
  {
 
 
 
 
 
 

From: Bruce Cran <bruce@cran.org.uk>
To: bug-followup@freebsd.org,
 aboyer@averesystems.com
Cc:  
Subject: Re: kern/150247: [patch] [ixgbe] Version in -current won't build on 7.x systems
Date: Mon, 21 Feb 2011 10:05:27 +0000

 We don't support building drivers from -CURRENT within the environment for an 
 older release. I think the ixgbe driver would need to be backported to 7-
 STABLE.
 
 -- 
 Bruce Cran
State-Changed-From-To: open->closed 
State-Changed-By: brucec 
State-Changed-When: Wed Feb 23 16:30:32 UTC 2011 
State-Changed-Why:  
Fixed with r217129, r217131 and r217132. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150247 
>Unformatted:
