From owner-svn-src-head@freebsd.org Sat Sep 24 19:03:06 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 A8ACEBE8776; Sat, 24 Sep 2016 19:03:06 +0000 (UTC) (envelope-from np@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 5EFC2EE7; Sat, 24 Sep 2016 19:03:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8OJ35Gh021737; Sat, 24 Sep 2016 19:03:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8OJ35Lg021735; Sat, 24 Sep 2016 19:03:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609241903.u8OJ35Lg021735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 24 Sep 2016 19:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306301 - head/sys/dev/cxgbe 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: Sat, 24 Sep 2016 19:03:06 -0000 Author: np Date: Sat Sep 24 19:03:05 2016 New Revision: 306301 URL: https://svnweb.freebsd.org/changeset/base/306301 Log: cxgbe(4): Use the port's top speed to figure out whether it is "high speed" or not (for the purpose of calculating the number of queues etc.) This does the right thing for 25Gbps and 100Gbps ports. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_vf.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Sep 24 17:50:11 2016 (r306300) +++ head/sys/dev/cxgbe/t4_main.c Sat Sep 24 19:03:05 2016 (r306301) @@ -970,7 +970,7 @@ t4_attach(device_t dev) pi->tc = malloc(sizeof(struct tx_sched_class) * sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { n10g++; } else { n1g++; @@ -1086,7 +1086,7 @@ t4_attach(device_t dev) vi->first_rxq = rqidx; vi->first_txq = tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { vi->tmr_idx = t4_tmr_idx_10g; vi->pktc_idx = t4_pktc_idx_10g; vi->flags |= iaq.intr_flags_10g & INTR_RXQ; @@ -1110,7 +1110,7 @@ t4_attach(device_t dev) #ifdef TCP_OFFLOAD vi->first_ofld_rxq = ofld_rqidx; vi->first_ofld_txq = ofld_tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { vi->flags |= iaq.intr_flags_10g & INTR_OFLD_RXQ; vi->nofldrxq = j == 0 ? iaq.nofldrxq10g : iaq.nofldrxq_vi; Modified: head/sys/dev/cxgbe/t4_vf.c ============================================================================== --- head/sys/dev/cxgbe/t4_vf.c Sat Sep 24 17:50:11 2016 (r306300) +++ head/sys/dev/cxgbe/t4_vf.c Sat Sep 24 19:03:05 2016 (r306301) @@ -662,7 +662,7 @@ t4vf_attach(device_t dev) pi->tc = malloc(sizeof(struct tx_sched_class) * sc->chip_params->nsched_cls, M_CXGBE, M_ZERO | M_WAITOK); - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { n10g++; } else { n1g++; @@ -729,7 +729,7 @@ t4vf_attach(device_t dev) vi->first_rxq = rqidx; vi->first_txq = tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { + if (port_top_speed(pi) >= 10) { vi->tmr_idx = t4_tmr_idx_10g; vi->pktc_idx = t4_pktc_idx_10g; vi->flags |= iaq.intr_flags_10g & INTR_RXQ;