From 50746d0dc7db5cb49bfd6ab9e5942ecdea694734 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Thu, 10 Nov 2016 21:20:11 +0200 Subject: mlx5 reduce the number of packets Signed-off-by: Hanoh Haim --- src/debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/debug.cpp') diff --git a/src/debug.cpp b/src/debug.cpp index 3a9cd506..86ed0df0 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -341,7 +341,7 @@ int CTrexDebug::verify_hw_rules(bool recv_all) { rte_mbuf_t *m = NULL; CPhyEthIF * lp; rte_mbuf_t * rx_pkts[32]; - int sent_num = 20; + int sent_num = 8; /* reduce the size, there are driver that can handle only burst of 8 in QUEUE 0 */ int ret = 0; for (int pkt_num = 0; pkt_num < sizeof(test_pkts) / sizeof (test_pkts[0]); pkt_num++) { -- cgit From ec26c23ed16ba6804a53760569c846dc472d8e5c Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 13 Nov 2016 14:07:02 +0200 Subject: add a way to dump debug packets Signed-off-by: Hanoh Haim --- src/debug.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/debug.cpp') diff --git a/src/debug.cpp b/src/debug.cpp index 86ed0df0..8ec4f136 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -141,6 +141,11 @@ rte_mbuf_t *CTrexDebug::create_test_pkt(int ip_ver, uint16_t l4_proto, uint8_t t } pkt = CTestPktGen::create_test_pkt(l3_type, l4_proto, ttl, ip_id, flags, 1000, pkt_size); + + /* DEBUG print the packet + utl_k12_pkt_format(stdout,pkt, pkt_size) ; + */ + m = CGlobalInfo::pktmbuf_alloc(0, pkt_size); if ( unlikely(m == 0) ) { printf("ERROR no packets \n"); -- cgit 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