From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 59B39A04A3 for ; Fri, 5 Jun 2020 20:27:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5073E1D510; Fri, 5 Jun 2020 20:27:11 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 235C61D55E for ; Fri, 5 Jun 2020 20:27:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gYxbx6ljqix9qfg5uQmQ/3f+2k5LeMZ826XuDXFltqk=; b=NthHtfe+fGItr0gadtrD5bI5jov9RHmyzQXgdRuWpOvW8sUXqyyiHALbXmrgfdVRCozYRP oomPxVQgpLhg39ikQqdeGji8TbZg6TTNYQOYG1k0YNw+X4g7s3r7/jNqT+oh4ywS/qFKgs O0mMoHQRqZsG/naABH224gPU3fJtcNE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-uyAHOI73NpG18lbmayZ8Eg-1; Fri, 05 Jun 2020 14:27:05 -0400 X-MC-Unique: uyAHOI73NpG18lbmayZ8Eg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B52FF464; Fri, 5 Jun 2020 18:27:04 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id D317C60E1C; Fri, 5 Jun 2020 18:27:03 +0000 (UTC) From: Kevin Traynor To: Raslan Darawsheh Cc: Matan Azrad , dpdk stable Date: Fri, 5 Jun 2020 19:24:41 +0100 Message-Id: <20200605182525.22483-44-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix matching for UDP tunnels with Verbs' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 18.11.9 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/10/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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/9ff1e11cb7ae3314f1954cd5506faffa208fe543 Thanks. Kevin. --- >From 9ff1e11cb7ae3314f1954cd5506faffa208fe543 Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Wed, 6 May 2020 09:57:56 +0300 Subject: [PATCH] net/mlx5: fix matching for UDP tunnels with Verbs [ upstream commit 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 ] When creating flow rule with zero specs it will cause matching all UDP packets like following: eth / ipv4 / udp / vxlan / end Such rule will match all udp packets. This change the behavior to match the dv flow engine which will automatically set the match on relative outer UDP port if the user didn't specify any. Fixes: 84c406e74524 ("net/mlx5: add flow translate function") Signed-off-by: Raslan Darawsheh Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_verbs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 05a3db501f..eb740290d4 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -573,4 +573,26 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow, udp.val.dst_port &= udp.mask.dst_port; } + item++; + while (item->type == RTE_FLOW_ITEM_TYPE_VOID) + item++; + if (!(udp.val.dst_port & udp.mask.dst_port)) { + switch ((item)->type) { + case RTE_FLOW_ITEM_TYPE_VXLAN: + udp.val.dst_port = htons(MLX5_UDP_PORT_VXLAN); + udp.mask.dst_port = 0xffff; + break; + case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: + udp.val.dst_port = htons(MLX5_UDP_PORT_VXLAN_GPE); + udp.mask.dst_port = 0xffff; + break; + case RTE_FLOW_ITEM_TYPE_MPLS: + udp.val.dst_port = htons(MLX5_UDP_PORT_MPLS); + udp.mask.dst_port = 0xffff; + break; + default: + break; + } + } + flow_verbs_spec_add(&dev_flow->verbs, &udp, size); } -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-05 19:20:53.248504762 +0100 +++ 0044-net-mlx5-fix-matching-for-UDP-tunnels-with-Verbs.patch 2020-06-05 19:20:50.822040541 +0100 @@ -1 +1 @@ -From 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 Mon Sep 17 00:00:00 2001 +From 9ff1e11cb7ae3314f1954cd5506faffa208fe543 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 4659f0a7f7..c403f72be3 100644 +index 05a3db501f..eb740290d4 100644 @@ -28 +29 @@ -@@ -681,4 +681,26 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow, +@@ -573,4 +573,26 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,