From owner-svn-src-head@FreeBSD.ORG Wed Jul 2 12:13:12 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08F8C957; Wed, 2 Jul 2014 12:13: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 EA8BE2E03; Wed, 2 Jul 2014 12:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s62CDBHv031610; Wed, 2 Jul 2014 12:13:11 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s62CDBM7031609; Wed, 2 Jul 2014 12:13:11 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201407021213.s62CDBM7031609@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 2 Jul 2014 12:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268156 - head/sys/dev/oce 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 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: Wed, 02 Jul 2014 12:13:12 -0000 Author: luigi Date: Wed Jul 2 12:13:11 2014 New Revision: 268156 URL: http://svnweb.freebsd.org/changeset/base/268156 Log: Various bugfixes from Stefano Garzarella: 1. oce_multiq_start(): make sure the buffer is consumed even on ENXIO 2. oce_multiq_transmit(): there is an extra call to drbr_enqueue() causing the mbuf to be enqueued twice when the NIC's queue is full, and potential panics 3. oce_multiq_transmit(): same problem fixed recently in ixgbe (r267187) and other drivers: if the mbuf is enqueued, the proper return value is 0 Submitted by: Stefano Garzarella MFC after: 3 days Modified: head/sys/dev/oce/oce_if.c Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Wed Jul 2 11:51:01 2014 (r268155) +++ head/sys/dev/oce/oce_if.c Wed Jul 2 12:13:11 2014 (r268156) @@ -563,9 +563,6 @@ oce_multiq_start(struct ifnet *ifp, stru int queue_index = 0; int status = 0; - if (!sc->link_status) - return ENXIO; - if ((m->m_flags & M_FLOWID) != 0) queue_index = m->m_pkthdr.flowid % sc->nwqs; @@ -1274,7 +1271,6 @@ oce_multiq_transmit(struct ifnet *ifp, s drbr_putback(ifp, br, next); wq->tx_stats.tx_stops ++; ifp->if_drv_flags |= IFF_DRV_OACTIVE; - status = drbr_enqueue(ifp, br, next); } break; } @@ -1285,7 +1281,7 @@ oce_multiq_transmit(struct ifnet *ifp, s ETHER_BPF_MTAP(ifp, next); } - return status; + return 0; }