From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id CAD49A0527
	for <public@inbox.dpdk.org>; Mon,  9 Nov 2020 19:45:11 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id C3C9E6883;
	Mon,  9 Nov 2020 19:45:10 +0100 (CET)
Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com
 [209.85.221.41]) by dpdk.org (Postfix) with ESMTP id 3609A6883
 for <stable@dpdk.org>; Mon,  9 Nov 2020 19:45:08 +0100 (CET)
Received: by mail-wr1-f41.google.com with SMTP id w1so9897827wrm.4
 for <stable@dpdk.org>; Mon, 09 Nov 2020 10:45:08 -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=P3W4ea9fOr7ZJMat1WqmMVoevE3e8ayP4wZHC8lstmg=;
 b=cWvyx5Mlwfe/fWBZHDv2pQRdT3EKkoYm57wTUDrQrdTHGY1pbeMkHyTBRaotysI2d7
 qr8tEawCco8dtPiStUefOUf59+sMeuYT4I4ExSv5IZKd2stMUyIevYfeW7Klr/cq78Gh
 6TTG7ZCLqSNLh8pbVqFkEPachPG0teiBfjpocRQGXeC1VdhSx7f/2km2JVwrirrjQvvs
 YDlSGeddJUXasEG0YrU8k0rA/f7gVC9Z5jQZErapx/fvxfgtliyMRdEgZ8IFLkygCWNl
 UtkZSERj9lE57P0se4FWK6HieeE7BKFwZhXZP/I5JvtMiOTy2ew/cdHoeNBbslhBkBsb
 2Xvw==
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=P3W4ea9fOr7ZJMat1WqmMVoevE3e8ayP4wZHC8lstmg=;
 b=AHUvxFRp29N2FmwxbtHJuFpllxhOaFS8xrLlzTFBc0TrQOsB7OLcPd0t9d+++n5YEb
 Jd/72Z7yIVvHdF5HY0+xmbrvCQgKgGZYSiU6SdbUa+9HTTyCkiSmsSOWnvLvM+Gsz9Co
 RjyV6lGuXvNEKlxvD/uyw1Qc9Mo1U6owo/PZlZvPr1jWanoznzWT32djV6CPa3nomwCU
 G54wTzzaRMn/DHGRBiYbs5/Y5l+JfCa7cdt8bKX9ryKnMcg83KHPs6kgrJbuoQaB6569
 eqs0xGuWlPqQq9Z2RgVS0/ecjji7CZd8maFH4U3qI0Zm/XrAWmIeg4kZlQsdjRdo1UJf
 RmPA==
X-Gm-Message-State: AOAM531Sfw0z0veT8TsAabF1P8zZEhXniLyFaxlblW0U35mavG92xHEo
 4QCQrQkJDi0W0CPkeRAUaijlFlzFJmMTwwKN
X-Google-Smtp-Source: ABdhPJwKt08xXyKtiAjjudPnDQTiJqfj860mZUxmiKHw5JT+kruwc5iVT0FKsNrV3cGoXcQ+isHx9w==
X-Received: by 2002:adf:cd8d:: with SMTP id q13mr7204153wrj.61.1604947507002; 
 Mon, 09 Nov 2020 10:45:07 -0800 (PST)
Received: from localhost ([88.98.246.218])
 by smtp.gmail.com with ESMTPSA id y185sm308892wmb.29.2020.11.09.10.45.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 09 Nov 2020 10:45:06 -0800 (PST)
From: luca.boccassi@gmail.com
To: Hyong Youb Kim <hyonkim@cisco.com>
Cc: John Daley <johndale@cisco.com>,
	dpdk stable <stable@dpdk.org>
Date: Mon,  9 Nov 2020 18:40:54 +0000
Message-Id: <20201109184111.3463090-66-luca.boccassi@gmail.com>
X-Mailer: git-send-email 2.27.0
In-Reply-To: <20201109184111.3463090-1-luca.boccassi@gmail.com>
References: <20201028104606.3504127-207-luca.boccassi@gmail.com>
 <20201109184111.3463090-1-luca.boccassi@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-stable] patch 'net/enic: fix header sizes when copying flow
	patterns' has been queued to stable release 19.11.6
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org
Sender: "stable" <stable-bounces@dpdk.org>

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. 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/87cb9574f46f2b70e0ad7cb08a3c6f58fc04123b

Thanks.

Luca Boccassi

---
>From 87cb9574f46f2b70e0ad7cb08a3c6f58fc04123b Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Fri, 30 Oct 2020 00:27:49 -0700
Subject: [PATCH] net/enic: fix header sizes when copying flow patterns

[ upstream commit dd649913cca40dd2a7bbd50d63e82b8b75267795 ]

Several functions use sizeof(struct rte_flow_item_eth) and
sizeof(struct rte_flow_item_ipv6) when copying headers. These sizes
used to coincide with the sizes of rte_ether_hdr and
rte_ipv6_hdr. But, with recently added fields, rte_flow_item_eth and
rte_flow_item_ipv6 have grown in size. Use sizeof(rte_ether_hdr) and
sizeof(rte_ipv6_hdr) instead.

Coverity issue: 363572, 363573
Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_fm_flow.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index ab008c7356..e87988f48b 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -312,8 +312,8 @@ enic_fm_copy_item_eth(struct copy_item_args *arg)
 	fm_mask = &entry->ftm_mask.fk_hdrset[lvl];
 	fm_data->fk_header_select |= FKH_ETHER;
 	fm_mask->fk_header_select |= FKH_ETHER;
-	memcpy(&fm_data->l2.eth, spec, sizeof(*spec));
-	memcpy(&fm_mask->l2.eth, mask, sizeof(*mask));
+	memcpy(&fm_data->l2.eth, spec, sizeof(struct rte_ether_hdr));
+	memcpy(&fm_mask->l2.eth, mask, sizeof(struct rte_ether_hdr));
 	return 0;
 }
 
@@ -423,8 +423,8 @@ enic_fm_copy_item_ipv6(struct copy_item_args *arg)
 
 	fm_data->fk_header_select |= FKH_IPV6;
 	fm_mask->fk_header_select |= FKH_IPV6;
-	memcpy(&fm_data->l3.ip6, spec, sizeof(*spec));
-	memcpy(&fm_mask->l3.ip6, mask, sizeof(*mask));
+	memcpy(&fm_data->l3.ip6, spec, sizeof(struct rte_ipv6_hdr));
+	memcpy(&fm_mask->l3.ip6, mask, sizeof(struct rte_ipv6_hdr));
 	return 0;
 }
 
@@ -970,7 +970,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
 	eth = (struct rte_ether_hdr *)template;
 	ethertype = &eth->ether_type;
 	append_template(&template, &off, item->spec,
-			sizeof(struct rte_flow_item_eth));
+			sizeof(struct rte_ether_hdr));
 	item++;
 	flow_item_skip_void(&item);
 	/* Optional VLAN */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.667422237 +0000
+++ 0066-net-enic-fix-header-sizes-when-copying-flow-patterns.patch	2020-11-09 18:40:11.203312403 +0000
@@ -1 +1 @@
-From dd649913cca40dd2a7bbd50d63e82b8b75267795 Mon Sep 17 00:00:00 2001
+From 87cb9574f46f2b70e0ad7cb08a3c6f58fc04123b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd649913cca40dd2a7bbd50d63e82b8b75267795 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 9cea94269c..86b91ed8b1 100644
+index ab008c7356..e87988f48b 100644
@@ -27 +28 @@
-@@ -368,8 +368,8 @@ enic_fm_copy_item_eth(struct copy_item_args *arg)
+@@ -312,8 +312,8 @@ enic_fm_copy_item_eth(struct copy_item_args *arg)
@@ -38 +39 @@
-@@ -479,8 +479,8 @@ enic_fm_copy_item_ipv6(struct copy_item_args *arg)
+@@ -423,8 +423,8 @@ enic_fm_copy_item_ipv6(struct copy_item_args *arg)
@@ -49 +50 @@
-@@ -1047,7 +1047,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
+@@ -970,7 +970,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,