From owner-svn-src-head@FreeBSD.ORG Thu Feb 6 03:30:13 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 8F9FAF0F; Thu, 6 Feb 2014 03:30:13 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 630A41DB4; Thu, 6 Feb 2014 03:30:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s163UDnC099884; Thu, 6 Feb 2014 03:30:13 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s163UCEU099881; Thu, 6 Feb 2014 03:30:12 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201402060330.s163UCEU099881@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 6 Feb 2014 03:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261537 - in head/sys/dev/cxgbe: . common 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.17 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, 06 Feb 2014 03:30:13 -0000 Author: np Date: Thu Feb 6 03:30:12 2014 New Revision: 261537 URL: http://svnweb.freebsd.org/changeset/base/261537 Log: cxgbe(4): Use the rx channel map (instead of the tx channel map) as the congestion channel map. MFC after: 1 week Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Feb 6 03:21:43 2014 (r261536) +++ head/sys/dev/cxgbe/adapter.h Thu Feb 6 03:30:12 2014 (r261537) @@ -210,6 +210,7 @@ struct port_info { uint8_t mod_type; uint8_t port_id; uint8_t tx_chan; + uint8_t rx_chan_map; /* rx MPS channel bitmap */ /* These need to be int as they are used in sysctl */ int ntxq; /* # of tx queues */ Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Thu Feb 6 03:21:43 2014 (r261536) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Feb 6 03:30:12 2014 (r261537) @@ -5650,6 +5650,7 @@ int __devinit t4_port_init(struct port_i p->viid = ret; p->tx_chan = j; + p->rx_chan_map = get_mps_bg_map(adap, j); p->lport = j; p->rss_size = rss_size; t4_os_set_hw_addr(adap, p->port_id, addr); Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Feb 6 03:21:43 2014 (r261536) +++ head/sys/dev/cxgbe/t4_sge.c Thu Feb 6 03:30:12 2014 (r261537) @@ -2474,7 +2474,7 @@ tnl_cong(struct port_info *pi) else if (cong_drop == 1) return (0); else - return (1 << pi->tx_chan); + return (pi->rx_chan_map); } static int @@ -2581,7 +2581,7 @@ alloc_ofld_rxq(struct port_info *pi, str char name[16]; rc = alloc_iq_fl(pi, &ofld_rxq->iq, &ofld_rxq->fl, intr_idx, - 1 << pi->tx_chan); + pi->rx_chan_map); if (rc != 0) return (rc);