diff options
author | Andrew Rybchenko <arybchik@FreeBSD.org> | 2016-12-29 09:15:27 +0000 |
---|---|---|
committer | Andrew Rybchenko <arybchik@FreeBSD.org> | 2016-12-29 09:15:27 +0000 |
commit | 1e2b4cef91a07331015245567f5f89b9031f9fb7 (patch) | |
tree | 5e6fbaa124bdfbe99caccabfe127594702caccdc /sys/dev/sfxge | |
parent | 0569bc9ca99264ebd2079e97a05dbb15d67028cf (diff) |
Notes
Diffstat (limited to 'sys/dev/sfxge')
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index 7ac48d181397f..580fa8bc1641d 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -608,7 +608,7 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_txq *txq, struct mbuf *mbuf) volatile uintptr_t *putp; uintptr_t old; uintptr_t new; - unsigned old_len; + unsigned int put_count; KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); @@ -622,14 +622,14 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_txq *txq, struct mbuf *mbuf) old = *putp; if (old != 0) { struct mbuf *mp = (struct mbuf *)old; - old_len = mp->m_pkthdr.csum_data; + put_count = mp->m_pkthdr.csum_data; } else - old_len = 0; - if (old_len >= stdp->std_put_max) { + put_count = 0; + if (put_count >= stdp->std_put_max) { atomic_add_long(&txq->put_overflow, 1); return (ENOBUFS); } - mbuf->m_pkthdr.csum_data = old_len + 1; + mbuf->m_pkthdr.csum_data = put_count + 1; mbuf->m_nextpkt = (void *)old; } while (atomic_cmpset_ptr(putp, old, new) == 0); |