From owner-svn-src-stable-8@freebsd.org Wed Aug 5 02:08:43 2015 Return-Path: Delivered-To: svn-src-stable-8@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 C7B519B325C; Wed, 5 Aug 2015 02:08:43 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.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 B8213E7D; Wed, 5 Aug 2015 02:08:43 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t7528h60048955; Wed, 5 Aug 2015 02:08:43 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t7528h2e048952; Wed, 5 Aug 2015 02:08:43 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201508050208.t7528h2e048952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 5 Aug 2015 02:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r286300 - stable/8/sys/dev/bxe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 02:08:44 -0000 Author: davidcs Date: Wed Aug 5 02:08:42 2015 New Revision: 286300 URL: https://svnweb.freebsd.org/changeset/base/286300 Log: MFC r285973 - Avoid lock contention in the if_transmit callback by using trylock and enqueueing the frames when it fails. This way there is some latency removed from the transmitting path. - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just enqueue the desired frames and return successful transmit. This way we avoid to return errors on transmit side and resulting in possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set everytime we get the threshold ring hit, so this can be happening quite often. Submitted by: Attilio.Rao@isilon.com Modified: stable/8/sys/dev/bxe/bxe.c stable/8/sys/dev/bxe/bxe.h Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Wed Aug 5 01:52:52 2015 (r286299) +++ stable/8/sys/dev/bxe/bxe.c Wed Aug 5 02:08:42 2015 (r286300) @@ -6013,19 +6013,26 @@ bxe_tx_mq_start_locked(struct bxe_softc rc = tx_count = 0; + BXE_FP_TX_LOCK_ASSERT(fp); + if (!tx_br) { BLOGE(sc, "Multiqueue TX and no buf_ring!\n"); return (EINVAL); } + if (!sc->link_vars.link_up || + (ifp->if_drv_flags & + (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) { + rc = drbr_enqueue(ifp, tx_br, m); + goto bxe_tx_mq_start_locked_exit; + } + /* fetch the depth of the driver queue */ depth = drbr_inuse(ifp, tx_br); if (depth > fp->eth_q_stats.tx_max_drbr_queue_depth) { fp->eth_q_stats.tx_max_drbr_queue_depth = depth; } - BXE_FP_TX_LOCK_ASSERT(fp); - if (m == NULL) { /* no new work, check for pending frames */ next = drbr_dequeue(ifp, tx_br); @@ -6118,26 +6125,11 @@ bxe_tx_mq_start(struct ifnet *ifp, fp = &sc->fp[fp_index]; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - BLOGW(sc, "Interface not running, ignoring transmit request\n"); - return (ENETDOWN); - } - - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { - BLOGW(sc, "Interface TX queue is full, ignoring transmit request\n"); - return (EBUSY); - } - - if (!sc->link_vars.link_up) { - BLOGW(sc, "Interface link is down, ignoring transmit request\n"); - return (ENETDOWN); - } - - /* XXX change to TRYLOCK here and if failed then schedule taskqueue */ - - BXE_FP_TX_LOCK(fp); - rc = bxe_tx_mq_start_locked(sc, ifp, fp, m); - BXE_FP_TX_UNLOCK(fp); + if (BXE_FP_TX_TRYLOCK(fp)) { + rc = bxe_tx_mq_start_locked(sc, ifp, fp, m); + BXE_FP_TX_UNLOCK(fp); + } else + rc = drbr_enqueue(ifp, fp->tx_br, m); return (rc); } Modified: stable/8/sys/dev/bxe/bxe.h ============================================================================== --- stable/8/sys/dev/bxe/bxe.h Wed Aug 5 01:52:52 2015 (r286299) +++ stable/8/sys/dev/bxe/bxe.h Wed Aug 5 02:08:42 2015 (r286300) @@ -582,6 +582,7 @@ struct bxe_fastpath { #define BXE_FP_TX_LOCK(fp) mtx_lock(&fp->tx_mtx) #define BXE_FP_TX_UNLOCK(fp) mtx_unlock(&fp->tx_mtx) #define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(&fp->tx_mtx, MA_OWNED) +#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(&fp->tx_mtx) #define BXE_FP_RX_LOCK(fp) mtx_lock(&fp->rx_mtx) #define BXE_FP_RX_UNLOCK(fp) mtx_unlock(&fp->rx_mtx) From owner-svn-src-stable-8@freebsd.org Sat Aug 8 16:35:43 2015 Return-Path: Delivered-To: svn-src-stable-8@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 9A9959B6ADD; Sat, 8 Aug 2015 16:35:43 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org (repo.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 8AC781A51; Sat, 8 Aug 2015 16:35:43 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t78GZhSi037896; Sat, 8 Aug 2015 16:35:43 GMT (envelope-from gshapiro@FreeBSD.org) Received: (from gshapiro@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t78GZhqA037895; Sat, 8 Aug 2015 16:35:43 GMT (envelope-from gshapiro@FreeBSD.org) Message-Id: <201508081635.t78GZhqA037895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gshapiro set sender to gshapiro@FreeBSD.org using -f From: Gregory Neil Shapiro Date: Sat, 8 Aug 2015 16:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r286455 - stable/8/contrib/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2015 16:35:43 -0000 Author: gshapiro Date: Sat Aug 8 16:35:42 2015 New Revision: 286455 URL: https://svnweb.freebsd.org/changeset/base/286455 Log: MFC: Reminder to check tools/build/mk/OptionalObsoleteFiles.inc on new version imports. Modified: stable/8/contrib/sendmail/FREEBSD-upgrade Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/FREEBSD-upgrade ============================================================================== --- stable/8/contrib/sendmail/FREEBSD-upgrade Sat Aug 8 16:33:32 2015 (r286454) +++ stable/8/contrib/sendmail/FREEBSD-upgrade Sat Aug 8 16:35:42 2015 (r286455) @@ -86,6 +86,7 @@ infrastructure in FreeBSD: share/man/man8/rc.sendmail.8 share/mk/bsd.libnames.mk share/sendmail/Makefile + tools/build/mk/OptionalObsoleteFiles.inc usr.bin/Makefile usr.bin/vacation/Makefile usr.sbin/Makefile