FreeBSD Bugzilla – Attachment 191965 Details for
Bug 227100
[epair] epair interface stops working when it reaches the hardware queue limit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
add SDT in epair
epair-sdt-diff.patch (text/plain), 3.62 KB, created by
Reshad Patuck
on 2018-03-30 04:25:28 UTC
(
hide
)
Description:
add SDT in epair
Filename:
MIME Type:
Creator:
Reshad Patuck
Created:
2018-03-30 04:25:28 UTC
Size:
3.62 KB
patch
obsolete
>Index: sys/net/if_epair.c >=================================================================== >--- sys/net/if_epair.c (revision 328637) >+++ sys/net/if_epair.c (working copy) >@@ -59,6 +59,7 @@ > #include <sys/module.h> > #include <sys/refcount.h> > #include <sys/queue.h> >+#include <sys/sdt.h> > #include <sys/smp.h> > #include <sys/socket.h> > #include <sys/sockio.h> >@@ -90,6 +91,36 @@ > #define DPRINTF(fmt, arg...) > #endif > >+/* DTrace static probes */ >+SDT_PROVIDER_DEFINE(if_epair); >+ >+SDT_PROBE_DEFINE2(if_epair, transmit, epair_transmit, , >+ "struct ifnet*", >+ "struct mbuf*"); >+SDT_PROBE_DEFINE2(if_epair, transmit, epair_transmit_locked, mbuf_null, >+ "struct ifnet*", >+ "struct mbuf*"); >+SDT_PROBE_DEFINE2(if_epair, transmit, epair_transmit_locked, drv_not_running, >+ "struct ifnet*", >+ "struct mbuf*"); >+SDT_PROBE_DEFINE2(if_epair, transmit, epair_transmit_locked, if_not_up, >+ "struct ifnet*", >+ "struct mbuf*"); >+SDT_PROBE_DEFINE2(if_epair, transmit, epair_transmit_locked, oif_not_up, >+ "struct ifnet*", >+ "struct mbuf*"); >+SDT_PROBE_DEFINE3(if_epair, transmit, epair_transmit_locked, enqueued, >+ "struct ifnet*", >+ "struct mbuf*", >+ "int"); >+SDT_PROBE_DEFINE3(if_epair, transmit, epair_transmit_locked, netisr_queue, >+ "struct ifnet*", >+ "struct mbuf*", >+ "int"); >+SDT_PROBE_DEFINE2(if_epair, receive, epair_nh_sintr, , >+ "struct ifnet*", >+ "struct mbuf*"); >+ > static void epair_nh_sintr(struct mbuf *); > static struct mbuf *epair_nh_m2cpuid(struct mbuf *, uintptr_t, u_int *); > static void epair_nh_drainedcpu(u_int); >@@ -254,6 +285,8 @@ > struct epair_softc *sc; > > ifp = m->m_pkthdr.rcvif; >+ SDT_PROBE2(if_epair, receive, epair_nh_sintr, , >+ ifp, m); > (*ifp->if_input)(ifp, m); > sc = ifp->if_softc; > EPAIR_REFCOUNT_RELEASE(&sc->refcount); >@@ -480,8 +513,11 @@ > epair_dpcpu = DPCPU_ID_PTR(sc->cpuid, epair_dpcpu); > EPAIR_LOCK_ASSERT(epair_dpcpu); > >- if (m == NULL) >+ if (m == NULL) { >+ SDT_PROBE2(if_epair, transmit, epair_transmit_locked, >+ mbuf_null, ifp, m); > return (0); >+ } > > /* > * We are not going to use the interface en/dequeue mechanism >@@ -490,10 +526,14 @@ > * other interface of our pair via the netsir. > */ > if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { >+ SDT_PROBE2(if_epair, transmit, epair_transmit_locked, >+ drv_not_running, ifp, m); > m_freem(m); > return (ENXIO); > } > if ((ifp->if_flags & IFF_UP) == 0) { >+ SDT_PROBE2(if_epair, transmit, epair_transmit_locked, >+ if_not_up, ifp, m); > m_freem(m); > return (ENETDOWN); > } >@@ -507,6 +547,8 @@ > oifp = sc->oifp; > if ((oifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || > (oifp->if_flags & IFF_UP) ==0) { >+ SDT_PROBE2(if_epair, transmit, epair_transmit_locked, >+ oif_not_up, ifp, m); > if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); > m_freem(m); > return (0); >@@ -547,6 +589,9 @@ > IFQ_ENQUEUE(&ifp->if_snd, m, error); > if (!error) > (void)epair_add_ifp_for_draining(ifp); >+ >+ SDT_PROBE3(if_epair, transmit, epair_transmit_locked, enqueued, >+ ifp, m, error); > return (error); > } > sc = oifp->if_softc; >@@ -559,6 +604,8 @@ > CURVNET_SET_QUIET(oifp->if_vnet); > error = netisr_queue(NETISR_EPAIR, m); > CURVNET_RESTORE(); >+ SDT_PROBE3(if_epair, transmit, epair_transmit_locked, netisr_queue, >+ ifp, m, error); > if (!error) { > if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); > /* >@@ -591,6 +638,8 @@ > struct epair_dpcpu *epair_dpcpu; > int error; > >+ SDT_PROBE2(if_epair, transmit, epair_transmit, , ifp, m); >+ > epair_dpcpu = DPCPU_ID_PTR(cpuid_from_ifp(ifp), epair_dpcpu); > EPAIR_LOCK(epair_dpcpu); > error = epair_transmit_locked(ifp, m);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227100
:
191964
| 191965 |
191966
|
191967