summaryrefslogtreecommitdiffstats
path: root/src/debug.cpp
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-11-16 11:03:51 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-11-16 11:03:51 +0200
commit122f336ffde6d3fc74acc6861322328d778d3232 (patch)
tree2fa5d0889c66608296a1b0431f2289584b77c977 /src/debug.cpp
parent52b8755b842c4adbb8bf923798cc1fc4fd498ae4 (diff)
Fix trex-267 - allocation of ARP packets from wrong memory socket
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 8ec4f136..d0b7cf11 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -106,7 +106,7 @@ rte_mbuf_t *CTrexDebug::create_test_pkt(int ip_ver, uint16_t l4_proto, uint8_t t
0x07, 0x08, 0x50, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0a, 0x01, 0x02, 0x03, 0x04,
// bad - 0x03, 0x04, 0x06, 0x02, 0x20, 0x00, 0xBB, 0x79, 0x00, 0x00};
0x03, 0x04, 0x50, 0x02, 0x20, 0x00, 0xBB, 0x79, 0x00, 0x00};
- rte_mbuf_t *m = CGlobalInfo::pktmbuf_alloc(0, sizeof(test_pkt));
+ rte_mbuf_t *m = CGlobalInfo::pktmbuf_alloc_by_port(0, sizeof(test_pkt));
char *p = rte_pktmbuf_append(m, sizeof(test_pkt));
assert(p);
@@ -146,7 +146,7 @@ rte_mbuf_t *CTrexDebug::create_test_pkt(int ip_ver, uint16_t l4_proto, uint8_t t
utl_k12_pkt_format(stdout,pkt, pkt_size) ;
*/
- m = CGlobalInfo::pktmbuf_alloc(0, pkt_size);
+ m = CGlobalInfo::pktmbuf_alloc_by_port(0, pkt_size);
if ( unlikely(m == 0) ) {
printf("ERROR no packets \n");
return (NULL);
@@ -161,7 +161,7 @@ rte_mbuf_t *CTrexDebug::create_test_pkt(int ip_ver, uint16_t l4_proto, uint8_t t
#endif
rte_mbuf_t *CTrexDebug::create_pkt(uint8_t *pkt, int pkt_size) {
- rte_mbuf_t *m = CGlobalInfo::pktmbuf_alloc(0, pkt_size);
+ rte_mbuf_t *m = CGlobalInfo::pktmbuf_alloc_by_port(0, pkt_size);
if ( unlikely(m == 0) ) {
printf("ERROR no packets \n");
return 0;
@@ -175,7 +175,7 @@ rte_mbuf_t *CTrexDebug::create_pkt(uint8_t *pkt, int pkt_size) {
}
rte_mbuf_t *CTrexDebug::create_pkt_indirect(rte_mbuf_t *m, uint32_t new_pkt_size){
- rte_mbuf_t *d = CGlobalInfo::pktmbuf_alloc(0, 60);
+ rte_mbuf_t *d = CGlobalInfo::pktmbuf_alloc_by_port(0, 60);
assert(d);
rte_pktmbuf_attach(d, m);