src/dpdk/drivers/net/ice/base/ice_vlan_mode.c
static enum ice_status ice_set_svm(struct ice_hw *hw)
{
	struct ice_aqc_set_vlan_mode *set_params;
	enum ice_status status;

	status = ice_aq_set_port_params(hw->port_info, 0, false, false, false, NULL);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to set port parameters for single VLAN mode\n");
		return status;
	}

	set_params = (struct ice_aqc_set_vlan_mode *)
		ice_malloc(hw, sizeof(*set_params));
	if (!set_params)
		return ICE_ERR_NO_MEMORY;

	/* default configuration for SVM configurations */
	set_params->l2tag_prio_tagging = ICE_AQ_VLAN_PRIO_TAG_INNER_CTAG;
	set_params->rdma_packet = ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING;
	set_params->mng_vlan_prot_id = ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER;

	status = ice_aq_set_vlan_mode(hw, set_params);
	if (status)
		ice_debug(hw, ICE_DBG_INIT, "Failed to configure port in single VLAN mode\n");

	ice_free(hw, set_params);
	return status;
}
/**
 * ice_set_svm - set single VLAN mode
 * @hw: pointer to the HW structure
 */
set single VLAN mode
@hw: pointer to the HW structure
set single VLAN mode @hw : pointer to the HW structure
static enum ice_status ice_set_svm(struct ice_hw *hw)
{
	struct ice_aqc_set_vlan_mode *set_params;
	enum ice_status status;
	status = ice_aq_set_port_params(hw->port_info, 0, false, false, false, NULL);
	if (status) {
		ice_debug(hw, ICE_DBG_INIT, "Failed to set port parameters for single VLAN mode\n");
		return status;
	}
	set_params = (struct ice_aqc_set_vlan_mode *)
		ice_malloc(hw, sizeof(*set_params));
	if (!set_params)
		return ICE_ERR_NO_MEMORY;
	set_params->l2tag_prio_tagging = ICE_AQ_VLAN_PRIO_TAG_INNER_CTAG;
	set_params->rdma_packet = ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING;
	set_params->mng_vlan_prot_id = ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER;
	status = ice_aq_set_vlan_mode(hw, set_params);
	if (status)
		ice_debug(hw, ICE_DBG_INIT, "Failed to configure port in single VLAN mode\n");
	ice_free(hw, set_params);
	return status;
}
static enum ice_status ice_set_svm ( struct ice_hw * hw ) { struct ice_aqc_set_vlan_mode * set_params ; enum ice_status status ; status = ice_aq_set_port_params ( hw -> port_info , 0 , false , false , false , NULL ) ; if ( status ) { ice_debug ( hw , ICE_DBG_INIT , " \n " ) ; return status ; } set_params = ( struct ice_aqc_set_vlan_mode * ) ice_malloc ( hw , sizeof ( * set_params ) ) ; if ( ! set_params ) return ICE_ERR_NO_MEMORY ; set_params -> l2tag_prio_tagging = ICE_AQ_VLAN_PRIO_TAG_INNER_CTAG ; set_params -> rdma_packet = ICE_AQ_SVM_VLAN_RDMA_PKT_FLAG_SETTING ; set_params -> mng_vlan_prot_id = ICE_AQ_VLAN_MNG_PROTOCOL_ID_INNER ; status = ice_aq_set_vlan_mode ( hw , set_params ) ; if ( status ) ice_debug ( hw , ICE_DBG_INIT , " \n " ) ; ice_free ( hw , set_params ) ; return status ; }
ice_set_svm - set single VLAN mode
 @hw: pointer to the HW structure
ice_set_svm - set single VLAN mode @hw : pointer to the HW structure
/* default configuration for SVM configurations */