From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by dpdk.org (Postfix) with ESMTP id EB7902BEA for ; Tue, 1 Nov 2016 19:08:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1162; q=dns/txt; s=iport; t=1478023720; x=1479233320; h=from:to:cc:subject:date:message-id; bh=r/7jHL359tVCsnIwmBzffow9mOKGB4ANWfcndcOm81I=; b=Q8XGK0wzaeDSxbyjsAZPN+eqzTelJMLD5t/Y0z5u+n2L1H0T63fjj92c NwyJksl6+fGyPSMX7AJVMQc/zAbE50xQEnsrEHghyvdbPAWpTl/GomrA3 Sg2sMRGBU0ia8KV8lm2Ook2bLEzX1OlnPRxeiyIjStqE2i0rT52W6T4Hf s=; X-IronPort-AV: E=Sophos;i="5.31,580,1473120000"; d="scan'208";a="169878338" Received: from alln-core-10.cisco.com ([173.36.13.132]) by rcdn-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Nov 2016 18:08:39 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-10.cisco.com (8.14.5/8.14.5) with ESMTP id uA1I8d2R006839; Tue, 1 Nov 2016 18:08:39 GMT Received: by cisco.com (Postfix, from userid 392789) id E166A3FAAE0F; Tue, 1 Nov 2016 11:08:38 -0700 (PDT) From: John Daley To: bruce.richardson@intel.com Date: Tue, 1 Nov 2016 11:08:28 -0700 Message-Id: <20161101180828.1590-1-johndale@cisco.com> X-Mailer: git-send-email 2.10.0 Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH] net/enic: fix max packet length check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2016 18:08:40 -0000 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 --- drivers/net/enic/enic_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 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 | -- 2.10.0