From owner-svn-src-stable-7@FreeBSD.ORG Mon Feb 9 03:40:52 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 300D810656E8; Mon, 9 Feb 2009 03:40:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D3088FC16; Mon, 9 Feb 2009 03:40:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n193eqRA044022; Mon, 9 Feb 2009 03:40:52 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n193eq9A044021; Mon, 9 Feb 2009 03:40:52 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200902090340.n193eq9A044021@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 9 Feb 2009 03:40:51 +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: r188371 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 03:40:53 -0000 Author: yongari Date: Mon Feb 9 03:40:51 2009 New Revision: 188371 URL: http://svn.freebsd.org/changeset/base/188371 Log: MFC r185286: Simplify Tx checksum offload configuration. Also clear CSUM_IP if we've computed IP checksum with software method. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/fxp/if_fxp.c Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Mon Feb 9 03:38:01 2009 (r188370) +++ stable/7/sys/dev/fxp/if_fxp.c Mon Feb 9 03:40:51 2009 (r188371) @@ -1295,14 +1295,10 @@ fxp_encap(struct fxp_softc *sc, struct m * in the TCP header. The stack should have * already done this for us. */ - if (m->m_pkthdr.csum_flags) { - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - txp->tx_cb->ipcb_ip_schedule = - FXP_IPCB_TCPUDP_CHECKSUM_ENABLE; - if (m->m_pkthdr.csum_flags & CSUM_TCP) - txp->tx_cb->ipcb_ip_schedule |= - FXP_IPCB_TCP_PACKET; - } + if (m->m_pkthdr.csum_flags & FXP_CSUM_FEATURES) { + txp->tx_cb->ipcb_ip_schedule = FXP_IPCB_TCPUDP_CHECKSUM_ENABLE; + if (m->m_pkthdr.csum_flags & CSUM_TCP) + txp->tx_cb->ipcb_ip_schedule |= FXP_IPCB_TCP_PACKET; #ifdef FXP_IP_CSUM_WAR /* @@ -1334,6 +1330,7 @@ fxp_encap(struct fxp_softc *sc, struct m ip = mtod(m, struct ip *); ip->ip_sum = in_cksum(m, ip->ip_hl << 2); m->m_data -= ETHER_HDR_LEN; + m->m_pkthdr.csum_flags &= ~CSUM_IP; } else { txp->tx_cb->ipcb_ip_activation_high = FXP_IPCB_HARDWAREPARSING_ENABLE;