Page MenuHomeFreeBSD

D43338.diff
No OneTemporary

D43338.diff

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -3346,7 +3346,7 @@
/* Flush mbufq (make sure to release ni refs!). */
#ifdef __notyet__
- KASSERT(mbufq_len(&lsta->txq) == 0, ("%s: lsta %p has txq len %d != 0\n",
+ KASSERT(mbufq_empty(&lsta->txq), ("%s: lsta %p has txq len %d != 0\n",
__func__, lsta, mbufq_len(&lsta->txq)));
#endif
/* Drain taskq. */
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -1838,7 +1838,7 @@
* the control queue is only used for binding qsets which happens
* at init time so we are guaranteed enough descriptors
*/
- if (__predict_false(mbufq_len(&q->sendq))) {
+ if (__predict_false(!mbufq_empty(&q->sendq))) {
addq_exit: (void )mbufq_enqueue(&q->sendq, m);
return 1;
}
@@ -1954,7 +1954,7 @@
}
q->in_use++;
}
- if (mbufq_len(&q->sendq)) {
+ if (!mbufq_empty(&q->sendq)) {
setbit(&qs->txq_stopped, TXQ_CTRL);
if (should_restart_tx(q) &&
diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c
--- a/sys/dev/cxgbe/tom/t4_tom.c
+++ b/sys/dev/cxgbe/tom/t4_tom.c
@@ -323,8 +323,8 @@
* that a normal connection's socket's so_snd would have been purged or
* drained. Do _not_ clean up here.
*/
- MPASS(mbufq_len(&toep->ulp_pduq) == 0);
- MPASS(mbufq_len(&toep->ulp_pdu_reclaimq) == 0);
+ MPASS(mbufq_empty(&toep->ulp_pduq));
+ MPASS(mbufq_empty(&toep->ulp_pdu_reclaimq));
#ifdef INVARIANTS
if (ulp_mode(toep) == ULP_MODE_TCPDDP)
ddp_assert_empty(toep);
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -177,7 +177,7 @@
* end up starving ourselves in a multi-epair routing configuration.
*/
mtx_lock(&q->mtx);
- if (mbufq_len(&q->q) > 0) {
+ if (!mbufq_empty(&q->q)) {
resched = true;
q->state = EPAIR_QUEUE_WAKING;
} else {
diff --git a/sys/net80211/ieee80211_ddb.c b/sys/net80211/ieee80211_ddb.c
--- a/sys/net80211/ieee80211_ddb.c
+++ b/sys/net80211/ieee80211_ddb.c
@@ -222,7 +222,7 @@
db_printf("%s age %d nframes %d\n", sep,
rap->rxa_age, rap->rxa_nframes);
for (i = 0; i < IEEE80211_AGGR_BAWMAX; i++)
- if (mbufq_len(&rap->rxa_mq[i]) > 0) {
+ if (!mbufq_empty(&rap->rxa_mq[i])) {
db_printf("%s m[%2u:%4u] ", sep, i,
IEEE80211_SEQ_ADD(rap->rxa_start, i));
STAILQ_FOREACH(m, &rap->rxa_mq[i].mq_head,
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -567,7 +567,7 @@
/*
* Get the rxs of the final mbuf in the slot, if one exists.
*/
- if (mbufq_len(&rap->rxa_mq[off]) != 0) {
+ if (!mbufq_empty(&rap->rxa_mq[off])) {
rxs_final = ieee80211_get_rx_params_ptr(mbufq_last(&rap->rxa_mq[off]));
}
@@ -597,7 +597,7 @@
* If the list is empty OR we have determined we can put more
* driver decap'ed AMSDU frames in here, then insert.
*/
- if ((mbufq_len(&rap->rxa_mq[off]) == 0) || (toss_dup == 0)) {
+ if (mbufq_empty(&rap->rxa_mq[off]) || (toss_dup == 0)) {
if (mbufq_enqueue(&rap->rxa_mq[off], m) != 0) {
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT | IEEE80211_MSG_11N,
ni->ni_macaddr,
@@ -1075,7 +1075,7 @@
/*
* Dispatch as many packets as we can.
*/
- KASSERT((mbufq_len(&rap->rxa_mq[0]) == 0), ("unexpected dup"));
+ KASSERT(mbufq_empty(&rap->rxa_mq[0]), ("unexpected dup"));
ampdu_dispatch(ni, m);
ampdu_rx_dispatch(rap, ni);
return CONSUMED;
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -3383,7 +3383,7 @@
* many packets, we should finish sending them before starting of
* queuing the new reply.
*/
- if (mbufq_len(&igi->igi_gq) != 0)
+ if (!mbufq_empty(&igi->igi_gq))
goto send;
ifp = igi->igi_ifp;
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -2993,7 +2993,7 @@
* many packets, we should finish sending them before starting of
* queuing the new reply.
*/
- if (mbufq_len(&mli->mli_gq) != 0)
+ if (!mbufq_empty(&mli->mli_gq))
goto send;
ifp = mli->mli_ifp;

File Metadata

Mime Type
text/plain
Expires
Sun, Sep 29, 4:28 AM (16 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13037273
Default Alt Text
D43338.diff (4 KB)

Event Timeline