src/dpdk/drivers/net/ice/base/ice_vlan_mode.c
static enum ice_status ice_set_dvm(struct ice_hw *hw)
{
	struct ice_aqc_set_vlan_mode params = { 0 };
	enum ice_status status;

	params.l2tag_prio_tagging = ICE_AQ_VLAN_PRIO_TAG_OUTER_CTAG;
	params.rdma_packet = ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING;
	params.mng_vlan_prot_id = ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER;

	status = ice_aq_set_vlan_mode(hw, &params);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to set double VLAN mode parameters, status %d\n",
			  status);
		return status;
	}

	status = ice_dvm_update_dflt_recipes(hw);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to update default recipes for double VLAN mode, status %d\n",
			  status);
		return status;
	}

	status = ice_aq_set_port_params(hw->port_info, 0, false, false, true,
					NULL);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to set port in double VLAN mode, status %d\n",
			  status);
		return status;
	}

	return ICE_SUCCESS;
}
/**
 * ice_set_dvm - sets up software and hardware for double VLAN mode
 * @hw: pointer to the hardware structure
 */
sets up software and hardware for double VLAN mode
@hw: pointer to the hardware structure
sets up software and hardware for double VLAN mode @hw : pointer to the hardware structure
static enum ice_status ice_set_dvm(struct ice_hw *hw)
{
	struct ice_aqc_set_vlan_mode params = { 0 };
	enum ice_status status;
	params.l2tag_prio_tagging = ICE_AQ_VLAN_PRIO_TAG_OUTER_CTAG;
	params.rdma_packet = ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING;
	params.mng_vlan_prot_id = ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER;
	status = ice_aq_set_vlan_mode(hw, &params);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to set double VLAN mode parameters, status %d\n",
			  status);
		return status;
	}
	status = ice_dvm_update_dflt_recipes(hw);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to update default recipes for double VLAN mode, status %d\n",
			  status);
		return status;
	}
	status = ice_aq_set_port_params(hw->port_info, 0, false, false, true,
					NULL);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to set port in double VLAN mode, status %d\n",
			  status);
		return status;
	}
	return ICE_SUCCESS;
}
static enum ice_status ice_set_dvm ( struct ice_hw * hw ) { struct ice_aqc_set_vlan_mode params = { 0 } ; enum ice_status status ; params . l2tag_prio_tagging = ICE_AQ_VLAN_PRIO_TAG_OUTER_CTAG ; params . rdma_packet = ICE_AQ_DVM_VLAN_RDMA_PKT_FLAG_SETTING ; params . mng_vlan_prot_id = ICE_AQ_VLAN_MNG_PROTOCOL_ID_OUTER ; status = ice_aq_set_vlan_mode ( hw , & params ) ; if ( status ) { ice_debug ( hw , ICE_DBG_INIT , " \n " , status ) ; return status ; } status = ice_dvm_update_dflt_recipes ( hw ) ; if ( status ) { ice_debug ( hw , ICE_DBG_INIT , " \n " , status ) ; return status ; } status = ice_aq_set_port_params ( hw -> port_info , 0 , false , false , true , NULL ) ; if ( status ) { ice_debug ( hw , ICE_DBG_INIT , " \n " , status ) ; return status ; } return ICE_SUCCESS ; }
ice_set_dvm - sets up software and hardware for double VLAN mode
 @hw: pointer to the hardware structure
ice_set_dvm - sets up software and hardware for double VLAN mode @hw : pointer to the hardware structure