src/dpdk/drivers/net/ice/base/ice_vlan_mode.c
static bool ice_is_dvm_supported(struct ice_hw *hw)
{
	struct ice_aqc_get_vlan_mode get_vlan_mode = { 0 };
	enum ice_status status;
	bool pkg_supports_dvm;

	status = ice_pkg_get_supported_vlan_mode(hw, &pkg_supports_dvm);
	if (status) {
		ice_debug(hw, ICE_DBG_PKG, "Failed to get supported VLAN mode, status %d\n",
			  status);
		return false;
	}

	if (!pkg_supports_dvm)
		return false;

	/* If firmware returns success, then it supports DVM, else it only
	 * supports SVM
	 */
	status = ice_aq_get_vlan_mode(hw, &get_vlan_mode);
	if (status) {
		ice_debug(hw, ICE_DBG_NVM, "Failed to get VLAN mode, status %d\n",
			  status);
		return false;
	}

	return true;
}
/**
 * ice_is_dvm_supported - check if Double VLAN Mode is supported
 * @hw: pointer to the hardware structure
 *
 * Returns true if Double VLAN Mode (DVM) is supported and false if only Single
 * VLAN Mode (SVM) is supported. In order for DVM to be supported the DDP and
 * firmware must support it, otherwise only SVM is supported. This function
 * should only be called while the global config lock is held and after the
 * package has been successfully downloaded.
 */
check if Double VLAN Mode is supported
@hw: pointer to the hardware structure

Returns true if Double VLAN Mode (DVM) is supported and false if only Single
VLAN Mode (SVM) is supported. In order for DVM to be supported the DDP and
firmware must support it, otherwise only SVM is supported. This function
should only be called while the global config lock is held and after the
package has been successfully downloaded.
check if Double VLAN Mode is supported @hw : pointer to the hardware structure Returns true if Double VLAN Mode ( DVM ) is supported and false if only Single VLAN Mode ( SVM ) is supported . In order for DVM to be supported the DDP and firmware must support it otherwise only SVM is supported . This function should only be called while the global config lock is held and after the package has been successfully downloaded .
static bool ice_is_dvm_supported(struct ice_hw *hw)
{
	struct ice_aqc_get_vlan_mode get_vlan_mode = { 0 };
	enum ice_status status;
	bool pkg_supports_dvm;
	status = ice_pkg_get_supported_vlan_mode(hw, &pkg_supports_dvm);
	if (status) {
		ice_debug(hw, ICE_DBG_PKG, "Failed to get supported VLAN mode, status %d\n",
			  status);
		return false;
	}
	if (!pkg_supports_dvm)
		return false;
	status = ice_aq_get_vlan_mode(hw, &get_vlan_mode);
	if (status) {
		ice_debug(hw, ICE_DBG_NVM, "Failed to get VLAN mode, status %d\n",
			  status);
		return false;
	}
	return true;
}
static bool ice_is_dvm_supported ( struct ice_hw * hw ) { struct ice_aqc_get_vlan_mode get_vlan_mode = { 0 } ; enum ice_status status ; bool pkg_supports_dvm ; status = ice_pkg_get_supported_vlan_mode ( hw , & pkg_supports_dvm ) ; if ( status ) { ice_debug ( hw , ICE_DBG_PKG , " \n " , status ) ; return false ; } if ( ! pkg_supports_dvm ) return false ; status = ice_aq_get_vlan_mode ( hw , & get_vlan_mode ) ; if ( status ) { ice_debug ( hw , ICE_DBG_NVM , " \n " , status ) ; return false ; } return true ; }
ice_is_dvm_supported - check if Double VLAN Mode is supported
 @hw: pointer to the hardware structure
ice_is_dvm_supported - check if Double VLAN Mode is supported @hw : pointer to the hardware structure
/* If firmware returns success, then it supports DVM, else it only
	 * supports SVM
	 */