From: Kishore Padmanabha Date: Mon, 6 Jul 2020 08:25:00 +0000 (+0530) Subject: net/bnxt: use VF VNIC if port action is for VF rep X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c32827d022019c67ef29a697753790f6fec8d676;p=dpdk.git net/bnxt: use VF VNIC if port action is for VF rep Fix to use the vf's vnic port for ingress flows whose port action is a vf rep port. Signed-off-by: Kishore Padmanabha Signed-off-by: Somnath Kotur Signed-off-by: Venkat Duvvuru Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c index 2f6a15d443..b943465977 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c @@ -1425,6 +1425,8 @@ ulp_rte_parser_act_port_set(struct ulp_rte_parser_params *param, uint16_t pid_s; uint32_t pid; struct ulp_rte_act_prop *act = ¶m->act_prop; + enum bnxt_ulp_intf_type port_type; + uint32_t vnic_type; /* Get the direction */ dir = ULP_COMP_FLD_IDX_RD(param, BNXT_ULP_CF_IDX_DIRECTION); @@ -1439,9 +1441,15 @@ ulp_rte_parser_act_port_set(struct ulp_rte_parser_params *param, &pid, BNXT_ULP_ACT_PROP_SZ_VPORT); } else { /* For ingress direction, fill vnic */ + port_type = ULP_COMP_FLD_IDX_RD(param, + BNXT_ULP_CF_IDX_ACT_PORT_TYPE); + if (port_type == BNXT_ULP_INTF_TYPE_VF_REP) + vnic_type = BNXT_ULP_VF_FUNC_VNIC; + else + vnic_type = BNXT_ULP_DRV_FUNC_VNIC; + if (ulp_port_db_default_vnic_get(param->ulp_ctx, ifindex, - BNXT_ULP_DRV_FUNC_VNIC, - &pid_s)) + vnic_type, &pid_s)) return BNXT_TF_RC_ERROR; pid = pid_s;