From 0d3f6dff2af1325c4e5cf8143e4f4567c30c159e Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Thu, 16 Mar 2017 16:35:42 +0200 Subject: Fixes for v2.21 --software mode issues Signed-off-by: Ido Barnea --- src/pre_test.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/pre_test.cpp') diff --git a/src/pre_test.cpp b/src/pre_test.cpp index a72b7e8e..9316d371 100644 --- a/src/pre_test.cpp +++ b/src/pre_test.cpp @@ -211,6 +211,9 @@ void CPretestOnePortInfo::send_arp_req_all() { if (verbose >= 3) { fprintf(stdout, "TX ARP request on port %d - " , m_port_id); (*it)->dump(stdout, ""); + if (verbose >= 7) { + utl_DumpBuffer(stdout, p, rte_pktmbuf_pkt_len(m[0]), 0); + } } num_sent = rte_eth_tx_burst(m_port_id, 0, m, 1); @@ -387,7 +390,7 @@ bool CPretest::is_arp(const uint8_t *p, uint16_t pkt_size, ArpHdr *&arp, uint16_ if (m_ether->getVlanProtocol() != EthernetHeader::Protocol::ARP) { return false; } else { - vlan_tag = m_ether->getVlanTag(); + vlan_tag = m_ether->getVlanTag() & 0xfff; arp = (ArpHdr *)(p + 18); } } @@ -428,6 +431,8 @@ int CPretest::handle_rx(int port_id, int queue_id) { , ip_to_str(ntohl(arp->m_arp_sip)).c_str() , ip_to_str(ntohl(arp->m_arp_tip)).c_str() , vlan_tag); + if (verbose >= 7) + utl_DumpBuffer(stdout, p, rte_pktmbuf_pkt_len(m), 0); } // is this request for our IP? COneIPv4Info *src_addr; -- cgit 1.2.3-korg