test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] Jumbo Frame Test Cases failing On  NIC Adapters
@ 2018-08-22  8:59 Sharma, Yash
  2018-08-23  7:07 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Sharma, Yash @ 2018-08-22  8:59 UTC (permalink / raw)
  To: dts

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] Jumbo Frame Test Cases failing On  NIC Adapters
  2018-08-22  8:59 [dts] Jumbo Frame Test Cases failing On NIC Adapters Sharma, Yash
@ 2018-08-23  7:07 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2018-08-23  7:07 UTC (permalink / raw)
  To: Sharma, Yash, dts

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

Hi Yash,
I think these four bytes are CRC length. In our pmd implementation, crc size will not calculated it into overall packet length. So when comparing the packet length, need add it first.
If crc has been included into statistic, you can just remove it for your test. It is also fine to add some special check for NIC in DTS test suites.

Thanks,
Marvin

From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Sharma, Yash
Sent: Wednesday, August 22, 2018 4:59 PM
To: dts@dpdk.org
Subject: [dts] Jumbo Frame Test Cases failing On NIC Adapters


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: 10140 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-23  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22  8:59 [dts] Jumbo Frame Test Cases failing On NIC Adapters Sharma, Yash
2018-08-23  7:07 ` Liu, Yong

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