if (knode->exts && tcf_exts_has_actions(knode->exts)) {
NL_SET_ERR_MSG_MOD(extack, "action offload not supported"); returnfalse;
} if (knode->link_handle) {
NL_SET_ERR_MSG_MOD(extack, "linking not supported"); returnfalse;
} if (knode->sel->flags != TC_U32_TERMINAL) {
NL_SET_ERR_MSG_MOD(extack, "flags must be equal to TC_U32_TERMINAL"); returnfalse;
} if (knode->sel->off || knode->sel->offshift || knode->sel->offmask ||
knode->sel->offoff || knode->fshift) {
NL_SET_ERR_MSG_MOD(extack, "variable offsetting not supported"); returnfalse;
} if (knode->sel->hoff || knode->sel->hmask) {
NL_SET_ERR_MSG_MOD(extack, "hashing not supported"); returnfalse;
} if (knode->val || knode->mask) {
NL_SET_ERR_MSG_MOD(extack, "matching on mark not supported"); returnfalse;
} if (knode->res && knode->res->class) {
NL_SET_ERR_MSG_MOD(extack, "setting non-0 class not supported"); returnfalse;
} if (knode->res && knode->res->classid >= abm->num_bands) {
NL_SET_ERR_MSG_MOD(extack, "classid higher than number of bands"); returnfalse;
} if (knode->sel->nkeys != 1) {
NL_SET_ERR_MSG_MOD(extack, "exactly one key required"); returnfalse;
}
switch (proto) { case htons(ETH_P_IP):
tos_off = 16; break; case htons(ETH_P_IPV6):
tos_off = 20; break; default:
NL_SET_ERR_MSG_MOD(extack, "only IP and IPv6 supported as filter protocol"); returnfalse;
}
k = &knode->sel->keys[0]; if (k->offmask) {
NL_SET_ERR_MSG_MOD(extack, "offset mask - variable offsetting not supported"); returnfalse;
} if (k->off) {
NL_SET_ERR_MSG_MOD(extack, "only DSCP fields can be matched"); returnfalse;
} if (k->val & ~k->mask) {
NL_SET_ERR_MSG_MOD(extack, "mask does not cover the key"); returnfalse;
} if (be32_to_cpu(k->mask) >> tos_off & ~abm->dscp_mask) {
NL_SET_ERR_MSG_MOD(extack, "only high DSCP class selector bits can be used");
nfp_err(abm->app->cpp, "u32 offload: requested mask %x FW can support only %x\n",
be32_to_cpu(k->mask) >> tos_off, abm->dscp_mask); returnfalse;
}
returntrue;
}
/* This filter list -> map conversion is O(n * m), we expect single digit or * low double digit number of prios and likewise for the filters. Also u32 * doesn't report stats, so it's really only setup time cost.
*/ staticunsignedint
nfp_abm_find_band_for_prio(struct nfp_abm_link *alink, unsignedint prio)
{ struct nfp_abm_u32_match *iter;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.