diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-09-27 14:24:32 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-10-05 10:45:29 +0300 |
commit | efb8873783d59ae2e5a870a99f05e40ebf661c16 (patch) | |
tree | d1ad7c06f55a532ae1b1349a24bb0aa067def4a8 /src/debug.cpp | |
parent | 2223955b8eb3b378c1ab79e3735ed340852b04b9 (diff) |
pre test: Code review fixes
Diffstat (limited to 'src/debug.cpp')
-rw-r--r-- | src/debug.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/debug.cpp b/src/debug.cpp index 5abdbdc6..542d2fa1 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -27,7 +27,7 @@ #include <rte_pci.h> #include <rte_ethdev.h> #include <common/basic_utils.h> -#include "test_pkt_gen.h" +#include "pkt_gen.h" #include "main_dpdk.h" #include "debug.h" @@ -446,7 +446,7 @@ int CTrexDebug::test_send(uint pkt_type) { } else { ip_ver = 4; } - if (pkt_type > 3) { + if (pkt_type > D_PKT_TYPE_ARP) { printf("Packet type not supported\n"); exit(1); } @@ -462,6 +462,10 @@ int CTrexDebug::test_send(uint pkt_type) { case D_PKT_TYPE_TCP: l4_proto = IPPROTO_TCP; break; + case D_PKT_TYPE_ARP: + ip_ver = 1; + l4_proto = IPPROTO_TCP; //just to prevenet compilation warning. Not used in this case. + break; } d = create_test_pkt(ip_ver, l4_proto, 254, FLOW_STAT_PAYLOAD_IP_ID, 0); } |