From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3F7202BF7 for ; Thu, 23 Aug 2018 09:08:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2018 00:08:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,277,1531810800"; d="scan'208,217";a="67215368" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 23 Aug 2018 00:07:55 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 23 Aug 2018 00:07:55 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 23 Aug 2018 00:07:55 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.185]) with mapi id 14.03.0319.002; Thu, 23 Aug 2018 15:07:52 +0800 From: "Liu, Yong" To: "Sharma, Yash" , "dts@dpdk.org" Thread-Topic: Jumbo Frame Test Cases failing On NIC Adapters Thread-Index: AdQ59VQu+TcBamAGRgWtTcnz0vTpEwAuY51A Date: Thu, 23 Aug 2018 07:07:52 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6312B277@SHSMSX103.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2Y0NTBkNjktMjhmMC00MWFiLWFmMzctNTA2ZjEzNGE5ZjYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibTNoU3NpZmJVRG5oR0tFRmllMGF5SG9lT25tRmsxODZ0alorQXZjUFlhZEgrR1VMXC9qMGpCK2hycGlTRkE0elEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: multipart/alternative; boundary="_000_86228AFD5BCD8E4EBFD2B90117B5E81E6312B277SHSMSX103ccrcor_" MIME-Version: 1.0 Subject: Re: [dts] Jumbo Frame Test Cases failing On NIC Adapters X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2018 07:08:39 -0000 --_000_86228AFD5BCD8E4EBFD2B90117B5E81E6312B277SHSMSX103ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Yash, I think these four bytes are CRC length. In our pmd implementation, crc siz= e 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 te= st. 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 : Tes= tJumboframes: 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() funct= ion while calling" self.pmdout.check_tx_bytes(tx_bytes + 4, pktsize ))" and= "((rx_bytes + 4) =3D=3D 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 fail= ing. If I don't add these 4 bytes to both tx_bytes and rx_bytes then the te= st cases are passing successfully. In the def of "test_jumboframes_bigger_jumbo", It is mentioned that: "On 1= G NICs, when the jubmo frame MTU set as 9000, the software adjust it to 900= 4." Is this the reason why extra 4 bytes are being added? def jumboframes_send_packet(self, pktsize, received=3DTrue): """ Send 1 packet to portid """ tx_pkts_ori, _, tx_bytes_ori =3D [int(_) for _ in self.jumboframes_= get_stat(self.rx_port, "tx")] rx_pkts_ori, rx_err_ori, rx_bytes_ori =3D [int(_) for _ in self.jum= boframes_get_stat(self.tx_port, "rx")] itf =3D self.tester.get_interface(self.tester.get_local_port(self.t= x_port)) mac =3D self.dut.get_mac_address(self.tx_port) # The packet total size include ethernet header, ip header, and pay= load. # ethernet header length is 18 bytes, ip standard header length is = 20 bytes. pktlen =3D pktsize - ETHER_HEADER_LEN padding =3D pktlen - IP_HEADER_LEN self.tester.scapy_foreground() self.tester.scapy_append('nutmac=3D"%s"' % mac) self.tester.scapy_append('sendp([Ether(dst=3Dnutmac, src=3D"52:00:0= 0:00:00:00")/IP(len=3D%s)/Raw(load=3D"\x50"*%s)], iface=3D"%s")' % (pktlen,= padding, itf)) out =3D self.tester.scapy_execute() sleep(5) tx_pkts, _, tx_bytes =3D [int(_) for _ in self.jumboframes_get_stat= (self.rx_port, "tx")] # p0tx_pkts, p0tx_err, p0tx_bytes rx_pkts, rx_err, rx_bytes =3D [int(_) for _ in self.jumboframes_get= _stat(self.tx_port, "rx")] tx_pkts -=3D tx_pkts_ori tx_bytes -=3D tx_bytes_ori rx_pkts -=3D rx_pkts_ori rx_bytes -=3D rx_bytes_ori rx_err -=3D 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, pkt= size )) and ((rx_bytes + 4) =3D=3D pktsize), "packet pass assert error") Thanks, Yash --_000_86228AFD5BCD8E4EBFD2B90117B5E81E6312B277SHSMSX103ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Yash,

I think these four byt= es are CRC length. In our pmd implementation, crc size will not calculated = it into overall packet length. So when comparing the packet length, need ad= d it first.

If crc has been includ= ed 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 J= umboFrame On 100G(4x25) adapter. JumboFrame test cases are failing and givi= ng this Exception : TestJumboframes: Tes= t Case test_jumboframes_jumbo_jumbo Result FAILED: 'packet pass assert erro= r'

 

In  TestSuite_jumboframes.py   TestCa= se  “test_jumboframes_jumbo_jumbo”.

 

Here in the definition of  “jumboframes_s= end_packet”. Inside verify() function while calling” self.pmdou= t.check_tx_bytes(tx_byte= s + 4, pktsize ))” and “((rx_bytes + 4) =3D=3D 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_b= ytes and rx_bytes then the test cases are passing successfully.<= /p>

In the def of “test_jumboframes_bigger_jumbo&#= 8221;, 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= =3DTrue):

        "&qu= ot;"

        Send 1 pa= cket to portid

        "&qu= ot;"

        tx_pkts_o= ri, _, tx_bytes_ori =3D [int(_) for _ in self.jumboframes_get_stat(self.rx_= port, "tx")]

        rx_pkts_o= ri, rx_err_ori, rx_bytes_ori =3D [int(_) for _ in self.jumboframes_get_stat= (self.tx_port, "rx")]

 

        itf =3D s= elf.tester.get_interface(self.tester.get_local_port(self.tx_port))

        mac =3D s= elf.dut.get_mac_address(self.tx_port)

 

        # The pac= ket total size include ethernet header, ip header, and payload.<= /p>

        # etherne= t header length is 18 bytes, ip standard header length is 20 bytes.

        pktlen = =3D pktsize - ETHER_HEADER_LEN

        padding = =3D pktlen - IP_HEADER_LEN

 

        self.test= er.scapy_foreground()

        self.test= er.scapy_append('nutmac=3D"%s"' % mac)

        self.test= er.scapy_append('sendp([Ether(dst=3Dnutmac, src=3D"52:00:00:00:00:00&q= uot;)/IP(len=3D%s)/Raw(load=3D"\x50"*%s)], iface=3D"%s"= )' % (pktlen, padding, itf))

 

        out =3D s= elf.tester.scapy_execute()

        sleep(5)<= o:p>

 

        tx_pkts, = _, tx_bytes =3D [int(_) for _ in self.jumboframes_get_stat(self.rx_port, &q= uot;tx")]

        # p0tx_pk= ts, p0tx_err, p0tx_bytes

        rx_pkts, = rx_err, rx_bytes =3D [int(_) for _ in self.jumboframes_get_stat(self.tx_por= t, "rx")]

 

        tx_pkts -= =3D tx_pkts_ori

        tx_bytes = -=3D tx_bytes_ori

        rx_pkts -= =3D rx_pkts_ori

        rx_bytes = -=3D rx_bytes_ori

        rx_err -= =3D rx_err_ori

 

        if receiv= ed:

        &nbs= p;   self.verify(self.pmdout.check_tx_bytes(tx_pkts, rx_pkts)

        &nbs= p;            &= nbsp;   and ( self.pmdout.check_tx_bytes(tx_bytes + 4, pktsize ))

        &nbs= p;            &= nbsp;   and ((rx_bytes + 4) =3D=3D pktsize),

        &nbs= p;            &= nbsp;  "packet pass assert error")

 

Thanks,

Yash

 

--_000_86228AFD5BCD8E4EBFD2B90117B5E81E6312B277SHSMSX103ccrcor_--