numam-dpdk/drivers/net/thunderx
Nitin Saxena c77875fbb8 net/thunderx: fix MTU configuration for jumbo packets
thunderx pmd driver passes dev_info.max_rx_pktlen as
9200 (via rte_eth_dev_info_get()) to application.
But, when application tries to set MTU as
(9200 - sizeof(ethernet_header_t)) the operation fails
because of missing CRC and VLAN additions.

This patch fixes the following for thunderx pmd driver:
 - Sets NIC_HW_MAX_FRS to 9216 (instead of 9200)
 - Sets NIC_HW_MAX_MTU to 9190 (NIC_HW_MAX_FRS - ETH_HLEN
   - ETHER_CRC_LEN - 2*VLAN_HLEN)
 - Sets dev_info->max_rx_pkt_len to NIC_HW_MAX_MTU +
   ETH_HLEN (instead of 9200)
 - Allows rte_eth_dev_set_mtu() to pass if application
   (like VPP) calls rte_eth_dev_set_mtu() before
   rte_eth_dev_start() by putting appropriate check for
   dev->data->dev_started

Fixes: 65d9804edc ("net/thunderx: support MTU configuration")
Cc: stable@dpdk.org

Signed-off-by: Nitin Saxena <nitin.saxena@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-27 15:54:56 +01:00
..
base net/thunderx: fix MTU configuration for jumbo packets 2018-04-27 15:54:56 +01:00
Makefile drivers/net: build Cavium NIC PMDs with meson 2018-01-30 21:58:59 +01:00
meson.build drivers/net: build Cavium NIC PMDs with meson 2018-01-30 21:58:59 +01:00
nicvf_ethdev.c net/thunderx: fix MTU configuration for jumbo packets 2018-04-27 15:54:56 +01:00
nicvf_ethdev.h ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
nicvf_logs.h net/thunderx: implement dynamic logging 2018-01-16 18:47:49 +01:00
nicvf_rxtx.c ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
nicvf_rxtx.h ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
nicvf_struct.h ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
nicvf_svf.c drivers: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
nicvf_svf.h drivers: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
rte_pmd_thunderx_version.map drivers/net: build Cavium NIC PMDs with meson 2018-01-30 21:58:59 +01:00