X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=test%2Ftest%2Ftest_pmd_ring.c;h=2196201259e9b069a51949270383635070c1ad6e;hb=2925e0c190f57dccf31b5b716f50a83fd469d123;hp=2cdf60d10332c3e22e045dc779b855414e02f496;hpb=7d3b1ec47fae5b2d972e05d0ee37bb7a1731b085;p=dpdk.git diff --git a/test/test/test_pmd_ring.c b/test/test/test_pmd_ring.c index 2cdf60d103..2196201259 100644 --- a/test/test/test_pmd_ring.c +++ b/test/test/test_pmd_ring.c @@ -1,34 +1,5 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-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) 2010-2015 Intel Corporation */ #include "test.h" @@ -428,7 +399,7 @@ test_pmd_ring(void) int port, cmdl_port0 = -1; uint8_t nb_ports; - nb_ports = rte_eth_dev_count(); + nb_ports = rte_eth_dev_count_avail(); printf("nb_ports=%d\n", (int)nb_ports); /* create the rings and eth_rings in the test code. @@ -502,7 +473,7 @@ test_pmd_ring(void) return -1; /* find a port created with the --vdev=net_ring0 command line option */ - for (port = 0; port < nb_ports; port++) { + RTE_ETH_FOREACH_DEV(port) { struct rte_eth_dev_info dev_info; rte_eth_dev_info_get(port, &dev_info);