X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fethtool%2Fethtool-app%2Fethapp.c;h=0c3f1f6e1473f047d7a6507eaf728b7c086e80f6;hb=2b82ef4861c0;hp=2ed4796dd720b663453914d0446f238d4a9c77cb;hpb=c98e8f3932d88f77c7f1acd7551406200795c5aa;p=dpdk.git diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c index 2ed4796dd7..0c3f1f6e14 100644 --- a/examples/ethtool/ethtool-app/ethapp.c +++ b/examples/ethtool/ethtool-app/ethapp.c @@ -1,34 +1,5 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2015 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2015 Intel Corporation */ #include @@ -177,6 +148,7 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params, int id_port; for (id_port = 0; id_port < rte_eth_dev_count(); id_port++) { + memset(&info, 0, sizeof(info)); if (rte_ethtool_get_drvinfo(id_port, &info)) { printf("Error getting info for port %i\n", id_port); return; @@ -184,6 +156,8 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params, printf("Port %i driver: %s (ver: %s)\n", id_port, info.driver, info.version ); + printf("firmware-version: %s\n", info.fw_version); + printf("bus-info: %s\n", info.bus_info); } } @@ -535,7 +509,6 @@ static void pcmd_portstats_callback(__rte_unused void *ptr_params, } stat = rte_ethtool_net_get_stats64(params->port, &stat_info); if (stat == 0) { - /* Most of rte_eth_stats is deprecated.. */ printf("Port %i stats\n", params->port); printf(" In: %" PRIu64 " (%" PRIu64 " bytes)\n" " Out: %"PRIu64" (%"PRIu64 " bytes)\n"