From patchwork Thu Jun 16 07:07:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 112842 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 373C5A00C3; Thu, 16 Jun 2022 09:10:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F5E342BF6; Thu, 16 Jun 2022 09:10:11 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id C858642BEA for ; Thu, 16 Jun 2022 09:10:09 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25G2AMm2013083 for ; Thu, 16 Jun 2022 00:10:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=vLQTelrklYU0ku0h3iWlzsd311IOE11ZDQDcPOUTy04=; b=CnhnCI0FfCfro5tNyhuS3ZCIK7j0YV6/3S3FXphjnZAAtgA8qD4iGrwk6VUlpp29WGoI vuBXdS0nQQoXom5z39OtA3prYZR7UfhiPAZXRhulbjI6d2rWl/MeVmZc8AMFVwBMbbX5 JScIfUgb4EH38dSHwfPpXh5gYMVdfkIQHnBoo8OfEuodyjlAhpJuL3wdH1bkPzmrXUdL sCxuVigC0gNllqlcKkMrMlalHgjOauhFbF5vqiQhycPh77BgRBSED1UAyNqaNDvnZ4ff kB8EPQhIxtWuDYesgZdG4Hvvm8gcc+7ikmsSe8oWJstJWU1dmCbjIxWcEqBXeu0NmlpJ Jw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3gq83yx522-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 Jun 2022 00:10:09 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 16 Jun 2022 00:09:49 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 16 Jun 2022 00:09:49 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 712133F7075; Thu, 16 Jun 2022 00:09:47 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: , Satananda Burla Subject: [PATCH 07/12] net/cnxk: add SDP link status Date: Thu, 16 Jun 2022 12:37:38 +0530 Message-ID: <20220616070743.30658-7-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220616070743.30658-1-ndabilpuram@marvell.com> References: <20220616070743.30658-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: O5WoUZO9l0_auZ6WeiA_r1bNeEzETuRM X-Proofpoint-GUID: O5WoUZO9l0_auZ6WeiA_r1bNeEzETuRM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-16_03,2022-06-15_01,2022-02-23_01 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: , Errors-To: dev-bounces@dpdk.org From: Satananda Burla Add SDP link status reporting Signed-off-by: Satananda Burla --- drivers/net/cnxk/cnxk_link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/cnxk/cnxk_link.c b/drivers/net/cnxk/cnxk_link.c index b1d59e3..127c9e7 100644 --- a/drivers/net/cnxk/cnxk_link.c +++ b/drivers/net/cnxk/cnxk_link.c @@ -13,7 +13,7 @@ cnxk_nix_toggle_flag_link_cfg(struct cnxk_eth_dev *dev, bool set) dev->flags &= ~CNXK_LINK_CFG_IN_PROGRESS_F; /* Update link info for LBK */ - if (!set && roc_nix_is_lbk(&dev->nix)) { + if (!set && (roc_nix_is_lbk(&dev->nix) || roc_nix_is_sdp(&dev->nix))) { struct rte_eth_link link; link.link_status = RTE_ETH_LINK_UP; @@ -124,10 +124,10 @@ cnxk_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete) RTE_SET_USED(wait_to_complete); memset(&link, 0, sizeof(struct rte_eth_link)); - if (!eth_dev->data->dev_started || roc_nix_is_sdp(&dev->nix)) + if (!eth_dev->data->dev_started) return 0; - if (roc_nix_is_lbk(&dev->nix)) { + if (roc_nix_is_lbk(&dev->nix) || roc_nix_is_sdp(&dev->nix)) { link.link_status = RTE_ETH_LINK_UP; link.link_speed = RTE_ETH_SPEED_NUM_100G; link.link_autoneg = RTE_ETH_LINK_FIXED;