ITEM_VLAN_INNER_TYPE,
ITEM_VLAN_HAS_MORE_VLAN,
ITEM_IPV4,
+ ITEM_IPV4_VER_IHL,
ITEM_IPV4_TOS,
ITEM_IPV4_ID,
ITEM_IPV4_FRAGMENT_OFFSET,
ITEM_SCTP_CKSUM,
ITEM_VXLAN,
ITEM_VXLAN_VNI,
+ ITEM_VXLAN_LAST_RSVD,
ITEM_E_TAG,
ITEM_E_TAG_GRP_ECID_B,
ITEM_NVGRE,
ACTION_QUEUE_INDEX,
ACTION_DROP,
ACTION_COUNT,
- ACTION_COUNT_SHARED,
ACTION_COUNT_ID,
ACTION_RSS,
ACTION_RSS_FUNC,
};
static const enum index item_ipv4[] = {
+ ITEM_IPV4_VER_IHL,
ITEM_IPV4_TOS,
ITEM_IPV4_ID,
ITEM_IPV4_FRAGMENT_OFFSET,
static const enum index item_vxlan[] = {
ITEM_VXLAN_VNI,
+ ITEM_VXLAN_LAST_RSVD,
ITEM_NEXT,
ZERO,
};
static const enum index action_count[] = {
ACTION_COUNT_ID,
- ACTION_COUNT_SHARED,
ACTION_NEXT,
ZERO,
};
.next = NEXT(item_ipv4),
.call = parse_vc,
},
+ [ITEM_IPV4_VER_IHL] = {
+ .name = "version_ihl",
+ .help = "match header length",
+ .next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv4,
+ hdr.version_ihl)),
+ },
[ITEM_IPV4_TOS] = {
.name = "tos",
.help = "type of service",
item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
},
+ [ITEM_VXLAN_LAST_RSVD] = {
+ .name = "last_rsvd",
+ .help = "VXLAN last reserved bits",
+ .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED),
+ item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan,
+ rsvd1)),
+ },
[ITEM_E_TAG] = {
.name = "e_tag",
.help = "match E-Tag header",
.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",
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
ipv4 = (struct rte_ipv4_hdr *)buf;
- ipv4->version_ihl = 0x45;
+ if (!ipv4->version_ihl)
+ ipv4->version_ihl = RTE_IPV4_VHL_DEF;
if (next_proto && ipv4->next_proto_id == 0)
ipv4->next_proto_id = (uint8_t)next_proto;
break;
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 {