Skip to contentSkip to conversation

i40e: cannot change mtu to enable jumbo frame

DISCUSSION Julien Meunier 4 participants 6 messages Feb 9, 2016 – Feb 12, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

Hello Helin,

I tried to send jumbo frames to a i40e card. However, I observed that all frames are dropped. Moreover, set_mtu function is not implemented on i40e PMD.

Quoted 1 line

testpmd --log-level 8 --huge-dir=/mnt/huge -n 4 -l 2,18 --socket-mem 1024,1024 -w 0000:02:00.0 -w 0000:02:00.2 -- -i --nb-cores=1 --nb-ports=2 --total-num-mbufs=65536

=============
Configuration
=============

+-----------+          +-------------+
|           |          |             |
| tgen      |          |             |
|           +----------+ port 0      |
|           |          |             |
|           |          |             |
|           |          |             |
|           |          |             |
|           +----------+ port 1      |
|           |          |             |
+-----------+          +-------------+

DPDK: DPDK-v2.2

==========
MTU = 1500
==========
Packet sent from a tgen

Quoted 2 lines

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) len(p) = 1514

testpmd> start
PMD: i40e_rxd_to_vlan_tci(): Mbuf vlan_tci: 0, vlan_tci_outer: 0 testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1518
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1514
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------

  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 1514
PMD: i40e_update_vsi_stats(): tx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 1514
PMD: i40e_dev_stats_get(): tx_unicast: 1
PMD: i40e_dev_stats_get(): tx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------

  RX-packets: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 1              TX-dropped: 0             TX-total: 1

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++

  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 1              TX-dropped: 0             TX-total: 1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=> OK

==========
MTU = 1600
==========
Packet sent

Quoted 2 lines

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) len(p) = 1614

testpmd> port config mtu 0 1600
rte_eth_dev_set_mtu: Function not supported
Set MTU failed. diag=-95
testpmd> port config mtu 1 1600
rte_eth_dev_set_mtu: Function not supported
Set MTU failed. diag=-95
testpmd> start
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1618
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1614
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_big: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------

  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 0
PMD: i40e_update_vsi_stats(): tx_unicast: 0
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 0
PMD: i40e_dev_stats_get(): tx_unicast: 0
PMD: i40e_dev_stats_get(): tx_size_big: 0
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------

  RX-packets: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++

  RX-packets: 1              RX-dropped: 0             RX-total: 1
  TX-packets: 0              TX-dropped: 0             TX-total: 0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

=> Frame correctly received on port 0, but never forwarded or xmit on port 1.

Does a mtu_set function will be developed soon in order to support jumbo frame ?

Regards,

Signature · 2 lines
Julien MEUNIER
6WIND
#1 lore raw

Helin is still in Chinese New Year Vacation. Will the below command option help ?

4.5.9. port config - max-pkt-len
Set the maximum packet length:

testpmd> port config all max-pkt-len (value)
This is equivalent to the --max-pkt-len command-line option.

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Julien Meunier
Sent: Tuesday, February 9, 2016 9:36 AM
To: Zhang, Helin <[email protected]>; [email protected]
Subject: [dpdk-dev] i40e: cannot change mtu to enable jumbo frame

Hello Helin,

I tried to send jumbo frames to a i40e card. However, I observed that all frames are dropped. Moreover, set_mtu function is not implemented on i40e PMD.

Quoted 1 line

testpmd --log-level 8 --huge-dir=/mnt/huge -n 4 -l 2,18 --socket-mem

1024,1024 -w 0000:02:00.0 -w 0000:02:00.2 -- -i --nb-cores=1 --nb-ports=2 --total-num-mbufs=65536

=============
Configuration
=============

+-----------+          +-------------+
|           |          |             |
| tgen      |          |             |
|           +----------+ port 0      |
|           |          |             |
|           |          |             |
|           |          |             |
|           |          |             |
|           +----------+ port 1      |
|           |          |             |
+-----------+          +-------------+

DPDK: DPDK-v2.2

==========
MTU = 1500
==========
Packet sent from a tgen

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) > len(p) = 1514

testpmd> start
PMD: i40e_rxd_to_vlan_tci(): Mbuf vlan_tci: 0, vlan_tci_outer: 0 testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1518
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1514
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 1514
PMD: i40e_update_vsi_stats(): tx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 1514
PMD: i40e_dev_stats_get(): tx_unicast: 1
PMD: i40e_dev_stats_get(): tx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------

   RX-packets: 0              RX-dropped: 0             RX-total: 0
   TX-packets: 1              TX-dropped: 0             TX-total: 1

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 1              TX-dropped: 0             TX-total: 1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=> OK

==========
MTU = 1600
==========
Packet sent

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) > len(p) = 1614

testpmd> port config mtu 0 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> port config mtu 1 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> start
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1618
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1614
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_big: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 0
PMD: i40e_update_vsi_stats(): tx_unicast: 0
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 0
PMD: i40e_dev_stats_get(): tx_unicast: 0
PMD: i40e_dev_stats_get(): tx_size_big: 0
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------

   RX-packets: 0              RX-dropped: 0             RX-total: 0
   TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 0              TX-dropped: 0             TX-total: 0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

=> Frame correctly received on port 0, but never forwarded or xmit on port 1.

Does a mtu_set function will be developed soon in order to support jumbo frame ?

Regards,

--
Julien MEUNIER
6WIND

#2 lore raw
Quoted 148 lines · Heqing

Helin is still in Chinese New Year Vacation. Will the below command option help ?

4.5.9. port config - max-pkt-len
Set the maximum packet length:

testpmd> port config all max-pkt-len (value)
This is equivalent to the --max-pkt-len command-line option.

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Julien Meunier
Sent: Tuesday, February 9, 2016 9:36 AM
To: Zhang, Helin <[email protected]>; [email protected]
Subject: [dpdk-dev] i40e: cannot change mtu to enable jumbo frame

Hello Helin,

I tried to send jumbo frames to a i40e card. However, I observed that all frames are dropped. Moreover, set_mtu function is not implemented on i40e PMD.

Quoted 1 line

testpmd --log-level 8 --huge-dir=/mnt/huge -n 4 -l 2,18 --socket-mem

1024,1024 -w 0000:02:00.0 -w 0000:02:00.2 -- -i --nb-cores=1 --nb-ports=2 --total-num-mbufs=65536

=============
Configuration
=============

+-----------+          +-------------+
|           |          |             |
| tgen      |          |             |
|           +----------+ port 0      |
|           |          |             |
|           |          |             |
|           |          |             |
|           |          |             |
|           +----------+ port 1      |
|           |          |             |
+-----------+          +-------------+

DPDK: DPDK-v2.2

==========
MTU = 1500
==========
Packet sent from a tgen

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) > len(p) = 1514

testpmd> start
PMD: i40e_rxd_to_vlan_tci(): Mbuf vlan_tci: 0, vlan_tci_outer: 0 testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1518
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1514
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 0 TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 1514
PMD: i40e_update_vsi_stats(): tx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 1514
PMD: i40e_dev_stats_get(): tx_unicast: 1
PMD: i40e_dev_stats_get(): tx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 1 TX-dropped: 0 TX-total: 1

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 1 TX-dropped: 0 TX-total: 1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=> OK

==========
MTU = 1600
==========
Packet sent

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) > len(p) = 1614

testpmd> port config mtu 0 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> port config mtu 1 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> start
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1618
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1614
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_big: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 0 TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 0
PMD: i40e_update_vsi_stats(): tx_unicast: 0
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 0
PMD: i40e_dev_stats_get(): tx_unicast: 0
PMD: i40e_dev_stats_get(): tx_size_big: 0
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 0 TX-total: 0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

=> Frame correctly received on port 0, but never forwarded or xmit on port 1.

Quoted 8 lines

Does a mtu_set function will be developed soon in order to support jumbo frame ?

Regards,

--
Julien MEUNIER
6WIND

On testpmd, this command enables jumbo frame, you are right.

However, all ports need to be stopped: jumbo frame cannot be enabled at runtime through the DPDK API on i40e PMD. Other Intel PMD, like ixgbe, support this feature with the set_mtu API. Why not on i40e ?

Regards,

Signature · 2 lines
Julien MEUNIER
6WIND
#3 lore raw
Quoted 160 lines · Heqing
Quoted 15 lines

Helin is still in Chinese New Year Vacation. Will the below command option help ?

4.5.9. port config - max-pkt-len
Set the maximum packet length:

testpmd> port config all max-pkt-len (value)
This is equivalent to the --max-pkt-len command-line option.

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Julien Meunier
Sent: Tuesday, February 9, 2016 9:36 AM
To: Zhang, Helin <[email protected]>; [email protected]
Subject: [dpdk-dev] i40e: cannot change mtu to enable jumbo frame

Quoted 3 lines

Hello Helin,

I tried to send jumbo frames to a i40e card. However, I observed that all frames are dropped. Moreover, set_mtu function is not

implemented on i40e PMD.

Quoted 130 lines
Quoted 2 lines

testpmd --log-level 8 --huge-dir=/mnt/huge -n 4 -l 2,18 --socket-mem

1024,1024 -w 0000:02:00.0 -w 0000:02:00.2 -- -i --nb-cores=1 --nb-ports=2 --total-num-mbufs=65536

=============
Configuration
=============

+-----------+          +-------------+
|           |          |             |
| tgen      |          |             |
|           +----------+ port 0      |
|           |          |             |
|           |          |             |
|           |          |             |
|           |          |             |
|           +----------+ port 1      |
|           |          |             |
+-----------+          +-------------+

DPDK: DPDK-v2.2

==========
MTU = 1500
==========
Packet sent from a tgen

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) > len(p) = 1514

testpmd> start
PMD: i40e_rxd_to_vlan_tci(): Mbuf vlan_tci: 0, vlan_tci_outer: 0 testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1518
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1514
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 0 TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 1514
PMD: i40e_update_vsi_stats(): tx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 1514
PMD: i40e_dev_stats_get(): tx_unicast: 1
PMD: i40e_dev_stats_get(): tx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 1 TX-dropped: 0 TX-total: 1

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 1 TX-dropped: 0 TX-total: 1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=> OK

==========
MTU = 1600
==========
Packet sent

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) > len(p) = 1614

testpmd> port config mtu 0 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> port config mtu 1 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> start
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1618
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1614
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_big: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 0 TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 0
PMD: i40e_update_vsi_stats(): tx_unicast: 0
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 0
PMD: i40e_dev_stats_get(): tx_unicast: 0
PMD: i40e_dev_stats_get(): tx_size_big: 0
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 0 TX-total: 0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

=> Frame correctly received on port 0, but never forwarded or xmit on port 1.

Quoted 8 lines

Does a mtu_set function will be developed soon in order to support jumbo frame ?

Regards,

--
Julien MEUNIER
6WIND

Quoted 5 lines

On testpmd, this command enables jumbo frame, you are right.

However, all ports need to be stopped: jumbo frame cannot be enabled at runtime through the DPDK API on i40e PMD. Other Intel PMD, like ixgbe, support this feature with the set_mtu API. Why not on i40e ?

Yes, as I know mtu-set is not implemented on i40e and some other devices ... Patches are welcome, I suppose :)
Though note that even with ixgbe you can't set new mtu if it is bigger then related mempool's buffer size and scattered_rx is not enabled.
And to enable scattered_rx, you'll need to stop and re-configure device anyway. Konstantin

Quoted 6 lines

Regards,

--
Julien MEUNIER
6WIND

#4 lore raw
In reply to Julien Meunier
Quoted 142 lines

-----Original Message-----
From: Julien Meunier [mailto:[email protected]]
Sent: Wednesday, February 10, 2016 12:36 AM
To: Zhang, Helin <[email protected]>; [email protected]
Subject: i40e: cannot change mtu to enable jumbo frame

Hello Helin,

I tried to send jumbo frames to a i40e card. However, I observed that all frames are dropped. Moreover, set_mtu function is not implemented on i40e PMD.

Quoted 1 line

testpmd --log-level 8 --huge-dir=/mnt/huge -n 4 -l 2,18 --socket-mem

1024,1024 -w 0000:02:00.0 -w 0000:02:00.2 -- -i --nb-cores=1 --nb-ports=2 --total-num-mbufs=65536

=============
Configuration
=============

+-----------+          +-------------+
|           |          |             |
| tgen      |          |             |
|           +----------+ port 0      |
|           |          |             |
|           |          |             |
|           |          |             |
|           |          |             |
|           +----------+ port 1      |
|           |          |             |
+-----------+          +-------------+

DPDK: DPDK-v2.2

==========
MTU = 1500
==========
Packet sent from a tgen

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) >

len(p) = 1514

testpmd> start
PMD: i40e_rxd_to_vlan_tci(): Mbuf vlan_tci: 0, vlan_tci_outer: 0 testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1518
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1514
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 1514
PMD: i40e_update_vsi_stats(): tx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 1514
PMD: i40e_dev_stats_get(): tx_unicast: 1
PMD: i40e_dev_stats_get(): tx_size_1522: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------

   RX-packets: 0              RX-dropped: 0             RX-total: 0
   TX-packets: 1              TX-dropped: 0             TX-total: 1

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 1              TX-dropped: 0             TX-total: 1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++

=> OK

==========
MTU = 1600
==========
Packet sent

Quoted 1 line

p = Ether / IP / UDP / Raw(MTU + HDR(Ethernet)- HDR(IP) - HDR(UDP)) >

len(p) = 1614

testpmd> port config mtu 0 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> port config mtu 1 1600
rte_eth_dev_set_mtu: Function not supported Set MTU failed. diag=-95 testpmd> start
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...
PMD: i40e_update_vsi_stats(): *** VSI[13] stats start ***
PMD: i40e_update_vsi_stats(): rx_bytes: 1618
PMD: i40e_update_vsi_stats(): rx_unicast: 1
PMD: i40e_update_vsi_stats(): *** VSI[13] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): rx_bytes: 1614
PMD: i40e_dev_stats_get(): rx_unicast: 1
PMD: i40e_dev_stats_get(): rx_unknown_protocol: 1
PMD: i40e_dev_stats_get(): rx_size_big: 1
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 0 --------------

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------
PMD: i40e_update_vsi_stats(): *** VSI[14] stats start ***
PMD: i40e_update_vsi_stats(): tx_bytes: 0
PMD: i40e_update_vsi_stats(): tx_unicast: 0
PMD: i40e_update_vsi_stats(): *** VSI[14] stats end ***
PMD: i40e_dev_stats_get(): *** PF stats start ***
PMD: i40e_dev_stats_get(): tx_bytes: 0
PMD: i40e_dev_stats_get(): tx_unicast: 0
PMD: i40e_dev_stats_get(): tx_size_big: 0
PMD: i40e_dev_stats_get(): *** PF stats end ***

-------------- Forward statistics for port 1 --------------

   RX-packets: 0              RX-dropped: 0             RX-total: 0
   TX-packets: 0              TX-dropped: 0             TX-total: 0

----------------------------------------------------------------------------

+++++ Accumulated forward statistics for all ports+++++

   RX-packets: 1              RX-dropped: 0             RX-total: 1
   TX-packets: 0              TX-dropped: 0             TX-total: 0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++

Quoted 6 lines

Done.

=> Frame correctly received on port 0, but never forwarded or xmit on port 1.

Does a mtu_set function will be developed soon in order to support jumbo frame ?

Yes, we will implement soon later.
Could you help to try with max_pkt_len in port config for now?

Regards,
Helin

Quoted 6 lines

Regards,

--
Julien MEUNIER
6WIND

#5 lore raw
Quoted 10 lines · Helin
Quoted 10 lines

-----Original Message-----
From: Julien Meunier [mailto:[email protected]]
Sent: Wednesday, February 10, 2016 12:36 AM
To: Zhang, Helin <[email protected]>; [email protected]
Subject: i40e: cannot change mtu to enable jumbo frame
[...]
Does a mtu_set function will be developed soon in order to support jumbo frame ?

Quoted 6 lines

Yes, we will implement soon later.
Could you help to try with max_pkt_len in port config for now?

Regards,
Helin

Hi,

When I stop ports, change max_pkt_len and restart ports, jumbo frame are accepted. I was able to forward 9k frames on a i40e card.

I wrote a quick and dirty patch in order to add minimal support of MTU for my test. I did not carefully study the impacts... Please advice.

---
i40e: add support of mtu configuration

Add support of MTU configuration.
Ports are stopped and then started in order to force re-initialization of RX queues.

NOTE: This patch is still experimental.

---
 drivers/net/i40e/i40e_ethdev.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
drivers/net/i40e/i40e_ethdev.c +33 -0
index 750206b..b4d6912 100644
@@ -296,6 +296,7 @@ static int i40e_dev_queue_stats_mapping_set(struct rte_eth_dev *dev,
 					    uint8_t is_rx);
 static void i40e_dev_info_get(struct rte_eth_dev *dev,
 			      struct rte_eth_dev_info *dev_info);
+static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
 static int i40e_vlan_filter_set(struct rte_eth_dev *dev,
 				uint16_t vlan_id,
 				int on);
@@ -439,6 +440,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.xstats_reset                 = i40e_dev_stats_reset,
 	.queue_stats_mapping_set      = i40e_dev_queue_stats_mapping_set,
 	.dev_infos_get                = i40e_dev_info_get,
+	.mtu_set                      = i40e_dev_mtu_set,
 	.vlan_filter_set              = i40e_vlan_filter_set,
 	.vlan_tpid_set                = i40e_vlan_tpid_set,
 	.vlan_offload_set             = i40e_vlan_offload_set,
@@ -4681,6 +4683,37 @@ i40e_dev_rxtx_init(struct i40e_pf *pf)
 }
 
 static int
+i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
+	struct rte_eth_dev_info dev_info;
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+
+	i40e_dev_info_get(dev, &dev_info);
+
+	if ((frame_size < ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen)) {
+		PMD_DRV_LOG(ERR, "Invalid MTU\n");
+		return I40E_ERR_PARAM;
+	}
+
+	i40e_dev_stop(dev);
+	hw->adapter_stopped = 1;
+
+	/* switch to jumbo mode if needed */
+	if (frame_size > ETHER_MAX_LEN)
+		dev->data->dev_conf.rxmode.jumbo_frame = 1;
+	else
+		dev->data->dev_conf.rxmode.jumbo_frame = 0;
+
+	dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size;
+
+	i40e_dev_start(dev);
+	hw->adapter_stopped = 0;
+
+	return 0;
+}
+
+static int
 i40e_vmdq_setup(struct rte_eth_dev *dev)
 {
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
Signature · 4 lines
Regards,
-- 
Julien MEUNIER
6WIND