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 D73BFA00BE; Thu, 16 Jun 2022 11:25:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 609FC42C08; Thu, 16 Jun 2022 11:24:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 7202742C08 for ; Thu, 16 Jun 2022 11:24:47 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25G9D2kM009455 for ; Thu, 16 Jun 2022 02:24:45 -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=cj+bobBt5j27bm4BdS16cb82X5CY6Nz+66Sz4PBevxgYoIp+piw5K4I1PfwjEGMLtZiW M39szoPuGCmEXzMg4OC8DDSuzmZ8Rpovg3r9R0b1HPaTSmI87jsgbI83+uHS5gLma4dh cElgogsa1WDZJWStoRLz1Z3hj64G4OyCaDi6GxARmHnY44MGTZPoHI+YwOo9dFSgos+a 0XXuG2PU7bTTMUCFkx88LKj0hPIi2TkSSLZw6S8K0Ogwz0no9EV1wkjyegDHWFgsn5SO tsZoSM2OeEr71Lm8xmkfz01E9fd/XVL9SzHpB97Ou9R7cwvd7on6Oum0eC1FdDOet5NF eg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3gr1pmg1xt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 Jun 2022 02:24:45 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 16 Jun 2022 02:24:44 -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 02:24:44 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id AD4123F7075; Thu, 16 Jun 2022 02:24:41 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: , Satananda Burla Subject: [PATCH v2 07/12] net/cnxk: add SDP link status Date: Thu, 16 Jun 2022 14:54:15 +0530 Message-ID: <20220616092420.17861-7-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220616092420.17861-1-ndabilpuram@marvell.com> References: <20220616070743.30658-1-ndabilpuram@marvell.com> <20220616092420.17861-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: B4lxiq6GLtUbUBbNJcVLB3KmEhHT6Vew X-Proofpoint-GUID: B4lxiq6GLtUbUBbNJcVLB3KmEhHT6Vew 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_05,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; -- 2.8.4