DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gregory Etelson <gregory@weka.io>
To: dev <dev@dpdk.org>
Cc: Jingjing Wu <jingjing.wu@intel.com>, Helin Zhang <helin.zhang@intel.com>
Subject: [dpdk-dev] [PATCH] i40e jumbo frames fix
Date: Wed, 21 Dec 2016 07:15:35 +0200	[thread overview]
Message-ID: <6898922.CcrIbCjOjV@polaris> (raw)

Allow i40e PF and VF ports to operate with Ethernet jumbo frames 


Signed-off-by: Gregory Etelson <gregory@weka.io>

---
 drivers/net/i40e/i40e_ethdev_vf.c |    2 +-
 drivers/net/i40e/i40e_rxtx.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index aa306d6..cf814e9 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1784,7 +1784,7 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
 	 * Check if the jumbo frame and maximum packet length are set correctly
 	 */
 	if (dev_data->dev_conf.rxmode.jumbo_frame == 1) {
-		if (rxq->max_pkt_len <= ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len < ETHER_MAX_LEN ||
 		    rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must be "
 				"larger than %u and smaller than %u, as jumbo "
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 7ae7d9f..8cb4655 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2324,7 +2324,7 @@ static inline int __attribute__((always_inline))
 	len = hw->func_caps.rx_buf_chain_len * rxq->rx_buf_len;
 	rxq->max_pkt_len = RTE_MIN(len, data->dev_conf.rxmode.max_rx_pkt_len);
 	if (data->dev_conf.rxmode.jumbo_frame == 1) {
-		if (rxq->max_pkt_len <= ETHER_MAX_LEN ||
+		if (rxq->max_pkt_len < ETHER_MAX_LEN ||
 			rxq->max_pkt_len > I40E_FRAME_SIZE_MAX) {
 			PMD_DRV_LOG(ERR, "maximum packet length must "
 				    "be larger than %u and smaller than %u,"
-- 
1.7.1

             reply	other threads:[~2016-12-21  5:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-21  5:15 Gregory Etelson [this message]
     [not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E71A973ACC@SHSMSX103.ccr.corp.intel.com>
2016-12-21  5:44   ` Zhang, Helin

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=6898922.CcrIbCjOjV@polaris \
    --to=gregory@weka.io \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    /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).