aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2012-09-28 18:28:27 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2012-09-28 18:28:27 +0000
commit063efed28c45a81e9f92c69b2fbe1f4f278c8f1a (patch)
tree66a3fa6f2f977c6c8d808397e65fc31995eab050 /sys/dev
parenta1c9ec3ce0c44db02394c132fb073aba62565da3 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bxe/if_bxe.c5
-rw-r--r--sys/dev/e1000/if_em.c4
-rw-r--r--sys/dev/e1000/if_igb.c4
-rw-r--r--sys/dev/ixgbe/ixgbe.c2
-rw-r--r--sys/dev/ixgbe/ixv.c4
-rw-r--r--sys/dev/mxge/if_mxge.c2
-rw-r--r--sys/dev/oce/oce_if.c4
-rw-r--r--sys/dev/vxge/vxge.c4
8 files changed, 21 insertions, 8 deletions
diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c
index c51480c06fa79..fe6bd8bcad9bb 100644
--- a/sys/dev/bxe/if_bxe.c
+++ b/sys/dev/bxe/if_bxe.c
@@ -9557,6 +9557,11 @@ bxe_tx_mq_start_locked(struct ifnet *ifp,
/* The transmit frame was enqueued successfully. */
tx_count++;
+ /* Update stats */
+ ifp->if_obytes += next->m_pkthdr.len;
+ if (next->m_flags & M_MCAST)
+ ifp->if_omcasts++;
+
/* Send a copy of the frame to any BPF listeners. */
BPF_MTAP(ifp, next);
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 63f399f130e9a..112b538f5585e 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -922,7 +922,9 @@ em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
break;
}
enq++;
- drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
+ ifp->if_obytes += next->m_pkthdr.len;
+ if (next->m_flags & M_MCAST)
+ ifp->if_omcasts++;
ETHER_BPF_MTAP(ifp, next);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
break;
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index cd91ad4e1ade4..13189108c0606 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -1014,7 +1014,9 @@ igb_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
break;
}
enq++;
- drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
+ ifp->if_obytes += next->m_pkthdr.len;
+ if (next->m_flags & M_MCAST)
+ ifp->if_omcasts++;
ETHER_BPF_MTAP(ifp, next);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
break;
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index acf4ba2546e90..19e3c407d7ac2 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -853,7 +853,6 @@ ixgbe_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
break;
}
enqueued++;
- drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
/* Send a copy of the frame to the BPF listener */
ETHER_BPF_MTAP(ifp, next);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
@@ -5335,6 +5334,7 @@ ixgbe_update_stats_counters(struct adapter *adapter)
ifp->if_ibytes = adapter->stats.gorc;
ifp->if_obytes = adapter->stats.gotc;
ifp->if_imcasts = adapter->stats.mprc;
+ ifp->if_omcasts = adapter->stats.mptc;
ifp->if_collisions = 0;
/* Rx Errors */
diff --git a/sys/dev/ixgbe/ixv.c b/sys/dev/ixgbe/ixv.c
index b429560e640ba..1acb3f0bf9600 100644
--- a/sys/dev/ixgbe/ixv.c
+++ b/sys/dev/ixgbe/ixv.c
@@ -641,7 +641,9 @@ ixv_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m)
break;
}
enqueued++;
- drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
+ ifp->if_obytes += next->m_pkthdr.len;
+ if (next->m_flags & M_MCAST)
+ ifp->if_omcasts++;
/* Send a copy of the frame to the BPF listener */
ETHER_BPF_MTAP(ifp, next);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index c61d360141483..1e51d1bc3bb8f 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -47,8 +47,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sx.h>
#include <sys/taskqueue.h>
-/* count xmits ourselves, rather than via drbr */
-#define NO_SLOW_STATS
#include <net/if.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c
index fdeb339eea280..5a47424257af3 100644
--- a/sys/dev/oce/oce_if.c
+++ b/sys/dev/oce/oce_if.c
@@ -1183,7 +1183,9 @@ oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq)
}
break;
}
- drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
+ ifp->if_obytes += next->m_pkthdr.len;
+ if (next->m_flags & M_MCAST)
+ ifp->if_omcasts++;
ETHER_BPF_MTAP(ifp, next);
next = drbr_dequeue(ifp, br);
}
diff --git a/sys/dev/vxge/vxge.c b/sys/dev/vxge/vxge.c
index 0750e3594b472..9948801a54432 100644
--- a/sys/dev/vxge/vxge.c
+++ b/sys/dev/vxge/vxge.c
@@ -709,7 +709,9 @@ vxge_mq_send_locked(ifnet_t ifp, vxge_vpath_t *vpath, mbuf_t m_head)
VXGE_DRV_STATS(vpath, tx_again);
break;
}
- drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
+ ifp->if_obytes += next->m_pkthdr.len;
+ if (next->m_flags & M_MCAST)
+ ifp->if_omcasts++;
/* Send a copy of the frame to the BPF listener */
ETHER_BPF_MTAP(ifp, next);