From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1AF3AA0524 for ; Fri, 5 Feb 2021 12:33:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1527F40682; Fri, 5 Feb 2021 12:33:16 +0100 (CET) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 1622440682 for ; Fri, 5 Feb 2021 12:33:15 +0100 (CET) Received: by mail-wm1-f48.google.com with SMTP id j21so2937801wmj.0 for ; Fri, 05 Feb 2021 03:33:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IJbJ/ae+YX0IouLRavTwZAxQ7vAs/Bqq4HNhlkOsLz8=; b=Ll/3pMJlNZ5YTQm08Ye0eFzTeFI9t0yVU5mvL6MgxBkJYcj8u9FqHRwzwRYMhMayiI SEIS6Ajqefel5/h2oFgrnwlgtE2PuE+xGcF2Bth9jMexXN9hqPGDrOdb7FLfCPrLzDtm aUVdPv45P4XcE/ex9Z00tn4z6enzYgrwGSxNFHDFdQTQDZMVkwBY6Zg1UQL/DsjuMGDU CNP0Ttxbr2HmAZbRQTLJcD8mZP9parFNR4zK839b2drvq7m8B6JZR5+4CNP62pjVhVE+ px/Y1Ck24ueckWygxgHsCe5Jq2gdYXZ+aMxRKbAlJ8WEUXH+zE+FwgwDJDFuMxixKmfG MfcA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IJbJ/ae+YX0IouLRavTwZAxQ7vAs/Bqq4HNhlkOsLz8=; b=hsae7vlVv0Z1ALeFJqtw+pVvt2aWwNo8nke8oY83AgeD5vTHncA2D3UwBXoZYcxsr1 ozFYW6igZ0+V0E3uWOw4wSiaZU2mguVeF/toFsQyHykuIcE0DdARwI2apkjPX3Zn2Nhd WuYNoZd8J0tVsm/3YLAGjAnxZecx4lbUV8R+Ez1YKGR4Ui1OXmdhcTVtcmfSp0PNgCdU aWFNeT9wBqCQ61dx25aoZ7vBSk/4t53y41A2NokwoQCh99nQbs3NpQueM9/2W2LhZ76E Rwk+x+cX1MVoenarETOKDiv87QknPAEeJK4VA8f9drCCZcvYIKicOPUeoTAueFlRJ+Kc NB6A== X-Gm-Message-State: AOAM532m95pEzwsjKXnS80FnPKUQinb5WjQf4WWIFyvSpW/QrUKAPCLa 50uL2qCoaEp/bJ4hsRusTfvnkXunP6LB/+nf X-Google-Smtp-Source: ABdhPJz5mXlB7hQNr6fPZuXlLWPkKDp79IA1tD76U/b58OVg4Zm/f+NcwVZ5iSNAliE9MCEKOtvftg== X-Received: by 2002:a7b:cf33:: with SMTP id m19mr3220959wmg.53.1612524794855; Fri, 05 Feb 2021 03:33:14 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v13sm11962689wrd.51.2021.02.05.03.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:33:14 -0800 (PST) From: luca.boccassi@gmail.com To: Steve Yang Cc: Ferruh Yigit , dpdk stable Date: Fri, 5 Feb 2021 11:17:17 +0000 Message-Id: <20210205111920.1272063-151-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice: fix jumbo frame flag condition' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/54fcc7ffdabf42cd7d0816f01c78fe3564bb1cc1 Thanks. Luca Boccassi --- >From 54fcc7ffdabf42cd7d0816f01c78fe3564bb1cc1 Mon Sep 17 00:00:00 2001 From: Steve Yang Date: Mon, 18 Jan 2021 07:04:15 +0000 Subject: [PATCH] net/ice: fix jumbo frame flag condition [ upstream commit 14801aa3fb3587347c739d6e55afdbe130f319be ] The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition, but the Ether overhead is larger than 18 when it supports dual VLAN tags. That will cause the jumbo flag rx offload is wrong when MTU size is 'RTE_ETHER_MTU'. This fix will change the boundary condition with 'RTE_ETHER_MTU' and overhead, that perhaps impacts the cases of the jumbo frame related. Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF") Fixes: ae2bdd0219cb ("net/ice: support MTU setting") Fixes: 50370662b727 ("net/ice: support device and queue ops") Signed-off-by: Steve Yang Reviewed-by: Ferruh Yigit --- drivers/net/ice/ice_dcf_ethdev.c | 8 ++++---- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.h | 1 + drivers/net/ice/ice_rxtx.c | 10 +++++----- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index b0b2ecb0d6..e5c877805f 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -60,23 +60,23 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq) * correctly. */ if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { - if (max_pkt_len <= RTE_ETHER_MAX_LEN || + if (max_pkt_len <= ICE_ETH_MAX_LEN || max_pkt_len > ICE_FRAME_SIZE_MAX) { PMD_DRV_LOG(ERR, "maximum packet length must be " "larger than %u and smaller than %u, " "as jumbo frame is enabled", - (uint32_t)RTE_ETHER_MAX_LEN, + (uint32_t)ICE_ETH_MAX_LEN, (uint32_t)ICE_FRAME_SIZE_MAX); return -EINVAL; } } else { if (max_pkt_len < RTE_ETHER_MIN_LEN || - max_pkt_len > RTE_ETHER_MAX_LEN) { + max_pkt_len > ICE_ETH_MAX_LEN) { PMD_DRV_LOG(ERR, "maximum packet length must be " "larger than %u and smaller than %u, " "as jumbo frame is disabled", (uint32_t)RTE_ETHER_MIN_LEN, - (uint32_t)RTE_ETHER_MAX_LEN); + (uint32_t)ICE_ETH_MAX_LEN); return -EINVAL; } } diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 4dcaa87350..70e5f74b2f 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3912,7 +3912,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) return -EBUSY; } - if (frame_size > RTE_ETHER_MAX_LEN) + if (frame_size > ICE_ETH_MAX_LEN) dev_data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; else diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 899f446cde..2b03c59671 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -135,6 +135,7 @@ */ #define ICE_ETH_OVERHEAD \ (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + ICE_VLAN_TAG_SIZE * 2) +#define ICE_ETH_MAX_LEN (RTE_ETHER_MTU + ICE_ETH_OVERHEAD) #define ICE_RXTX_BYTES_HIGH(bytes) ((bytes) & ~ICE_40_BIT_MASK) #define ICE_RXTX_BYTES_LOW(bytes) ((bytes) & ICE_40_BIT_MASK) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index d052bd0f1b..c98328ce0b 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -246,23 +246,23 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq) dev->data->dev_conf.rxmode.max_rx_pkt_len); if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { - if (rxq->max_pkt_len <= RTE_ETHER_MAX_LEN || + if (rxq->max_pkt_len <= ICE_ETH_MAX_LEN || rxq->max_pkt_len > ICE_FRAME_SIZE_MAX) { PMD_DRV_LOG(ERR, "maximum packet length must " "be larger than %u and smaller than %u," "as jumbo frame is enabled", - (uint32_t)RTE_ETHER_MAX_LEN, + (uint32_t)ICE_ETH_MAX_LEN, (uint32_t)ICE_FRAME_SIZE_MAX); return -EINVAL; } } else { if (rxq->max_pkt_len < RTE_ETHER_MIN_LEN || - rxq->max_pkt_len > RTE_ETHER_MAX_LEN) { + rxq->max_pkt_len > ICE_ETH_MAX_LEN) { PMD_DRV_LOG(ERR, "maximum packet length must be " "larger than %u and smaller than %u, " "as jumbo frame is disabled", (uint32_t)RTE_ETHER_MIN_LEN, - (uint32_t)RTE_ETHER_MAX_LEN); + (uint32_t)ICE_ETH_MAX_LEN); return -EINVAL; } } @@ -701,7 +701,7 @@ ice_fdir_program_hw_rx_queue(struct ice_rx_queue *rxq) rx_ctx.hbuf = rxq->rx_hdr_len >> ICE_RLAN_CTX_HBUF_S; rx_ctx.dtype = 0; /* No Header Split mode */ rx_ctx.dsize = 1; /* 32B descriptors */ - rx_ctx.rxmax = RTE_ETHER_MAX_LEN; + rx_ctx.rxmax = ICE_ETH_MAX_LEN; /* TPH: Transaction Layer Packet (TLP) processing hints */ rx_ctx.tphrdesc_ena = 1; rx_ctx.tphwdesc_ena = 1; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:36.081911263 +0000 +++ 0151-net-ice-fix-jumbo-frame-flag-condition.patch 2021-02-05 11:18:29.086696443 +0000 @@ -1 +1 @@ -From 14801aa3fb3587347c739d6e55afdbe130f319be Mon Sep 17 00:00:00 2001 +From 54fcc7ffdabf42cd7d0816f01c78fe3564bb1cc1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 14801aa3fb3587347c739d6e55afdbe130f319be ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ -index a9e78064d4..d46734a57b 100644 +index b0b2ecb0d6..e5c877805f 100644 @@ -62 +63 @@ -index 7cee541112..ec29f0fe40 100644 +index 4dcaa87350..70e5f74b2f 100644 @@ -65 +66 @@ -@@ -3913,7 +3913,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) +@@ -3912,7 +3912,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) @@ -87 +88 @@ -index 2d3dd05c2f..7286e3a445 100644 +index d052bd0f1b..c98328ce0b 100644 @@ -90 +91 @@ -@@ -272,23 +272,23 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq) +@@ -246,23 +246,23 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq) @@ -118 +119 @@ -@@ -727,7 +727,7 @@ ice_fdir_program_hw_rx_queue(struct ice_rx_queue *rxq) +@@ -701,7 +701,7 @@ ice_fdir_program_hw_rx_queue(struct ice_rx_queue *rxq)