svn commit: r265410 - in stable/10/sys/dev/cxgbe: . common
Navdeep Parhar
np at FreeBSD.org
Tue May 6 02:22:54 UTC 2014
Author: np
Date: Tue May 6 02:22:52 2014
New Revision: 265410
URL: http://svnweb.freebsd.org/changeset/base/265410
Log:
MFC r261533, r261536, r261537, and r263457.
r261533:
cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats.
r261536:
cxgbe(4): The T5 allows for a different freelist starvation threshold
for queues with buffer packing. Use the correct value to calculate a
freelist's low water mark.
r261537:
cxgbe(4): Use the rx channel map (instead of the tx channel map) as the
congestion channel map.
r263457:
cxgbe(4): Recognize the "spider" configuration where a T5 card's 40G
QSFP port is presented as 4 distinct 10G SFP+ ports to the driver.
Modified:
stable/10/sys/dev/cxgbe/adapter.h
stable/10/sys/dev/cxgbe/common/t4_hw.c
stable/10/sys/dev/cxgbe/t4_main.c
stable/10/sys/dev/cxgbe/t4_sge.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/cxgbe/adapter.h
==============================================================================
--- stable/10/sys/dev/cxgbe/adapter.h Tue May 6 01:15:42 2014 (r265409)
+++ stable/10/sys/dev/cxgbe/adapter.h Tue May 6 02:22:52 2014 (r265410)
@@ -204,6 +204,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 */
@@ -512,6 +513,7 @@ struct sge {
int timer_val[SGE_NTIMERS];
int counter_val[SGE_NCOUNTERS];
int fl_starve_threshold;
+ int fl_starve_threshold2;
int eq_s_qpp;
int iq_s_qpp;
Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c
==============================================================================
--- stable/10/sys/dev/cxgbe/common/t4_hw.c Tue May 6 01:15:42 2014 (r265409)
+++ stable/10/sys/dev/cxgbe/common/t4_hw.c Tue May 6 02:22:52 2014 (r265410)
@@ -5647,6 +5647,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: stable/10/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 01:15:42 2014 (r265409)
+++ stable/10/sys/dev/cxgbe/t4_main.c Tue May 6 02:22:52 2014 (r265410)
@@ -2622,6 +2622,7 @@ build_medialist(struct port_info *pi)
ifmedia_set(media, m | IFM_10G_CX4);
break;
+ case FW_PORT_TYPE_QSFP_10G:
case FW_PORT_TYPE_SFP:
case FW_PORT_TYPE_FIBER_XFI:
case FW_PORT_TYPE_FIBER_XAUI:
@@ -7754,11 +7755,11 @@ t4_ioctl(struct cdev *dev, unsigned long
if (port_id >= sc->params.nports)
return (EINVAL);
+ pi = sc->port[port_id];
/* MAC stats */
- t4_clr_port_stats(sc, port_id);
+ t4_clr_port_stats(sc, pi->tx_chan);
- pi = sc->port[port_id];
if (pi->flags & PORT_INIT_DONE) {
struct sge_rxq *rxq;
struct sge_txq *txq;
Modified: stable/10/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 01:15:42 2014 (r265409)
+++ stable/10/sys/dev/cxgbe/t4_sge.c Tue May 6 02:22:52 2014 (r265410)
@@ -568,6 +568,10 @@ t4_read_chip_settings(struct adapter *sc
r = t4_read_reg(sc, A_SGE_CONM_CTRL);
s->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1;
+ if (is_t4(sc))
+ s->fl_starve_threshold2 = s->fl_starve_threshold;
+ else
+ s->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1;
/* egress queues: log2 of # of doorbells per BAR2 page */
r = t4_read_reg(sc, A_SGE_EGRESS_QUEUES_PER_PAGE_PF);
@@ -2232,7 +2236,9 @@ alloc_iq_fl(struct port_info *pi, struct
return (rc);
}
fl->needed = fl->cap;
- fl->lowat = roundup2(sc->sge.fl_starve_threshold, 8);
+ fl->lowat = fl->flags & FL_BUF_PACKING ?
+ roundup2(sc->sge.fl_starve_threshold2, 8) :
+ roundup2(sc->sge.fl_starve_threshold, 8);
c.iqns_to_fl0congen |=
htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) |
@@ -2467,7 +2473,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
@@ -2574,7 +2580,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);
More information about the svn-src-stable-10
mailing list