[dpdk-dev] i40e jumbo frames fix

Message ID 6898922.CcrIbCjOjV@polaris (mailing list archive)
State Not Applicable, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Gregory Etelson Dec. 21, 2016, 5:15 a.m. UTC
  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(-)
  

Comments

Zhang, Helin Dec. 21, 2016, 5:44 a.m. UTC | #1
> From: Gregory Etelson [mailto:gregory@weka.io]
> Sent: Wednesday, December 21, 2016 1:16 PM
> To: dev
> Cc: Wu, Jingjing; Zhang, Helin
> Subject: [PATCH] i40e jumbo frames fix
The format of the title is not corect as requried by DPDK community.
Please refer to other patches.
> 
> Allow i40e PF and VF ports to operate with Ethernet jumbo frames
Can you help to explain what's the issue? I am a little bit confused.

> 
> 
> 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
> 
> 
>
  

Patch

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,"