summaryrefslogtreecommitdiffstats
path: root/src/debug.h
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-01-07 10:00:16 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-01-07 10:00:16 +0200
commit429c0e40dae1b1d587ebdea18f92b57b53996c86 (patch)
treef7822ee1d100b3bdadea4f320ddde38ca579240e /src/debug.h
parentc068b9e06666534ac3a426cfe2eb8c3c844eaa95 (diff)
Added --send-debug-pkt
Moved code from main_dpdk.cpp to new files.
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/debug.h b/src/debug.h
new file mode 100644
index 00000000..fe37c186
--- /dev/null
+++ b/src/debug.h
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2016-2016 Cisco Systems, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#ifndef _TREX_DEBUG_H
+#define _TREX_DEBUG_H
+#include "mbuf.h"
+
+class CTrexDebug {
+ rte_mbuf_t *m_test;
+ uint64_t m_test_drop;
+ CPhyEthIF *m_ports;
+ uint32_t m_max_ports;
+
+ int rcv_send(int port,int queue_id);
+ int rcv_send_all(int queue_id);
+ rte_mbuf_t *create_pkt(uint8_t *pkt,int pkt_size);
+ rte_mbuf_t *create_pkt_indirect(rte_mbuf_t *m, uint32_t new_pkt_size);
+ rte_mbuf_t *create_udp_pkt();
+ rte_mbuf_t *create_udp_9k_pkt();
+ int set_promisc_all(bool enable);
+ int test_send_pkts(rte_mbuf_t *, uint16_t queue_id, int pkt, int port);
+ rte_mbuf_t *create_test_pkt(int proto);
+
+ public:
+ CTrexDebug(CPhyEthIF *m_ports_arg, int max_ports);
+ int test_send(uint pkt_type);
+};
+
+#endif