ethdev: add physical port action to flow API
[dpdk.git] / app / test-pmd / config.c
index ece2664..7a954c5 100644 (file)
@@ -993,7 +993,7 @@ static const struct {
        MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)),
        MK_FLOW_ITEM(PF, 0),
        MK_FLOW_ITEM(VF, sizeof(struct rte_flow_item_vf)),
-       MK_FLOW_ITEM(PORT, sizeof(struct rte_flow_item_port)),
+       MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
        MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
        MK_FLOW_ITEM(ETH, sizeof(struct rte_flow_item_eth)),
        MK_FLOW_ITEM(VLAN, sizeof(struct rte_flow_item_vlan)),
@@ -1091,6 +1091,7 @@ static const struct {
        MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
        MK_FLOW_ACTION(PF, 0),
        MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),
+       MK_FLOW_ACTION(PHY_PORT, sizeof(struct rte_flow_action_phy_port)),
        MK_FLOW_ACTION(METER, sizeof(struct rte_flow_action_meter)),
 };
 
@@ -1117,6 +1118,8 @@ flow_action_conf_copy(void *buf, const struct rte_flow_action *action)
                off = 0;
                if (dst.rss)
                        *dst.rss = (struct rte_flow_action_rss){
+                               .func = src.rss->func,
+                               .level = src.rss->level,
                                .types = src.rss->types,
                                .key_len = src.rss->key_len,
                                .queue_num = src.rss->queue_num,
@@ -1254,6 +1257,7 @@ port_flow_complain(struct rte_flow_error *error)
                [RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY] = "priority field",
                [RTE_FLOW_ERROR_TYPE_ATTR_INGRESS] = "ingress field",
                [RTE_FLOW_ERROR_TYPE_ATTR_EGRESS] = "egress field",
+               [RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER] = "transfer field",
                [RTE_FLOW_ERROR_TYPE_ATTR] = "attributes structure",
                [RTE_FLOW_ERROR_TYPE_ITEM_NUM] = "pattern length",
                [RTE_FLOW_ERROR_TYPE_ITEM_SPEC] = "item specification",
@@ -1519,12 +1523,13 @@ port_flow_list(portid_t port_id, uint32_t n, const uint32_t group[n])
                const struct rte_flow_item *item = pf->pattern;
                const struct rte_flow_action *action = pf->actions;
 
-               printf("%" PRIu32 "\t%" PRIu32 "\t%" PRIu32 "\t%c%c\t",
+               printf("%" PRIu32 "\t%" PRIu32 "\t%" PRIu32 "\t%c%c%c\t",
                       pf->id,
                       pf->attr.group,
                       pf->attr.priority,
                       pf->attr.ingress ? 'i' : '-',
-                      pf->attr.egress ? 'e' : '-');
+                      pf->attr.egress ? 'e' : '-',
+                      pf->attr.transfer ? 't' : '-');
                while (item->type != RTE_FLOW_ITEM_TYPE_END) {
                        if (item->type != RTE_FLOW_ITEM_TYPE_VOID)
                                printf("%s ", flow_item[item->type].name);