test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] TestSuite_shutdown_api.py, test_enable_disablejumbo and MTU questions
@ 2017-04-12 17:48 Angela Czubak
  2017-04-13 16:08 ` Angela Czubak
  0 siblings, 1 reply; 3+ messages in thread
From: Angela Czubak @ 2017-04-12 17:48 UTC (permalink / raw)
  To: dts

Hi,


I was reading TestSuite_shutdown_api.py and have some questions about 
test_enable_disablejumbo.

First of all, what are the expectations when it comes to max-pkt-len? I 
mean, self.dut.send_expect("port config all max-pkt-len %d" % 
jumbo_size, "testpmd> ") (and jumbo_size=2048) calls 
rte_eth_dev_set_mtu. How should this function interpret MTU? It believe 
it is not clearly stated, however for many drivers MTU is length of the 
IP header + its payload. Is there a DPDK convention saying otherwise? I 
mean, in send_packet_method padding is calculated subtracting both IP 
header size and ether header size. I just want to know where the border 
of dropping a packet should lie.

Secondly, why HEADER_SIZE['eth'] is equal 18? Does it take into account 
FCS? Are is there any other reason? And why rx_bytes_exp and 
tx_bytes_exp is decreased by at least 4? (send_packet method).

Last but not least, why for powerville, psringville or kawela_4 
jumbo_size is increased by 4? This happens as well in 
test_enable_disablejumbo.

Thanks in advance for the response.


Regards,

Angela Czubak

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

* Re: [dts] TestSuite_shutdown_api.py, test_enable_disablejumbo and MTU questions
  2017-04-12 17:48 [dts] TestSuite_shutdown_api.py, test_enable_disablejumbo and MTU questions Angela Czubak
@ 2017-04-13 16:08 ` Angela Czubak
  2017-04-20  6:01   ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: Angela Czubak @ 2017-04-13 16:08 UTC (permalink / raw)
  To: dts

Ok, partially answering to myself: max-pkt-len is different than MTU, 
there is no call to rte_eth_dev_set_mtu when calling "port config all 
max-pkt-len". It is truly setting max_rx_pkt_len of 
port->dev_conf.rxmode in init_port_config (and then the device is 
reconfigured with rte_eth_dev_configure when starting the port).

This somehow explains, that decreasing by 4 in send_packet might be 
connected to the fact that NIC may or may not take FCS into frame length.

So now I only don't know why HEADER_SIZE['eth'] is 18 (for sure) and why 
powerville, springville and kawela_4 are treated differently.

On 12.04.2017 19:48, Angela Czubak wrote:
> Hi,
>
>
> I was reading TestSuite_shutdown_api.py and have some questions about 
> test_enable_disablejumbo.
>
> First of all, what are the expectations when it comes to max-pkt-len? 
> I mean, self.dut.send_expect("port config all max-pkt-len %d" % 
> jumbo_size, "testpmd> ") (and jumbo_size=2048) calls 
> rte_eth_dev_set_mtu. How should this function interpret MTU? It 
> believe it is not clearly stated, however for many drivers MTU is 
> length of the IP header + its payload. Is there a DPDK convention 
> saying otherwise? I mean, in send_packet_method padding is calculated 
> subtracting both IP header size and ether header size. I just want to 
> know where the border of dropping a packet should lie.
>
> Secondly, why HEADER_SIZE['eth'] is equal 18? Does it take into 
> account FCS? Are is there any other reason? And why rx_bytes_exp and 
> tx_bytes_exp is decreased by at least 4? (send_packet method).
>
> Last but not least, why for powerville, psringville or kawela_4 
> jumbo_size is increased by 4? This happens as well in 
> test_enable_disablejumbo.
>
> Thanks in advance for the response.
>
>
> Regards,
>
> Angela Czubak
>

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

* Re: [dts] TestSuite_shutdown_api.py, test_enable_disablejumbo and MTU questions
  2017-04-13 16:08 ` Angela Czubak
@ 2017-04-20  6:01   ` Liu, Yong
  0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2017-04-20  6:01 UTC (permalink / raw)
  To: Angela Czubak, dts

Czuabk, you're right. Max packet length is not the same concept as MTU.
Macro 18 is used for calculate payload length, it included in mac layer 
and FCS.
Some types of NIC like kawela, total length in statistic will not 
include FCS. So there's some confusing code in the suites.

Thanks,
Marvin

On 04/14/2017 12:08 AM, Angela Czubak wrote:
> Ok, partially answering to myself: max-pkt-len is different than MTU, 
> there is no call to rte_eth_dev_set_mtu when calling "port config all 
> max-pkt-len". It is truly setting max_rx_pkt_len of 
> port->dev_conf.rxmode in init_port_config (and then the device is 
> reconfigured with rte_eth_dev_configure when starting the port).
>
> This somehow explains, that decreasing by 4 in send_packet might be 
> connected to the fact that NIC may or may not take FCS into frame length.
>
> So now I only don't know why HEADER_SIZE['eth'] is 18 (for sure) and 
> why powerville, springville and kawela_4 are treated differently.
>
> On 12.04.2017 19:48, Angela Czubak wrote:
>> Hi,
>>
>>
>> I was reading TestSuite_shutdown_api.py and have some questions about 
>> test_enable_disablejumbo.
>>
>> First of all, what are the expectations when it comes to max-pkt-len? 
>> I mean, self.dut.send_expect("port config all max-pkt-len %d" % 
>> jumbo_size, "testpmd> ") (and jumbo_size=2048) calls 
>> rte_eth_dev_set_mtu. How should this function interpret MTU? It 
>> believe it is not clearly stated, however for many drivers MTU is 
>> length of the IP header + its payload. Is there a DPDK convention 
>> saying otherwise? I mean, in send_packet_method padding is calculated 
>> subtracting both IP header size and ether header size. I just want to 
>> know where the border of dropping a packet should lie.
>>
>> Secondly, why HEADER_SIZE['eth'] is equal 18? Does it take into 
>> account FCS? Are is there any other reason? And why rx_bytes_exp and 
>> tx_bytes_exp is decreased by at least 4? (send_packet method).
>>
>> Last but not least, why for powerville, psringville or kawela_4 
>> jumbo_size is increased by 4? This happens as well in 
>> test_enable_disablejumbo.
>>
>> Thanks in advance for the response.
>>
>>
>> Regards,
>>
>> Angela Czubak
>>
>

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

end of thread, other threads:[~2017-04-20  6:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 17:48 [dts] TestSuite_shutdown_api.py, test_enable_disablejumbo and MTU questions Angela Czubak
2017-04-13 16:08 ` Angela Czubak
2017-04-20  6:01   ` 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).