src/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
int32_t
ulp_rte_of_set_vlan_vid_act_handler(const struct rte_flow_action *action_item,
				    struct ulp_rte_parser_params *params)
{
	const struct rte_flow_action_of_set_vlan_vid *vlan_vid;
	uint32_t vid;
	struct ulp_rte_act_prop *act = &params->act_prop;

	vlan_vid = action_item->conf;
	if (vlan_vid && vlan_vid->vlan_vid) {
		vid = vlan_vid->vlan_vid;
		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_VLAN_VID],
		       &vid, BNXT_ULP_ACT_PROP_SZ_SET_VLAN_VID);
		/* Update the hdr_bitmap with vlan vid */
		ULP_BITMAP_SET(params->act_bitmap.bits,
			       BNXT_ULP_ACTION_BIT_SET_VLAN_VID);
		return BNXT_TF_RC_SUCCESS;
	}
	BNXT_TF_DBG(ERR, "Parse Error: Vlan vid arg is invalid\n");
	return BNXT_TF_RC_ERROR;
}
/* Function to handle the parsing of RTE Flow action set vlan id. */
Function to handle the parsing of RTE Flow action set vlan id.
Function to handle the parsing of RTE Flow action set vlan id .
int32_t
ulp_rte_of_set_vlan_vid_act_handler(const struct rte_flow_action *action_item,
				    struct ulp_rte_parser_params *params)
{
	const struct rte_flow_action_of_set_vlan_vid *vlan_vid;
	uint32_t vid;
	struct ulp_rte_act_prop *act = &params->act_prop;
	vlan_vid = action_item->conf;
	if (vlan_vid && vlan_vid->vlan_vid) {
		vid = vlan_vid->vlan_vid;
		memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_VLAN_VID],
		       &vid, BNXT_ULP_ACT_PROP_SZ_SET_VLAN_VID);
		ULP_BITMAP_SET(params->act_bitmap.bits,
			       BNXT_ULP_ACTION_BIT_SET_VLAN_VID);
		return BNXT_TF_RC_SUCCESS;
	}
	BNXT_TF_DBG(ERR, "Parse Error: Vlan vid arg is invalid\n");
	return BNXT_TF_RC_ERROR;
}
int32_t ulp_rte_of_set_vlan_vid_act_handler ( const struct rte_flow_action * action_item , struct ulp_rte_parser_params * params ) { const struct rte_flow_action_of_set_vlan_vid * vlan_vid ; uint32_t vid ; struct ulp_rte_act_prop * act = & params -> act_prop ; vlan_vid = action_item -> conf ; if ( vlan_vid && vlan_vid -> vlan_vid ) { vid = vlan_vid -> vlan_vid ; memcpy ( & act -> act_details [ BNXT_ULP_ACT_PROP_IDX_SET_VLAN_VID ] , & vid , BNXT_ULP_ACT_PROP_SZ_SET_VLAN_VID ) ; ULP_BITMAP_SET ( params -> act_bitmap . bits , BNXT_ULP_ACTION_BIT_SET_VLAN_VID ) ; 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 id.
Function to handle the parsing of RTE Flow action set vlan id .
/* Update the hdr_bitmap with vlan vid */