diff options
author | arybchik <arybchik@FreeBSD.org> | 2017-01-02 09:45:20 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2017-01-02 09:45:20 +0000 |
commit | b93339e896ae26bf5c776b242e9aa5b6c75d4282 (patch) | |
tree | 901a5e0e03055c4b8c5b83b51f0ee774072934c4 | |
parent | f168cdaa75d6a6593cb0069b2308971c5544c697 (diff) | |
download | FreeBSD-src-b93339e896ae26bf5c776b242e9aa5b6c75d4282.zip FreeBSD-src-b93339e896ae26bf5c776b242e9aa5b6c75d4282.tar.gz |
MFC r310770
sfxge(4): cleanup: clarify/unify variable name used for put-list length
get_count is used for get-list.
Sponsored by: Solarflare Communications, Inc.
-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 e24fb30..c6d7aba 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -601,7 +601,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")); @@ -615,14 +615,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); |