From 122f336ffde6d3fc74acc6861322328d778d3232 Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Wed, 16 Nov 2016 11:03:51 +0200 Subject: Fix trex-267 - allocation of ARP packets from wrong memory socket Signed-off-by: Ido Barnea --- src/debug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/debug.cpp') 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); -- cgit 1.2.3-korg