aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2018-10-25 14:37:26 +0000
committerNavdeep Parhar <np@FreeBSD.org>2018-10-25 14:37:26 +0000
commitd54dafc6006df781b1d8283fd86fc263d9ba953e (patch)
tree6e47c7312010c1e1bd0b888942c14ec5c9866f42
parent89250cff0c9af8a2c976020468fbe9637b846dd3 (diff)
Notes
-rw-r--r--sys/dev/cxgbe/t4_filter.c4
-rw-r--r--sys/dev/cxgbe/t4_ioctl.h2
-rw-r--r--sys/dev/cxgbe/t4_main.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c
index 4f325bdd235d..c1a232e78950 100644
--- a/sys/dev/cxgbe/t4_filter.c
+++ b/sys/dev/cxgbe/t4_filter.c
@@ -864,8 +864,8 @@ set_filter(struct adapter *sc, struct t4_filter *t)
if (t->fs.val.iport >= sc->params.nports)
return (EINVAL);
- /* Can't specify an iq if not steering to it */
- if (!t->fs.dirsteer && t->fs.iq)
+ /* Can't specify an iqid/rss_info if not steering. */
+ if (!t->fs.dirsteer && !t->fs.dirsteerhash && !t->fs.maskhash && t->fs.iq)
return (EINVAL);
/* Validate against the global filter mode and ingress config */
diff --git a/sys/dev/cxgbe/t4_ioctl.h b/sys/dev/cxgbe/t4_ioctl.h
index 44cadc1c8223..1daa4f5dfa27 100644
--- a/sys/dev/cxgbe/t4_ioctl.h
+++ b/sys/dev/cxgbe/t4_ioctl.h
@@ -209,7 +209,7 @@ struct t4_filter_specification {
uint32_t rpttid:1; /* report TID in RSS hash field */
uint32_t dirsteer:1; /* 0 => RSS, 1 => steer to iq */
uint32_t iq:10; /* ingress queue */
- uint32_t maskhash:1; /* dirsteer=0: store RSS hash in TCB */
+ uint32_t maskhash:1; /* dirsteer=0: steer to an RSS sub-region */
uint32_t dirsteerhash:1;/* dirsteer=1: 0 => TCB contains RSS hash */
/* 1 => TCB contains IQ ID */
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 6f87dbcaca7e..d2746367251f 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -4156,6 +4156,11 @@ set_params__post_init(struct adapter *sc)
if (t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val) == 0)
sc->params.port_caps32 = 1;
+ /* Let filter + maskhash steer to a part of the VI's RSS region. */
+ val = 1 << (G_MASKSIZE(t4_read_reg(sc, A_TP_RSS_CONFIG_TNL)) - 1);
+ t4_set_reg_field(sc, A_TP_RSS_CONFIG_TNL, V_MASKFILTER(M_MASKFILTER),
+ V_MASKFILTER(val - 1));
+
#ifdef TCP_OFFLOAD
/*
* Override the TOE timers with user provided tunables. This is not the