X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Frxonly.c;h=a93d80612721313c27f376ace6c06b4696b2f7ad;hb=66ba596aa6b5750b16549a322ef9a09fa7f0e3f6;hp=9acc4c6c5d746b34d958dc2c3d7e95b4e2353cfb;hpb=144ba8891247ccef492ca2323e1a07be62536e74;p=dpdk.git diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c index 9acc4c6c5d..a93d806127 100644 --- a/app/test-pmd/rxonly.c +++ b/app/test-pmd/rxonly.c @@ -1,34 +1,5 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 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-2014 Intel Corporation */ #include @@ -49,14 +20,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -67,6 +36,7 @@ #include #include #include +#include #include "testpmd.h" @@ -100,9 +70,7 @@ pkt_burst_receive(struct fwd_stream *fs) uint64_t start_tsc; uint64_t end_tsc; uint64_t core_cycles; -#endif -#ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES start_tsc = rte_rdtsc(); #endif @@ -124,7 +92,7 @@ pkt_burst_receive(struct fwd_stream *fs) */ if (verbose_level > 0) printf("port %u/queue %u: received %u packets\n", - (unsigned) fs->rx_port, + fs->rx_port, (unsigned) fs->rx_queue, (unsigned) nb_rx); for (i = 0; i < nb_rx; i++) { @@ -147,7 +115,8 @@ pkt_burst_receive(struct fwd_stream *fs) if (ol_flags & PKT_RX_RSS_HASH) { printf(" - RSS hash=0x%x", (unsigned) mb->hash.rss); printf(" - RSS queue=0x%x",(unsigned) fs->rx_queue); - } else if (ol_flags & PKT_RX_FDIR) { + } + if (ol_flags & PKT_RX_FDIR) { printf(" - FDIR matched "); if (ol_flags & PKT_RX_FDIR_ID) printf("ID=0x%x", @@ -159,6 +128,8 @@ pkt_burst_receive(struct fwd_stream *fs) printf("hash=0x%x ID=0x%x ", mb->hash.fdir.hash, mb->hash.fdir.id); } + if (ol_flags & PKT_RX_TIMESTAMP) + printf(" - timestamp %"PRIu64" ", mb->timestamp); if (ol_flags & PKT_RX_VLAN_STRIPPED) printf(" - VLAN tci=0x%x", mb->vlan_tci); if (ol_flags & PKT_RX_QINQ_STRIPPED) @@ -229,19 +200,8 @@ pkt_burst_receive(struct fwd_stream *fs) } printf(" - Receive queue=0x%x", (unsigned) fs->rx_queue); printf("\n"); - if (ol_flags != 0) { - unsigned rxf; - const char *name; - - for (rxf = 0; rxf < sizeof(mb->ol_flags) * 8; rxf++) { - if ((ol_flags & (1ULL << rxf)) == 0) - continue; - name = rte_get_rx_ol_flag_name(1ULL << rxf); - if (name == NULL) - continue; - printf(" %s\n", name); - } - } + rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf)); + printf(" ol_flags: %s\n", buf); rte_pktmbuf_free(mb); }