summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgbe
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2015-07-17 06:46:18 +0000
committernp <np@FreeBSD.org>2015-07-17 06:46:18 +0000
commitef3b83d350a070a0a62158135194471d96b1e4f8 (patch)
treea283a42ed4fd472cd0e9fc609db406be5229555d /sys/dev/cxgbe
parente34b290decc352a9adca6380a7057164dc34206c (diff)
downloadFreeBSD-src-ef3b83d350a070a0a62158135194471d96b1e4f8.zip
FreeBSD-src-ef3b83d350a070a0a62158135194471d96b1e4f8.tar.gz
cxgbe(4): Ask the firmware for the start of the RSS slice for a port and
save it for later. This enables direct manipulation of the indirection tables (although the stock driver doesn't do that right now). MFC after: 1 month
Diffstat (limited to 'sys/dev/cxgbe')
-rw-r--r--sys/dev/cxgbe/adapter.h1
-rw-r--r--sys/dev/cxgbe/common/t4_hw.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index 0ec89e8..9390c51 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -233,6 +233,7 @@ struct port_info {
uint16_t viid;
int16_t xact_addr_filt;/* index of exact MAC address filter */
uint16_t rss_size; /* size of VI's RSS table slice */
+ uint16_t rss_base; /* start of VI's RSS table slice */
uint8_t lport; /* associated offload logical port */
int8_t mdio_addr;
uint8_t port_type;
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index d140276..7954188 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -5699,6 +5699,7 @@ int __devinit t4_port_init(struct port_info *p, int mbox, int pf, int vf)
struct fw_port_cmd c;
u16 rss_size;
adapter_t *adap = p->adapter;
+ u32 param, val;
memset(&c, 0, sizeof(c));
@@ -5737,6 +5738,17 @@ int __devinit t4_port_init(struct port_info *p, int mbox, int pf, int vf)
init_link_config(&p->link_cfg, ntohs(c.u.info.pcap));
+ param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
+ V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RSSINFO) |
+ V_FW_PARAMS_PARAM_YZ(p->viid);
+ ret = t4_query_params(adap, mbox, pf, vf, 1, &param, &val);
+ if (ret)
+ p->rss_base = 0xffff;
+ else {
+ /* MPASS((val >> 16) == rss_size); */
+ p->rss_base = val & 0xffff;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud