From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 361C1A0544; Wed, 6 Jul 2022 02:29:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AAC942B72; Wed, 6 Jul 2022 02:29:02 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DC88C410E5 for ; Wed, 6 Jul 2022 02:28:58 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id 49A4420DDCB9; Tue, 5 Jul 2022 17:28:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 49A4420DDCB9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1657067338; bh=tIH5F+gIwYvMOXC4ZS2ukhWthkuEiS35yXRlv8pGZxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=r/gfl9OdEHg5El7L1p/ARHYv3NKKQYXqVlM+nzp+w/Uul6uhXiBhjiEsS0eRPsTZD yWG9F2CjZSj+yeo/lp1G81ZsLk8fr0Osb8grTQcl9vAy8aklO8eXDTJ97jR12EKddO nEiJzki2FrWPU8Rpoq2DEttoU40IQHIhWIf9FAl0= From: longli@linuxonhyperv.com To: Ferruh Yigit Cc: dev@dpdk.org, Ajay Sharma , Stephen Hemminger , Long Li Subject: [Patch v2 04/17] net/mana: add link update Date: Tue, 5 Jul 2022 17:28:35 -0700 Message-Id: <1657067328-18374-5-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1657067328-18374-1-git-send-email-longli@linuxonhyperv.com> References: <1657067328-18374-1-git-send-email-longli@linuxonhyperv.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: longli@microsoft.com Errors-To: dev-bounces@dpdk.org From: Long Li The carrier state is managed by the Azure host. MANA runs as a VF and always reports "up". Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/doc/guides/nics/features/mana.ini b/doc/guides/nics/features/mana.ini index b92a27374c..62554b0a0a 100644 --- a/doc/guides/nics/features/mana.ini +++ b/doc/guides/nics/features/mana.ini @@ -4,6 +4,7 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] +Link status = P Linux = Y Multiprocess aware = Y Usage doc = Y diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 5deea1b03a..8c6491f045 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -125,10 +125,27 @@ static const uint32_t *mana_supported_ptypes(struct rte_eth_dev *dev __rte_unuse return ptypes; } +static int mana_dev_link_update(struct rte_eth_dev *dev, + int wait_to_complete __rte_unused) +{ + struct rte_eth_link link; + + /* MANA has no concept of carrier state, always reporting UP */ + link = (struct rte_eth_link) { + .link_duplex = RTE_ETH_LINK_FULL_DUPLEX, + .link_autoneg = RTE_ETH_LINK_SPEED_FIXED, + .link_speed = RTE_ETH_SPEED_NUM_200G, + .link_status = RTE_ETH_LINK_UP, + }; + + return rte_eth_linkstatus_set(dev, &link); +} + const struct eth_dev_ops mana_dev_ops = { .dev_configure = mana_dev_configure, .dev_close = mana_dev_close, .dev_supported_ptypes_get = mana_supported_ptypes, + .link_update = mana_dev_link_update, }; const struct eth_dev_ops mana_dev_sec_ops = { -- 2.17.1