From: Hyong Youb Kim Date: Wed, 9 Sep 2020 14:00:03 +0000 (-0700) Subject: net/enic: support priorities for TCAM flows X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f985387e444b52d34f828651edaa4e4c84b59f95;p=dpdk.git net/enic: support priorities for TCAM flows Group 0 corresponds to TCAM which supports priorities. Accept non-zero priorities for group 0 flows. Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 78ceee3204..3faafa4107 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -59,6 +59,7 @@ New Features * Added support for VF representors with single-queue Tx/Rx and flow API * Added support for egress PORT_ID action + * Added support for non-zero priorities for group 0 flows * **Extended flow-perf application.** diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index 28ed51857f..ee671e11df 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -1712,9 +1712,10 @@ enic_fm_dump_tcam_match(const struct fm_tcam_match_entry *match, memset(buf, 0, sizeof(buf)); __enic_fm_dump_tcam_match(&match->ftm_mask.fk_hdrset[0], buf, sizeof(buf)); - ENICPMD_LOG(DEBUG, " TCAM %s Outer: %s %scounter", + ENICPMD_LOG(DEBUG, " TCAM %s Outer: %s %scounter position %u", (ingress) ? "IG" : "EG", buf, - (match->ftm_flags & FMEF_COUNTER) ? "" : "no "); + (match->ftm_flags & FMEF_COUNTER) ? "" : "no ", + match->ftm_position); memset(buf, 0, sizeof(buf)); __enic_fm_dump_tcam_match(&match->ftm_mask.fk_hdrset[1], buf, sizeof(buf)); @@ -1761,11 +1762,11 @@ enic_fm_flow_parse(struct enic_flowman *fm, } if (attrs) { - if (attrs->priority) { + if (attrs->group != FM_TCAM_RTE_GROUP && attrs->priority) { rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY, NULL, - "priorities are not supported"); + "priorities are not supported for non-default (0) groups"); return -rte_errno; } else if (!fm->owner_enic->switchdev_mode && attrs->transfer) { rte_flow_error_set(error, ENOTSUP, @@ -2193,6 +2194,7 @@ enic_fm_flow_add_entry(struct enic_flowman *fm, struct rte_flow *flow; ENICPMD_FUNC_TRACE(); + match_in->ftm_position = attrs->priority; enic_fm_dump_tcam_entry(match_in, action_in, attrs->ingress); flow = calloc(1, sizeof(*flow)); fm_flow = calloc(1, sizeof(*fm_flow));