net/sfc: support API to negotiate delivery of Rx metadata
[dpdk.git] / app / test-pmd / cmdline_flow.c
index 34e0436..0b5856c 100644 (file)
@@ -206,6 +206,7 @@ enum index {
        ITEM_SCTP_CKSUM,
        ITEM_VXLAN,
        ITEM_VXLAN_VNI,
+       ITEM_VXLAN_LAST_RSVD,
        ITEM_E_TAG,
        ITEM_E_TAG_GRP_ECID_B,
        ITEM_NVGRE,
@@ -321,7 +322,6 @@ enum index {
        ACTION_QUEUE_INDEX,
        ACTION_DROP,
        ACTION_COUNT,
-       ACTION_COUNT_SHARED,
        ACTION_COUNT_ID,
        ACTION_RSS,
        ACTION_RSS_FUNC,
@@ -1129,6 +1129,7 @@ static const enum index item_sctp[] = {
 
 static const enum index item_vxlan[] = {
        ITEM_VXLAN_VNI,
+       ITEM_VXLAN_LAST_RSVD,
        ITEM_NEXT,
        ZERO,
 };
@@ -1449,7 +1450,6 @@ static const enum index action_queue[] = {
 
 static const enum index action_count[] = {
        ACTION_COUNT_ID,
-       ACTION_COUNT_SHARED,
        ACTION_NEXT,
        ZERO,
 };
@@ -2849,6 +2849,14 @@ static const struct token token_list[] = {
                             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",
@@ -3305,16 +3313,16 @@ static const struct token token_list[] = {
                .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",
@@ -3702,14 +3710,6 @@ static const struct token token_list[] = {
                .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",
@@ -8433,7 +8433,7 @@ cmd_set_raw_parsed_sample(const struct buffer *in)
                        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));
@@ -8558,13 +8558,15 @@ cmd_set_raw_parsed(const struct buffer *in)
                                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 = {
@@ -8580,27 +8582,21 @@ cmd_set_raw_parsed(const struct buffer *in)
                        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),
@@ -8613,7 +8609,7 @@ cmd_set_raw_parsed(const struct buffer *in)
                        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;
@@ -8741,7 +8737,8 @@ cmd_show_set_raw_parsed(void *parsed_result, struct cmdline *cl, void *data)
                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 {