Mirror Extension to Port Representor
Mirror extension to port representor allows FDB domain mirror destination to be a NIC Rx domain. When creating a mirror action, the destination of the mirror target should be specified with action type RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR
.
set sample_actions 1 port_representor port_id 0xffff / end
flow indirect_action 0 create transfer list actions sample ratio 1 index 0 / jump group [n] / end
...
# Use this indirect action list in the rule creation.
struct rte_flow_indir_action_conf indir_conf = { .transfer = 1, };
struct rte_flow_action sample_actions[6] = {0};
struct rte_flow_action_sample sample[2] = {0};
struct rte_flow_action_ethdev port = {0};
struct rte_flow_action_jump jump = {0};
struct rte_flow_action actions[4] = {0};
/* Set mirror target action, only UINT16_MAX for E-Switch manager is supported */
port.port_id = UINT16_MAX;
sample_actions[0].conf = &port;
sample_actions[0].type = RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR;
sample_actions[1].type = RTE_FLOW_ACTION_TYPE_END;
sample[0].ratio = 1;
sample[0].actions = sample_actions;
actions[0].type = RTE_FLOW_ACTION_TYPE_SAMPLE;
actions[0].conf = sample;
/* Set original destination */
jump.group_id = n;
actions[1].conf = &jump;
actions[1].type = RTE_FLOW_ACTION_TYPE_JUMP;
actions[2].type = RTE_FLOW_ACTION_TYPE_END;
handle = rte_flow_action_list_handle_create(port_id, &indir_conf, actions, &flow_error);