From owner-svn-src-head@FreeBSD.ORG Thu Apr 12 13:53:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E519F106566B; Thu, 12 Apr 2012 13:53:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFFA78FC12; Thu, 12 Apr 2012 13:53:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3CDrn88031167; Thu, 12 Apr 2012 13:53:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3CDrnII031164; Thu, 12 Apr 2012 13:53:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204121353.q3CDrnII031164@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Apr 2012 13:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234182 - head/sys/ofed/drivers/infiniband/ulp/ipoib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2012 13:53:50 -0000 Author: jhb Date: Thu Apr 12 13:53:49 2012 New Revision: 234182 URL: http://svn.freebsd.org/changeset/base/234182 Log: Don't update if_obytes when transmitting packets. That is already done in IFQ_HANDOFF() when the packet is passed to the start routine, so doing it here resulted in double counting. Reported by: Alex Tutubalin lexa lexa ru MFC after: 1 week Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Thu Apr 12 13:53:10 2012 (r234181) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Thu Apr 12 13:53:49 2012 (r234182) @@ -682,7 +682,6 @@ void ipoib_cm_handle_tx_wc(struct ipoib_ /* FIXME: is this right? Shouldn't we only increment on success? */ ++dev->if_opackets; - dev->if_obytes += tx_req->mb->m_pkthdr.len; m_freem(tx_req->mb); Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Thu Apr 12 13:53:10 2012 (r234181) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Thu Apr 12 13:53:49 2012 (r234182) @@ -345,7 +345,6 @@ static void ipoib_ib_handle_tx_wc(struct ipoib_dma_unmap_tx(priv->ca, tx_req); ++dev->if_opackets; - dev->if_obytes += tx_req->mb->m_pkthdr.len; m_freem(tx_req->mb);