X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.h;h=2a266fd1b7bdeb89dbf14eb3d71a80016948bf58;hb=285fd1019333dce2d76477cc4cd2f488cba37412;hp=0b8e6241bfa4fa6f93d330635b78b121ecc90886;hpb=3c272b280a50d1d8ecbc848dc01ff82a34232e97;p=dpdk.git diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 0b8e6241bf..2a266fd1b7 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1,40 +1,12 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2017 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-2017 Intel Corporation */ #ifndef _TESTPMD_H_ #define _TESTPMD_H_ #include +#include #include #include @@ -348,8 +320,11 @@ extern struct queue_stats_mappings *rx_queue_stats_mappings; extern uint16_t nb_tx_queue_stats_mappings; extern uint16_t nb_rx_queue_stats_mappings; +extern uint8_t xstats_hide_zero; /**< Hide zero values for xstats display */ + /* globals used for configuration */ extern uint16_t verbose_level; /**< Drives messages being displayed, if any. */ +extern int testpmd_logtype; /**< Log type for testpmd logs */ extern uint8_t interactive; extern uint8_t auto_start; extern uint8_t tx_first; @@ -650,6 +625,8 @@ void tx_vlan_pvid_set(portid_t port_id, uint16_t vlan_id, int on); void set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value); +void set_xstats_hide_zero(uint8_t on_off); + void set_verbose_level(uint16_t vb_level); void set_tx_pkt_segments(unsigned *seg_lengths, unsigned nb_segs); void show_tx_pkt_segments(void); @@ -675,7 +652,7 @@ void stop_port(portid_t pid); void close_port(portid_t pid); void reset_port(portid_t pid); void attach_port(char *identifier); -void detach_port(uint8_t port_id); +void detach_port(portid_t port_id); int all_ports_stopped(void); int port_is_started(portid_t port_id); void pmd_test_exit(void); @@ -698,10 +675,6 @@ void port_rss_hash_conf_show(portid_t port_id, char rss_info[], int show_rss_key); void port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, uint hash_key_len); -void get_syn_filter(uint8_t port_id); -void get_ethertype_filter(uint8_t port_id, uint16_t index); -void get_2tuple_filter(uint8_t port_id, uint16_t index); -void get_5tuple_filter(uint8_t port_id, uint16_t index); int rx_queue_id_is_invalid(queueid_t rxq_id); int tx_queue_id_is_invalid(queueid_t txq_id); void setup_gro(const char *onoff, portid_t port_id); @@ -710,9 +683,9 @@ void show_gro(portid_t port_id); void setup_gso(const char *mode, portid_t port_id); /* Functions to manage the set of filtered Multicast MAC addresses */ -void mcast_addr_add(uint8_t port_id, struct ether_addr *mc_addr); -void mcast_addr_remove(uint8_t port_id, struct ether_addr *mc_addr); -void port_dcb_info_display(uint8_t port_id); +void mcast_addr_add(portid_t port_id, struct ether_addr *mc_addr); +void mcast_addr_remove(portid_t port_id, struct ether_addr *mc_addr); +void port_dcb_info_display(portid_t port_id); uint8_t *open_ddp_package_file(const char *file_path, uint32_t *size); int save_ddp_package_file(const char *file_path, uint8_t *buf, uint32_t size); @@ -746,4 +719,7 @@ int new_socket_id(unsigned int socket_id); #endif #endif /* __GCC__ */ +#define TESTPMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, testpmd_logtype, "testpmd: " fmt, ## args) + #endif /* _TESTPMD_H_ */