ACTION_QUEUE_INDEX,
ACTION_DROP,
ACTION_COUNT,
- ACTION_COUNT_SHARED,
ACTION_COUNT_ID,
ACTION_RSS,
ACTION_RSS_FUNC,
static const enum index action_count[] = {
ACTION_COUNT_ID,
- ACTION_COUNT_SHARED,
ACTION_NEXT,
ZERO,
};
.help = "QoS flow identifier",
.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED),
item_param),
- .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
- qfi)),
+ .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_gtp_psc,
+ hdr.qfi, 6)),
},
[ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",
.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED),
item_param),
- .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
- pdu_type)),
+ .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_gtp_psc,
+ hdr.type, 4)),
},
[ITEM_PPPOES] = {
.name = "pppoes",
.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
.call = parse_vc_conf,
},
- [ACTION_COUNT_SHARED] = {
- .name = "shared",
- .help = "shared counter",
- .next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
- .args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
- shared, 1)),
- .call = parse_vc_conf,
- },
[ACTION_RSS] = {
.name = "rss",
.help = "spread packets among several queues",
action->conf = &sample_nvgre_encap[idx];
break;
default:
- printf("Error - Not supported action\n");
+ fprintf(stderr, "Error - Not supported action\n");
return;
}
rte_memcpy(data, action, sizeof(struct rte_flow_action));
break;
}
if (gtp_psc != i + 1) {
- printf("Error - GTP PSC does not follow GTP\n");
+ fprintf(stderr,
+ "Error - GTP PSC does not follow GTP\n");
goto error;
}
gtp = item->spec;
if ((gtp->v_pt_rsv_flags & 0x07) != 0x04) {
/* Only E flag should be set. */
- printf("Error - GTP unsupported flags\n");
+ fprintf(stderr,
+ "Error - GTP unsupported flags\n");
goto error;
} else {
struct rte_gtp_hdr_ext_word ext_word = {
break;
case RTE_FLOW_ITEM_TYPE_GTP_PSC:
if (gtp_psc >= 0) {
- printf("Error - Multiple GTP PSC items\n");
+ fprintf(stderr,
+ "Error - Multiple GTP PSC items\n");
goto error;
} else {
const struct rte_flow_item_gtp_psc
*opt = item->spec;
struct {
uint8_t len;
- uint8_t pdu_type;
- uint8_t qfi;
+ uint8_t pdu_type:4;
+ uint8_t qfi:6;
uint8_t next;
} psc;
-
- if (opt->pdu_type & 0x0F) {
- /* Support the minimal option only. */
- printf("Error - GTP PSC option with "
- "extra fields not supported\n");
- goto error;
- }
psc.len = sizeof(psc);
- psc.pdu_type = opt->pdu_type;
- psc.qfi = opt->qfi;
+ psc.pdu_type = opt->hdr.type;
+ psc.qfi = opt->hdr.qfi;
psc.next = 0;
*total_size += sizeof(psc);
rte_memcpy(data_tail - (*total_size),
size = sizeof(struct rte_flow_item_pfcp);
break;
default:
- printf("Error - Not supported item\n");
+ fprintf(stderr, "Error - Not supported item\n");
goto error;
}
*total_size += size;
all = 1;
index = 0;
} else if (index >= RAW_ENCAP_CONFS_MAX_NUM) {
- printf("index should be 0-%u\n", RAW_ENCAP_CONFS_MAX_NUM - 1);
+ fprintf(stderr, "index should be 0-%u\n",
+ RAW_ENCAP_CONFS_MAX_NUM - 1);
return;
}
do {