cxgbe(4): Allow "pass" filters to distribute matching traffic using a

subset of a VI's RSS indirection table.

This makes it possible to make groups out of rx queues and steer
different kinds of traffic to different groups.  For example, an
interface with 8 rx queues could have all non-TCP traffic delivered to
queues 0-3 and all TCP traffic to queues 4-7.

Note that it is already possible for filters to steer traffic to a
particular queue or to distribute it using the full indirection table
(much like normal rx does).

Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2018-10-25 14:37:26 +00:00
parent 89250cff0c
commit d54dafc600
3 changed files with 8 additions and 3 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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