Date: Sat, 24 Sep 2016 19:03:05 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306301 - head/sys/dev/cxgbe Message-ID: <201609241903.u8OJ35Lg021735@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609241903.u8OJ35Lg021735>