test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Sharma, Yash" <Yash.Sharma@cavium.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Subject: [dts] Jumbo Frame Test Cases failing On  NIC Adapters
Date: Wed, 22 Aug 2018 08:59:05 +0000	[thread overview]
Message-ID: <BYAPR07MB51419FCDBF18D169A048FF6A99300@BYAPR07MB5141.namprd07.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2812 bytes --]


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_foreground()
        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()
        sleep(5)

        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")

Thanks,
Yash


[-- Attachment #2: Type: text/html, Size: 8491 bytes --]

             reply	other threads:[~2018-08-22  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22  8:59 Sharma, Yash [this message]
2018-08-23  7:07 ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR07MB51419FCDBF18D169A048FF6A99300@BYAPR07MB5141.namprd07.prod.outlook.com \
    --to=yash.sharma@cavium.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).