From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yliu@fridaylinux.org>
Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com
 [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id 63E6F2C8
 for <stable@dpdk.org>; Tue, 20 Jun 2017 13:37:11 +0200 (CEST)
Received: by mail-pf0-f193.google.com with SMTP id y7so22251143pfd.3
 for <stable@dpdk.org>; Tue, 20 Jun 2017 04:37:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=fridaylinux-org.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:date:message-id:in-reply-to:references;
 bh=UHrux8wLrS+xwUfozuTdNNGjMkx5UYAUmkctYmrRbHc=;
 b=c3xFDWv4n9fvAj8JiObgMrlrTC5so8QCzcvhMpiFJDwYF6BBaINkD52JcMdSpWrKcD
 jb4jBBd/EJYucr1lYbgw12NwcNCenxiYDF78lEnaTSELVBzBXEjo5KTng4QK+GGYJDu7
 VZolIq+iixC4YMynotkWQQpl6mE2eBb59P/u7uPNQQGyFqHqxasgOM9p/Gd2uIJ0t7Zr
 WD2sq0nlrynYFkWh+LhWrZ/zDmKJPrzQYwNCc1HL+74MTRIVoix+qWRRjkkQiWgo9g5g
 /n+7U0aQCIbZHNDuxr2eAFxaD5gXR5IIAolL67+aFPB7NmPWU8k8uHF6D+Dj0Le9oVhJ
 A39w==
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;
 bh=UHrux8wLrS+xwUfozuTdNNGjMkx5UYAUmkctYmrRbHc=;
 b=A2y1GfkGWwNESWm92fgPJsYH49O4T1vFT97P+cZZrr8DxqmVWYNYzyFC2MqDUIaP+9
 DBXGpbmAm/1RbPWzrrIEHmHaJVEMV1anxGTcX9ueABEhowjKkjJFnrqY431Cw6/RYavs
 mHARA1BDLb+3C/K4j8L20xocP3iLUSO/YopD18nz3FN/IPubzpCptXTv0Qy70lo9WJq8
 DtWJ06kiYGzReZqW6jiUFCbgrzcaWPLsxHLBi8njv1wvKji5HTPOEnW6KKpmNczXk98z
 cdjz9S2zGd7Sqn7OsTWbR1XzDkQFtVNl0+DlNLIIQfhF2HWICma/g9PHeywfZNV6Cc3T
 Un9A==
X-Gm-Message-State: AKS2vOyHEV5rkUWn+C3czRu0QcCiXcbGH8egRMb96dxu5PHqMLXgbtGA
 QqR+/oUsOqw9ASQV
X-Received: by 10.98.7.204 with SMTP id 73mr30393611pfh.175.1497958630086;
 Tue, 20 Jun 2017 04:37:10 -0700 (PDT)
Received: from yliu-home.localdomain ([45.63.61.64])
 by smtp.gmail.com with ESMTPSA id 25sm6104783pfj.59.2017.06.20.04.37.07
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 20 Jun 2017 04:37:09 -0700 (PDT)
From: Yuanhan Liu <yliu@fridaylinux.org>
To: Pascal Mazon <pascal.mazon@6wind.com>
Cc: dpdk stable <stable@dpdk.org>
Date: Tue, 20 Jun 2017 19:35:27 +0800
Message-Id: <1497958550-13600-15-git-send-email-yliu@fridaylinux.org>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org>
References: <1497958550-13600-1-git-send-email-yliu@fridaylinux.org>
Subject: [dpdk-stable] patch 'net/tap: fix some flow collision' has been
	queued to stable release 17.05.1
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: <http://dpdk.org/ml/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Jun 2017 11:37:11 -0000

Hi,

FYI, your patch has been queued to stable release 17.05.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 06/22/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>>From 0bd27f8dd39ce19ea60a07eceea584f678b13bca Mon Sep 17 00:00:00 2001
From: Pascal Mazon <pascal.mazon@6wind.com>
Date: Mon, 22 May 2017 13:19:53 +0200
Subject: [PATCH] net/tap: fix some flow collision

[ upstream commit f96fe1ab35b74b1e0914bc8a99aac633c5b15807 ]

The following two flow rules (testpmd syntax) should not collide:
flow create 0 priority 1 ingress pattern eth / ipv4 / end actions drop / end
flow create 0 priority 1 ingress pattern eth / ipv6 / end actions drop / end

But the eth_type in the associated TC rule was set to either "ip" or
"ipv6".  For TC, they could thus not have the same priority.

Use ETH_P_ALL only in the TC message to make sure those rules can
coexist.

Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
---
 drivers/net/tap/tap_flow.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index cf1c8a2..a0dd504 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -401,9 +401,6 @@ tap_flow_create_eth(const struct rte_flow_item *item, void *data)
 	if (!flow)
 		return 0;
 	msg = &flow->msg;
-	if (spec->type & mask->type)
-		msg->t.tcm_info = TC_H_MAKE(msg->t.tcm_info,
-					    (spec->type & mask->type));
 	if (!is_zero_ether_addr(&spec->dst)) {
 		nlattr_add(&msg->nh, TCA_FLOWER_KEY_ETH_DST, ETHER_ADDR_LEN,
 			   &spec->dst.addr_bytes);
@@ -508,8 +505,6 @@ tap_flow_create_ipv4(const struct rte_flow_item *item, void *data)
 	msg = &flow->msg;
 	if (!info->eth_type)
 		info->eth_type = htons(ETH_P_IP);
-	if (!info->vlan)
-		msg->t.tcm_info = TC_H_MAKE(msg->t.tcm_info, htons(ETH_P_IP));
 	if (!spec)
 		return 0;
 	if (spec->hdr.dst_addr) {
@@ -566,8 +561,6 @@ tap_flow_create_ipv6(const struct rte_flow_item *item, void *data)
 	msg = &flow->msg;
 	if (!info->eth_type)
 		info->eth_type = htons(ETH_P_IPV6);
-	if (!info->vlan)
-		msg->t.tcm_info = TC_H_MAKE(msg->t.tcm_info, htons(ETH_P_IPV6));
 	if (!spec)
 		return 0;
 	if (memcmp(spec->hdr.dst_addr, empty_addr, 16)) {
-- 
2.7.4