summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-04-12 13:53:49 +0000
committerjhb <jhb@FreeBSD.org>2012-04-12 13:53:49 +0000
commit4f83e11b0c868e624781e02d3bce2cd65ef7c23a (patch)
tree9a1148de78e9eee7ecb9308d385a3d945021d4f1
parentf0f6e2464c5f774e029d160935c4539a1519c0c8 (diff)
downloadFreeBSD-src-4f83e11b0c868e624781e02d3bce2cd65ef7c23a.zip
FreeBSD-src-4f83e11b0c868e624781e02d3bce2cd65ef7c23a.tar.gz
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
-rw-r--r--sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c1
-rw-r--r--sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 4aaf216..47818bf 100644
--- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -682,7 +682,6 @@ void ipoib_cm_handle_tx_wc(struct ipoib_dev_priv *priv, struct ib_wc *wc)
/* 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);
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index d3b68bc..1afb80e 100644
--- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -345,7 +345,6 @@ static void ipoib_ib_handle_tx_wc(struct ipoib_dev_priv *priv, struct ib_wc *wc)
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);
OpenPOWER on IntegriCloud