src/dpdk/drivers/net/ice/base/ice_common.c
enum ice_status ice_get_link_status(struct ice_port_info *pi, bool *link_up)
{
	struct ice_phy_info *phy_info;
	enum ice_status status = ICE_SUCCESS;

	if (!pi || !link_up)
		return ICE_ERR_PARAM;

	phy_info = &pi->phy;

	if (phy_info->get_link_info) {
		status = ice_update_link_info(pi);

		if (status)
			ice_debug(pi->hw, ICE_DBG_LINK, "get link status error, status = %d\n",
				  status);
	}

	*link_up = phy_info->link_info.link_info & ICE_AQ_LINK_UP;

	return status;
}
/**
 * ice_get_link_status - get status of the HW network link
 * @pi: port information structure
 * @link_up: pointer to bool (true/false = linkup/linkdown)
 *
 * Variable link_up is true if link is up, false if link is down.
 * The variable link_up is invalid if status is non zero. As a
 * result of this call, link status reporting becomes enabled
 */
get status of the HW network link
@pi: port information structure
@link_up: pointer to bool (true/false = linkup/linkdown)

Variable link_up is true if link is up, false if link is down.
The variable link_up is invalid if status is non zero. As a
result of this call, link status reporting becomes enabled
get status of the HW network link @pi : port information structure @link_up : pointer to bool ( true / false = linkup / linkdown ) Variable link_up is true if link is up false if link is down . The variable link_up is invalid if status is non zero . As a result of this call link status reporting becomes enabled
enum ice_status ice_get_link_status(struct ice_port_info *pi, bool *link_up)
{
	struct ice_phy_info *phy_info;
	enum ice_status status = ICE_SUCCESS;
	if (!pi || !link_up)
		return ICE_ERR_PARAM;
	phy_info = &pi->phy;
	if (phy_info->get_link_info) {
		status = ice_update_link_info(pi);
		if (status)
			ice_debug(pi->hw, ICE_DBG_LINK, "get link status error, status = %d\n",
				  status);
	}
	*link_up = phy_info->link_info.link_info & ICE_AQ_LINK_UP;
	return status;
}
enum ice_status ice_get_link_status ( struct ice_port_info * pi , bool * link_up ) { struct ice_phy_info * phy_info ; enum ice_status status = ICE_SUCCESS ; if ( ! pi || ! link_up ) return ICE_ERR_PARAM ; phy_info = & pi -> phy ; if ( phy_info -> get_link_info ) { status = ice_update_link_info ( pi ) ; if ( status ) ice_debug ( pi -> hw , ICE_DBG_LINK , " \n " , status ) ; } * link_up = phy_info -> link_info . link_info & ICE_AQ_LINK_UP ; return status ; }
ice_get_link_status - get status of the HW network link
 @pi: port information structure
 @link_up: pointer to bool (true/false = linkup/linkdown)
ice_get_link_status - get status of the HW network link @pi : port information structure @link_up : pointer to bool ( true / false = linkup / linkdown )