This patch renames octeon end point driver from octeontx_ep to octeon_ep Signed-off-by: Sathesh B Edara <sed...@marvell.com> --- 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 <pna...@marvell.com> M: Radha Mohan Chintakuntla <rad...@marvell.com> M: Veerasenareddy Burru <vbu...@marvell.com> 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 <ma...@nvidia.com> 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