From owner-svn-src-all@FreeBSD.ORG Thu Nov 19 20:30:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D88551065679; Thu, 19 Nov 2009 20:30:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C669B8FC0A; Thu, 19 Nov 2009 20:30:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJKUImo018123; Thu, 19 Nov 2009 20:30:18 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAJKUIdc018121; Thu, 19 Nov 2009 20:30:18 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200911192030.nAJKUIdc018121@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 19 Nov 2009 20:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199544 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 20:30:19 -0000 Author: np Date: Thu Nov 19 20:30:18 2009 New Revision: 199544 URL: http://svn.freebsd.org/changeset/base/199544 Log: Fix cxgb(4)'s LRO in stable/7 Submitted by: matthew.fleming at isilon.com Reviewed by: gnn Modified: stable/7/sys/dev/cxgb/cxgb_main.c Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Thu Nov 19 19:35:15 2009 (r199543) +++ stable/7/sys/dev/cxgb/cxgb_main.c Thu Nov 19 20:30:18 2009 (r199544) @@ -981,13 +981,6 @@ cxgb_makedev(struct port_info *pi) return (0); } -#ifndef LRO_SUPPORTED -#ifdef IFCAP_LRO -#undef IFCAP_LRO -#endif -#define IFCAP_LRO 0x0 -#endif - #ifdef TSO_SUPPORTED #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO) /* Don't enable TSO6 yet */ @@ -1994,7 +1987,6 @@ cxgb_set_mtu(struct port_info *p, int mt return (error); } -#ifdef LRO_SUPPORTED /* * Mark lro enabled or disabled in all qsets for this port */ @@ -2012,7 +2004,6 @@ cxgb_set_lro(struct port_info *p, int en } return (0); } -#endif static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) @@ -2105,14 +2096,14 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l error = EINVAL; } } -#ifdef LRO_SUPPORTED + if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; /* Safe to do this even if cxgb_up not called yet */ cxgb_set_lro(p, ifp->if_capenable & IFCAP_LRO); } -#endif + if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = ifp->if_drv_flags & IFF_DRV_RUNNING;