+ case RTE_FLOW_ACTION_TYPE_PF:
+ req_act |= OTX2_FLOW_ACT_PF;
+ pf_func &= (0xfc00);
+ break;
+
+ case RTE_FLOW_ACTION_TYPE_VF:
+ vf_act = (const struct rte_flow_action_vf *)
+ actions->conf;
+ req_act |= OTX2_FLOW_ACT_VF;
+ if (vf_act->original == 0) {
+ vf_id = vf_act->id & RVU_PFVF_FUNC_MASK;
+ if (vf_id >= hw->maxvf) {
+ errmsg = "invalid vf specified";
+ errcode = EINVAL;
+ goto err_exit;
+ }
+ pf_func &= (0xfc00);
+ pf_func = (pf_func | (vf_id + 1));
+ }
+ break;
+
+ case RTE_FLOW_ACTION_TYPE_PORT_ID:
+ port_act = (const struct rte_flow_action_port_id *)
+ actions->conf;
+ port_id = port_act->id;
+ if (rte_eth_dev_get_name_by_port(port_id, if_name)) {
+ errmsg = "Name not found for output port id";
+ errcode = EINVAL;
+ goto err_exit;
+ }
+ eth_dev = rte_eth_dev_allocated(if_name);
+ if (!eth_dev) {
+ errmsg = "eth_dev not found for output port id";
+ errcode = EINVAL;
+ goto err_exit;
+ }
+ if (!otx2_ethdev_is_same_driver(eth_dev)) {
+ errmsg = "Output port id unsupported type";
+ errcode = ENOTSUP;
+ goto err_exit;
+ }
+ if (!otx2_dev_is_vf(otx2_eth_pmd_priv(eth_dev))) {
+ errmsg = "Output port should be VF";
+ errcode = ENOTSUP;
+ goto err_exit;
+ }
+ vf_id = otx2_eth_pmd_priv(eth_dev)->vf;
+ if (vf_id >= hw->maxvf) {
+ errmsg = "Invalid vf for output port";
+ errcode = EINVAL;
+ goto err_exit;
+ }
+ pf_id = otx2_eth_pmd_priv(eth_dev)->pf;
+ if (pf_id != hw->pf) {
+ errmsg = "Output port unsupported PF";
+ errcode = ENOTSUP;
+ goto err_exit;
+ }
+ pf_func &= (0xfc00);
+ pf_func = (pf_func | (vf_id + 1));
+ req_act |= OTX2_FLOW_ACT_VF;
+ break;
+