From owner-svn-src-head@freebsd.org Thu Dec 29 09:15:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2785C96F00; Thu, 29 Dec 2016 09:15:28 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71DC910C8; Thu, 29 Dec 2016 09:15:28 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBT9FRdY009233; Thu, 29 Dec 2016 09:15:27 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBT9FRGa009232; Thu, 29 Dec 2016 09:15:27 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201612290915.uBT9FRGa009232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 29 Dec 2016 09:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310770 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2016 09:15:28 -0000 Author: arybchik Date: Thu Dec 29 09:15:27 2016 New Revision: 310770 URL: https://svnweb.freebsd.org/changeset/base/310770 Log: sfxge(4): cleanup: clarify/unify variable name used for put-list length get_count is used for get-list. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Thu Dec 29 09:10:37 2016 (r310769) +++ head/sys/dev/sfxge/sfxge_tx.c Thu Dec 29 09:15:27 2016 (r310770) @@ -608,7 +608,7 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_ 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_ 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);