[dts] Jumbo Frame Test Cases failing On NIC Adapters

Sharma, Yash Yash.Sharma at cavium.com
Wed Aug 22 10:59:05 CEST 2018

Hi all,

I am using dts 18.02 and dpdk 18.08.Trying to test JumboFrame On 100G(4x25) adapter. JumboFrame test cases are failing and giving this Exception : TestJumboframes: Test Case test_jumboframes_jumbo_jumbo Result FAILED: 'packet pass assert error'

In  TestSuite_jumboframes.py   TestCase  "test_jumboframes_jumbo_jumbo".

Here in the definition of  "jumboframes_send_packet". Inside verify() function while calling" self.pmdout.check_tx_bytes(tx_bytes + 4, pktsize ))" and "((rx_bytes + 4) == pktsize)",
It is adding 4 bytes to tx_bytes and 4 bytes to rx_bytes.Can anyone Please explain me why these extra 4 bytes are veing added.

Adding these 4 bytes is getting the condition false and test cases are failing. If I don't add these 4 bytes to both tx_bytes and rx_bytes then the test cases are passing successfully.
In the def of "test_jumboframes_bigger_jumbo", It is mentioned that:  "On 1G NICs, when the jubmo frame MTU set as 9000, the software adjust it to 9004."
Is this the reason why extra 4 bytes are being added?

def jumboframes_send_packet(self, pktsize, received=True):
        Send 1 packet to portid
        tx_pkts_ori, _, tx_bytes_ori = [int(_) for _ in self.jumboframes_get_stat(self.rx_port, "tx")]
        rx_pkts_ori, rx_err_ori, rx_bytes_ori = [int(_) for _ in self.jumboframes_get_stat(self.tx_port, "rx")]

        itf = self.tester.get_interface(self.tester.get_local_port(self.tx_port))
        mac = self.dut.get_mac_address(self.tx_port)

        # The packet total size include ethernet header, ip header, and payload.
        # ethernet header length is 18 bytes, ip standard header length is 20 bytes.
        pktlen = pktsize - ETHER_HEADER_LEN
        padding = pktlen - IP_HEADER_LEN

        self.tester.scapy_append('nutmac="%s"' % mac)
        self.tester.scapy_append('sendp([Ether(dst=nutmac, src="52:00:00:00:00:00")/IP(len=%s)/Raw(load="\x50"*%s)], iface="%s")' % (pktlen, padding, itf))

        out = self.tester.scapy_execute()

        tx_pkts, _, tx_bytes = [int(_) for _ in self.jumboframes_get_stat(self.rx_port, "tx")]
        # p0tx_pkts, p0tx_err, p0tx_bytes
        rx_pkts, rx_err, rx_bytes = [int(_) for _ in self.jumboframes_get_stat(self.tx_port, "rx")]

        tx_pkts -= tx_pkts_ori
        tx_bytes -= tx_bytes_ori
        rx_pkts -= rx_pkts_ori
        rx_bytes -= rx_bytes_ori
        rx_err -= rx_err_ori

        if received:
            self.verify(self.pmdout.check_tx_bytes(tx_pkts, rx_pkts)
                         and ( self.pmdout.check_tx_bytes(tx_bytes + 4, pktsize ))
                         and ((rx_bytes + 4) == pktsize),
                        "packet pass assert error")


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dts/attachments/20180822/403e9bd3/attachment.html>

More information about the dts mailing list