src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
int32_t
ulp_rte_of_set_vlan_pcp_act_handler(const struct rte_flow_action *action_item,
				    struct ulp_rte_parser_params *params)
{
	const struct rte_flow_action_of_set_vlan_pcp *vlan_pcp;
	uint8_t pcp;
	struct ulp_rte_act_prop *act = &params->act_prop;

	vlan_pcp = action_item->conf;
	if (vlan_pcp) {
		pcp = vlan_pcp->vlan_pcp;
		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_VLAN_PCP],
		       &pcp, BNXT_ULP_ACT_PROP_SZ_SET_VLAN_PCP);
		/* Update the hdr_bitmap with vlan vid */
		ULP_BITMAP_SET(params->act_bitmap.bits,
			       BNXT_ULP_ACTION_BIT_SET_VLAN_PCP);
		return BNXT_TF_RC_SUCCESS;
	}
	BNXT_TF_DBG(ERR, "Parse Error: Vlan pcp arg is invalid\n");
	return BNXT_TF_RC_ERROR;
}
/* Function to handle the parsing of RTE Flow action set vlan pcp. */
Function to handle the parsing of RTE Flow action set vlan pcp.
Function to handle the parsing of RTE Flow action set vlan pcp .
int32_t
ulp_rte_of_set_vlan_pcp_act_handler(const struct rte_flow_action *action_item,
				    struct ulp_rte_parser_params *params)
{
	const struct rte_flow_action_of_set_vlan_pcp *vlan_pcp;
	uint8_t pcp;
	struct ulp_rte_act_prop *act = &params->act_prop;
	vlan_pcp = action_item->conf;
	if (vlan_pcp) {
		pcp = vlan_pcp->vlan_pcp;
		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_VLAN_PCP],
		       &pcp, BNXT_ULP_ACT_PROP_SZ_SET_VLAN_PCP);
		ULP_BITMAP_SET(params->act_bitmap.bits,
			       BNXT_ULP_ACTION_BIT_SET_VLAN_PCP);
		return BNXT_TF_RC_SUCCESS;
	}
	BNXT_TF_DBG(ERR, "Parse Error: Vlan pcp arg is invalid\n");
	return BNXT_TF_RC_ERROR;
}
int32_t ulp_rte_of_set_vlan_pcp_act_handler ( const struct rte_flow_action * action_item , struct ulp_rte_parser_params * params ) { const struct rte_flow_action_of_set_vlan_pcp * vlan_pcp ; uint8_t pcp ; struct ulp_rte_act_prop * act = & params -> act_prop ; vlan_pcp = action_item -> conf ; if ( vlan_pcp ) { pcp = vlan_pcp -> vlan_pcp ; memcpy ( & act -> act_details [ BNXT_ULP_ACT_PROP_IDX_SET_VLAN_PCP ] , & pcp , BNXT_ULP_ACT_PROP_SZ_SET_VLAN_PCP ) ; ULP_BITMAP_SET ( params -> act_bitmap . bits , BNXT_ULP_ACTION_BIT_SET_VLAN_PCP ) ; return BNXT_TF_RC_SUCCESS ; } BNXT_TF_DBG ( ERR , " \n " ) ; return BNXT_TF_RC_ERROR ; }
Function to handle the parsing of RTE Flow action set vlan pcp.
Function to handle the parsing of RTE Flow action set vlan pcp .
/* Update the hdr_bitmap with vlan vid */