From: "Liu, Yong" <yong.liu@intel.com>
To: "Sharma, Yash" <Yash.Sharma@cavium.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] Jumbo Frame Test Cases failing On NIC Adapters
Date: Thu, 23 Aug 2018 07:07:52 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6312B277@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <BYAPR07MB51419FCDBF18D169A048FF6A99300@BYAPR07MB5141.namprd07.prod.outlook.com>
[-- 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 --]
prev parent reply other threads:[~2018-08-23 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-22 8:59 Sharma, Yash
2018-08-23 7:07 ` Liu, Yong [this message]
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=86228AFD5BCD8E4EBFD2B90117B5E81E6312B277@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=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).