static u_long ether_rss_nopi;
static u_long ether_rss_nohash;
static u_long ether_input_requeue;
+#endif
static u_long ether_input_wronghwhash;
static int ether_input_ckhash;
-#endif
#define ETHER_TSOLEN_DEFAULT (4 * ETHERMTU)
"# of packets whose msgport are found using pktinfo");
SYSCTL_ULONG(_net_link_ether, OID_AUTO, input_requeue, CTLFLAG_RW,
ðer_input_requeue, 0, "# of input packets gets requeued");
+#endif
SYSCTL_ULONG(_net_link_ether, OID_AUTO, input_wronghwhash, CTLFLAG_RW,
ðer_input_wronghwhash, 0, "# of input packets with wrong hw hash");
SYSCTL_INT(_net_link_ether, OID_AUTO, always_ckhash, CTLFLAG_RW,
ðer_input_ckhash, 0, "always check hash");
-#endif
#define ETHER_KTR_STR "ifp=%p"
#define ETHER_KTR_ARGS struct ifnet *ifp
return;
}
}
- if ((m->m_flags & (M_HASH | M_CKHASH)) == (M_HASH | M_CKHASH)
-#ifdef RSS_DEBUG
- || ether_input_ckhash
-#endif
- ) {
+ if ((m->m_flags & (M_HASH | M_CKHASH)) == (M_HASH | M_CKHASH) ||
+ __predict_false(ether_input_ckhash)) {
int isr;
/*
* Wrong hardware supplied hash; redispatch
*/
ether_dispatch(isr, m);
-#ifdef RSS_DEBUG
- atomic_add_long(ðer_input_wronghwhash, 1);
-#endif
+ if (__predict_false(ether_input_ckhash))
+ atomic_add_long(ðer_input_wronghwhash, 1);
return;
}
}