From owner-svn-src-head@FreeBSD.ORG Sun Feb 22 07:16:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F70A122; Sun, 22 Feb 2015 07:16:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7AD1385F; Sun, 22 Feb 2015 07:16:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1M7GCiK062825; Sun, 22 Feb 2015 07:16:12 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1M7GCsu062824; Sun, 22 Feb 2015 07:16:12 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201502220716.t1M7GCsu062824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sun, 22 Feb 2015 07:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279144 - 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.18-1 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: Sun, 22 Feb 2015 07:16:12 -0000 Author: arybchik Date: Sun Feb 22 07:16:11 2015 New Revision: 279144 URL: https://svnweb.freebsd.org/changeset/base/279144 Log: sfxge: packet can't require more than n_dma_seg descriptors plus one Use remaining number of DMA segment instead of maximum number in mapping when checking space for one more TSO segment packet. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Sun Feb 22 07:14:12 2015 (r279143) +++ head/sys/dev/sfxge/sfxge_tx.c Sun Feb 22 07:16:11 2015 (r279144) @@ -1104,8 +1104,8 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq * the remainder of the input mbuf but do not * roll back the work we have done. */ - if (txq->n_pend_desc > - SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) { + if (txq->n_pend_desc + 1 /* header */ + n_dma_seg > + SFXGE_TSO_MAX_DESC) { txq->tso_pdrop_too_many++; break; }