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 7A84DA0093; Mon, 13 Jun 2022 09:12:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61C9C4021E; Mon, 13 Jun 2022 09:12:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id ECC1240156 for ; Tue, 7 Jun 2022 16:17:56 +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 257DJMcL011489; Tue, 7 Jun 2022 07:15:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=RIoEKGqZtBGfPOcgia5rHPWZp2kJgIgsL1NmCazUl2o=; b=fMhMWH0+rwF+u+3YzOr7YWSTftQ/jbMJ2q7SYs61R0UrkT5cP6Zrap6dFJK68BFSLrU+ rTy6m3Y8UnTDdTpGmWUqX8oft144RIrFczzWBXba1cnEhP+A7YNwU30M51nQW0xHWhhS Swqg09tYqbohggmAY9gwD41WLnfHqlvHsjs/28fcl30Gs7okzT6JhXHoX09u7aSazR6c DCm32SGt+RdSFK8iLcPlZZsrVV6Jr4TOVGgRZdnZ0SpDPf+yMpEOzyGn0PbH7tv679sM +lGxBACSjEP+akqZwliTjAMrXn2LIKn4TBz6DjReIHdjRbKVNUuAccIfvMszYueofvUL ww== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3gg6wqamjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 07 Jun 2022 07:15:53 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 7 Jun 2022 07:15:51 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 7 Jun 2022 07:15:51 -0700 Received: from sburla-PowerEdge-T630.caveonetworks.com (unknown [10.106.27.217]) by maili.marvell.com (Postfix) with ESMTP id 7C52B3F7059; Tue, 7 Jun 2022 07:15:51 -0700 (PDT) From: Sathesh B Edara To: , , , "Thomas Monjalon" , Nalla Pradeep , "Radha Mohan Chintakuntla" , Veerasenareddy Burru , Ray Kinsella CC: Subject: [PATCH] drivers: rename octeon ep PMD Date: Tue, 7 Jun 2022 07:15:46 -0700 Message-ID: <20220607141546.28848-1-sedara@marvell.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: lAhDNM3_UIrBs1ES_p8fv6Ub_-kucf0t X-Proofpoint-GUID: lAhDNM3_UIrBs1ES_p8fv6Ub_-kucf0t 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-07_06,2022-06-07_02,2022-02-23_01 X-Mailman-Approved-At: Mon, 13 Jun 2022 09:12:51 +0200 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 This patch renames octeon end point driver from octeontx_ep to octeon_ep Signed-off-by: Sathesh B Edara --- MAINTAINERS | 6 +- .../{octeontx_ep.ini => octeon_ep.ini} | 2 +- doc/guides/nics/index.rst | 2 +- .../nics/{octeontx_ep.rst => octeon_ep.rst} | 2 +- drivers/net/meson.build | 2 +- .../{octeontx_ep => octeon_ep}/meson.build | 0 .../{octeontx_ep => octeon_ep}/otx2_ep_vf.c | 0 .../{octeontx_ep => octeon_ep}/otx2_ep_vf.h | 0 .../otx_ep_common.h | 0 .../otx_ep_ethdev.c | 67 +++++++++++++++++++ .../{octeontx_ep => octeon_ep}/otx_ep_rxtx.c | 0 .../{octeontx_ep => octeon_ep}/otx_ep_rxtx.h | 0 .../{octeontx_ep => octeon_ep}/otx_ep_vf.c | 0 .../{octeontx_ep => octeon_ep}/otx_ep_vf.h | 0 .../{octeontx_ep => octeon_ep}/version.map | 0 15 files changed, 74 insertions(+), 7 deletions(-) rename doc/guides/nics/features/{octeontx_ep.ini => octeon_ep.ini} (75%) rename doc/guides/nics/{octeontx_ep.rst => octeon_ep.rst} (93%) rename drivers/net/{octeontx_ep => octeon_ep}/meson.build (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx2_ep_vf.c (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx2_ep_vf.h (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx_ep_common.h (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx_ep_ethdev.c (86%) rename drivers/net/{octeontx_ep => octeon_ep}/otx_ep_rxtx.c (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx_ep_rxtx.h (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx_ep_vf.c (100%) rename drivers/net/{octeontx_ep => octeon_ep}/otx_ep_vf.h (100%) rename drivers/net/{octeontx_ep => octeon_ep}/version.map (100%) diff --git a/MAINTAINERS b/MAINTAINERS index f34f6fa2e9..01c0c5ee5e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -798,9 +798,9 @@ M: Nalla Pradeep M: Radha Mohan Chintakuntla M: Veerasenareddy Burru T: git://dpdk.org/next/dpdk-next-net-mrvl -F: drivers/net/octeontx_ep/ -F: doc/guides/nics/features/octeontx_ep.ini -F: doc/guides/nics/octeontx_ep.rst +F: drivers/net/octeon_ep/ +F: doc/guides/nics/features/octeon_ep.ini +F: doc/guides/nics/octeon_ep.rst Mellanox mlx4 M: Matan Azrad diff --git a/doc/guides/nics/features/octeontx_ep.ini b/doc/guides/nics/features/octeon_ep.ini similarity index 75% rename from doc/guides/nics/features/octeontx_ep.ini rename to doc/guides/nics/features/octeon_ep.ini index d1453f5bee..141d918466 100644 --- a/doc/guides/nics/features/octeontx_ep.ini +++ b/doc/guides/nics/features/octeon_ep.ini @@ -1,5 +1,5 @@ ; -; Supported features of the 'octeontx_ep' network poll mode driver. +; Supported features of the 'octeon_ep' network poll mode driver. ; ; Refer to default.ini for the full list of available PMD features. ; diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index f48e9f815c..f80906a97d 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -52,7 +52,7 @@ Network Interface Controller Drivers ngbe null octeontx - octeontx_ep + octeon_ep pfe qede sfc_efx diff --git a/doc/guides/nics/octeontx_ep.rst b/doc/guides/nics/octeon_ep.rst similarity index 93% rename from doc/guides/nics/octeontx_ep.rst rename to doc/guides/nics/octeon_ep.rst index 2ec8a034b5..53610d7463 100644 --- a/doc/guides/nics/octeontx_ep.rst +++ b/doc/guides/nics/octeon_ep.rst @@ -4,7 +4,7 @@ OCTEON TX EP Poll Mode driver ============================= -The OCTEON TX EP ETHDEV PMD (**librte_pmd_octeontx_ep**) provides poll mode +The OCTEON TX EP ETHDEV PMD (**librte_pmd_octeon_ep**) provides poll mode ethdev driver support for the virtual functions (VF) of **Marvell OCTEON 9** and **Cavium OCTEON TX** families of adapters in SR-IOV context. diff --git a/drivers/net/meson.build b/drivers/net/meson.build index e35652fe63..37919eaf8b 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -45,7 +45,7 @@ drivers = [ 'ngbe', 'null', 'octeontx', - 'octeontx_ep', + 'octeon_ep', 'pcap', 'pfe', 'qede', diff --git a/drivers/net/octeontx_ep/meson.build b/drivers/net/octeon_ep/meson.build similarity index 100% rename from drivers/net/octeontx_ep/meson.build rename to drivers/net/octeon_ep/meson.build diff --git a/drivers/net/octeontx_ep/otx2_ep_vf.c b/drivers/net/octeon_ep/otx2_ep_vf.c similarity index 100% rename from drivers/net/octeontx_ep/otx2_ep_vf.c rename to drivers/net/octeon_ep/otx2_ep_vf.c diff --git a/drivers/net/octeontx_ep/otx2_ep_vf.h b/drivers/net/octeon_ep/otx2_ep_vf.h similarity index 100% rename from drivers/net/octeontx_ep/otx2_ep_vf.h rename to drivers/net/octeon_ep/otx2_ep_vf.h diff --git a/drivers/net/octeontx_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h similarity index 100% rename from drivers/net/octeontx_ep/otx_ep_common.h rename to drivers/net/octeon_ep/otx_ep_common.h diff --git a/drivers/net/octeontx_ep/otx_ep_ethdev.c b/drivers/net/octeon_ep/otx_ep_ethdev.c similarity index 86% rename from drivers/net/octeontx_ep/otx_ep_ethdev.c rename to drivers/net/octeon_ep/otx_ep_ethdev.c index 806add246b..adab758966 100644 --- a/drivers/net/octeontx_ep/otx_ep_ethdev.c +++ b/drivers/net/octeon_ep/otx_ep_ethdev.c @@ -337,6 +337,70 @@ otx_ep_tx_queue_release(struct rte_eth_dev *dev, uint16_t q_no) otx_ep_delete_iqs(tq->otx_ep_dev, tq->q_no); } +static int +otx_ep_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete) +{ + RTE_SET_USED(wait_to_complete); + + if (!eth_dev->data->dev_started) + return 0; + struct rte_eth_link link; + + memset(&link, 0, sizeof(link)); + link.link_status = RTE_ETH_LINK_UP; + link.link_speed = RTE_ETH_SPEED_NUM_10G; + link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX; + return rte_eth_linkstatus_set(eth_dev, &link); +} + +static int otx_ep_dev_stats_get(struct rte_eth_dev *eth_dev, + struct rte_eth_stats *stats) +{ + struct otx_ep_device *otx_epvf = OTX_EP_DEV(eth_dev); + struct otx_ep_iq_stats *ostats; + struct otx_ep_droq_stats *istats; + uint32_t i; + + memset(stats, 0, sizeof(struct rte_eth_stats)); + + for (i = 0; i < otx_epvf->nb_tx_queues; i++) { + ostats = &otx_epvf->instr_queue[i]->stats; + stats->q_opackets[i] = ostats->tx_pkts; + stats->q_obytes[i] = ostats->tx_bytes; + stats->opackets += ostats->tx_pkts; + stats->obytes += ostats->tx_bytes; + stats->oerrors += ostats->instr_dropped; + } + for (i = 0; i < otx_epvf->nb_rx_queues; i++) { + istats = &otx_epvf->droq[i]->stats; + stats->q_ipackets[i] = istats->pkts_received; + stats->q_ibytes[i] = istats->bytes_received; + stats->q_errors[i] = istats->rx_err; + stats->ipackets += istats->pkts_received; + stats->ibytes += istats->bytes_received; + stats->imissed += istats->rx_alloc_failure; + stats->ierrors += istats->rx_err; + stats->rx_nombuf += istats->rx_alloc_failure; + } + return 0; +} + +static int otx_ep_dev_stats_reset(struct rte_eth_dev *dev) +{ + struct otx_ep_device *otx_epvf = OTX_EP_DEV(dev); + uint32_t i; + + for (i = 0; i < otx_epvf->nb_tx_queues; i++) + memset(&otx_epvf->instr_queue[i]->stats, 0, + sizeof(struct otx_ep_iq_stats)); + + for (i = 0; i < otx_epvf->nb_rx_queues; i++) + memset(&otx_epvf->droq[i]->stats, 0, + sizeof(struct otx_ep_droq_stats)); + + return 0; +} + /* Define our ethernet definitions */ static const struct eth_dev_ops otx_ep_eth_dev_ops = { .dev_configure = otx_ep_dev_configure, @@ -347,6 +411,9 @@ static const struct eth_dev_ops otx_ep_eth_dev_ops = { .tx_queue_setup = otx_ep_tx_queue_setup, .tx_queue_release = otx_ep_tx_queue_release, .dev_infos_get = otx_ep_dev_info_get, + .link_update = otx_ep_link_update, + .stats_get = otx_ep_dev_stats_get, + .stats_reset = otx_ep_dev_stats_reset, }; static int diff --git a/drivers/net/octeontx_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c similarity index 100% rename from drivers/net/octeontx_ep/otx_ep_rxtx.c rename to drivers/net/octeon_ep/otx_ep_rxtx.c diff --git a/drivers/net/octeontx_ep/otx_ep_rxtx.h b/drivers/net/octeon_ep/otx_ep_rxtx.h similarity index 100% rename from drivers/net/octeontx_ep/otx_ep_rxtx.h rename to drivers/net/octeon_ep/otx_ep_rxtx.h diff --git a/drivers/net/octeontx_ep/otx_ep_vf.c b/drivers/net/octeon_ep/otx_ep_vf.c similarity index 100% rename from drivers/net/octeontx_ep/otx_ep_vf.c rename to drivers/net/octeon_ep/otx_ep_vf.c diff --git a/drivers/net/octeontx_ep/otx_ep_vf.h b/drivers/net/octeon_ep/otx_ep_vf.h similarity index 100% rename from drivers/net/octeontx_ep/otx_ep_vf.h rename to drivers/net/octeon_ep/otx_ep_vf.h diff --git a/drivers/net/octeontx_ep/version.map b/drivers/net/octeon_ep/version.map similarity index 100% rename from drivers/net/octeontx_ep/version.map rename to drivers/net/octeon_ep/version.map -- 2.17.1