From: John Daley <johndale@cisco.com>
To: bruce.richardson@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/enic: fix max packet length check
Date: Tue, 1 Nov 2016 11:08:28 -0700 [thread overview]
Message-ID: <20161101180828.1590-1-johndale@cisco.com> (raw)
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>
---
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
next reply other threads:[~2016-11-01 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 18:08 John Daley [this message]
2016-11-07 17:00 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161101180828.1590-1-johndale@cisco.com \
--to=johndale@cisco.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).