From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id CA83BFC07 for ; Wed, 21 Dec 2016 06:15:37 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id g23so12326461wme.1 for ; Tue, 20 Dec 2016 21:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weka-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :mime-version:content-transfer-encoding; bh=6GEzs6iUTYoGeK6M4mikfdHW1DeFowgv/VVAC1do0Mo=; b=JQ/vRPBQLfh5h2aKzsm518FI6dhYsdI1iR4FgzqVEz6WCm6bDDPWRlhG7mSw8tM6vQ h2S3aue145RsR2JJ/oef6bN5oMoBG5csbc8jBAaEvc3qBvDOEx3ROqO2P/3GRqCRQrUE MBSRW/RjsCEhCqpBmirbsOAvBhv2mXk47itKmQMypdlzAVhKboljiPA876xeVGUNC1lw yfaUbeBskZMVIGF79C1GwH83el0WD+hvSDfqI7XyMffZcvfSN+fTL1mY1EYw50hxF5vr 2JhwoaoIfss+E4NBsgXgutiEqkJpU/cLzci7MshJHXwQQzjCk5Up0HS2bg+fzPysnckd TzOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:mime-version:content-transfer-encoding; bh=6GEzs6iUTYoGeK6M4mikfdHW1DeFowgv/VVAC1do0Mo=; b=E6qaljAPNEI7Zrmx+ispho5jnGfN72VAM9f8KhkDI6Gky3+0ngm+Ki/mwP4x6S78hi JYMo3YU3b6FN1v8ZSN8b0lrdVIx4Tq5bk28x/bbSBmawZt383TPAi0aiOSSRL1cQPCpw NFOVq+2a/aMgNO8z/fdL+ikWjFePvx6Ww0vdzLMTX5b1hwWXF0dKftSvpaBDExacutuq jaEBMtJg1PKw45bisnPM1lVojbb44UAmGOnsJJTsDS/Iha/nBEqbmztunEKQHiNLdkfm oV95PhPH1HS5cvtZpFvtJjNOBCSF11RvMEsXDnaZztI5qyTbgM+gimlxksLcFQCGVdmu 2aCA== X-Gm-Message-State: AIkVDXKygU7t/hOr+Lz66hlVufmjNRNmbVoD1efB8sFgp89CXpLZ+igl7/s4KU/wOFe5kw== X-Received: by 10.28.71.137 with SMTP id m9mr4761173wmi.88.1482297337455; Tue, 20 Dec 2016 21:15:37 -0800 (PST) Received: from polaris.localnet (bzq-82-81-85-138.red.bezeqint.net. [82.81.85.138]) by smtp.gmail.com with ESMTPSA id d85sm25244944wmd.17.2016.12.20.21.15.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Dec 2016 21:15:36 -0800 (PST) From: Gregory Etelson To: dev Cc: Jingjing Wu , Helin Zhang Date: Wed, 21 Dec 2016 07:15:35 +0200 Message-ID: <6898922.CcrIbCjOjV@polaris> Organization: Weka.IO User-Agent: KMail/5.3.2 (Linux/4.8.12-200.fc24.x86_64; KDE/5.27.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [PATCH] i40e jumbo frames fix X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2016 05:15:37 -0000 Allow i40e PF and VF ports to operate with Ethernet jumbo frames Signed-off-by: Gregory Etelson --- 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