summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Daley <johndale@cisco.com>2016-11-01 11:08:28 -0700
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-11-07 18:01:11 +0100
commitf201fd0585fa8bdc2c3005c2f363460e487cda2d (patch)
treed3e572d1960944c81dea7b997ad6e3aa7e7b3f17
parentb66b6e72bb4db64994fea4ecf77b3b3e7307d5d7 (diff)
downloaddpdk-f201fd0585fa8bdc2c3005c2f363460e487cda2d.zip
dpdk-f201fd0585fa8bdc2c3005c2f363460e487cda2d.tar.gz
dpdk-f201fd0585fa8bdc2c3005c2f363460e487cda2d.tar.xz
net/enic: fix max packet length check
When the device was configured with an explicit maximum packet length, it would fail if the value was greater than MTU configured in CIMC/UCSM (plus L2 header length). It should have been compared against maximum allowed by the device. Fixes: bb34ffb848a0 ("net/enic: determine max egress packet size and max MTU") Signed-off-by: John Daley <johndale@cisco.com>
-rw-r--r--drivers/net/enic/enic_ethdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index bcf83d4..2b154ec 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -463,8 +463,7 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,
device_info->max_rx_queues = enic->conf_rq_count / 2;
device_info->max_tx_queues = enic->conf_wq_count;
device_info->min_rx_bufsize = ENIC_MIN_MTU;
- device_info->max_rx_pktlen = enic->rte_dev->data->mtu
- + ETHER_HDR_LEN + 4;
+ device_info->max_rx_pktlen = enic->max_mtu + ETHER_HDR_LEN + 4;
device_info->max_mac_addrs = 1;
device_info->rx_offload_capa =
DEV_RX_OFFLOAD_VLAN_STRIP |