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 9A4ABA0547 for ; Wed, 11 Aug 2021 13:23:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8063F40042; Wed, 11 Aug 2021 13:23:14 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id D8FC540042 for ; Wed, 11 Aug 2021 13:23:13 +0200 (CEST) Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id 82EAA3F357 for ; Wed, 11 Aug 2021 11:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628680993; bh=86JW7iF3POymh9W5Izjma7P7MYvHE8LdWeS+w1OElnk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=UzTsEUtldGovHnX3GwgsfKdlSG6/ER4ibTVcJGgM538ESFSLJK7Yn0sexeZydyeFt jr82AKttIqey7+xteyU1NHzZNqmTEfT8SCqwTfTDP0rZkIGbkrlznbOJBgrIMef4na xohgL/s+Q9CX75i7z7wGVvZgxpkrJ5t3sycJhHdOH8NRQZ4OyQlRDpUNp9g6ThSgNM wG9kWuuXbTXYzgH6eBqheUqDr4n3iBgJAcO8ONMjDfVMZ41C+ZBwVTyMAAgvLHPaBX AfUW+VeRHIyYqf6WtP1BTS8EZ1pjGLddIT+/0/o4mVKyPnPdBfYgHCUvoVLY2pnZX7 w4gZUAiVDQZAA== Received: by mail-qk1-f197.google.com with SMTP id o17-20020ae9f5110000b02903d22e54c86eso1146939qkg.8 for ; Wed, 11 Aug 2021 04:23:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=86JW7iF3POymh9W5Izjma7P7MYvHE8LdWeS+w1OElnk=; b=oiDnLWPezn3QibLI00C96OVgsJqeLh5faQ3KRGz+bJbdmYSxMqSKCnopfA/gfJeM44 cNoOpyPZLQgBH8fkFuyagfAxsLbHL4hlSzcWz0CKs9eftYYZdT64T5dlzXZe5DCrOx+3 8CYdSi+0oqz/MSlUMZQTHe9IVA4PrjA1X4X4ODBSJJFt/KaxS4z9VygprWvq0v+9nzNf 1Tk/8zIthlBRUq6O3lcLgCs8WtJ9bIrTrJz8rY832Iyl4jih96SPPaO1RP2M0ECtISTX txDLu9FFeRAPRkilbhCOLmNqwPP9BthBi4i+eLnHcV7fPMD5CH1fs7y76LFibTDJDLvE +1YA== X-Gm-Message-State: AOAM533RPFYyV78xaecLGWX1wZiqJKX9cpiw3JQzuPAvYGWXqG9pvObI 8Esrh+OVjgbzlw2grN/WDy/DZkw/pQXT4/xPKhLRdDJn3/Dm80CPhbFeiLkQN3j0XE6Cct2etq/ oZv+tr2D3GGnqzr+QCxZvnIVrr09mVZOMNyNXceDI X-Received: by 2002:a05:620a:1007:: with SMTP id z7mr20548809qkj.462.1628680992419; Wed, 11 Aug 2021 04:23:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy8hfrdAfCwLexlYbIaP9jZ3ofi7tdqNMPV6MfD3KLMiiNQp1x8bOCvve/NR7N5wXUnR9RzgFf1ezQKZWZ9rQ= X-Received: by 2002:a05:620a:1007:: with SMTP id z7mr20548794qkj.462.1628680992238; Wed, 11 Aug 2021 04:23:12 -0700 (PDT) MIME-Version: 1.0 References: <20210811101941.2001164-1-lmargalit@nvidia.com> In-Reply-To: <20210811101941.2001164-1-lmargalit@nvidia.com> From: Christian Ehrhardt Date: Wed, 11 Aug 2021 13:22:46 +0200 Message-ID: To: Lior Margalit Cc: dpdk stable , Matan Azrad , Ori Kam Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH 19.11] net/mlx5: fix IPIP multi-tunnel validation 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" On Wed, Aug 11, 2021 at 12:20 PM Lior Margalit wrote: > > [ upstream commit fa06906a48 ] Thank you, applied > A flow rule must not include multiple tunnel layers. > An attempt to create such a rule, for example: > testpmd> flow create .../ vxlan / eth / ipv4 proto is 4 / end > results in an unclear error. > > In the current implementation there is a check for > multiple IPIP tunnels, but not for combination of IPIP > and a different kind of tunnel, such as VXLAN. The fix > is to enhance the above check to use MLX5_FLOW_LAYER_TUNNEL > that consists of all the tunnel masks. The error message > will be "multiple tunnel not supported". > > Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel") > > Signed-off-by: Lior Margalit > Acked-by: Ori Kam > Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5_flow.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 65064ffb0..005171d09 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1589,7 +1589,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, > RTE_FLOW_ERROR_TYPE_ITEM, item, > "IPv4 cannot follow L2/VLAN layer " > "which ether type is not IPv4"); > - if (item_flags & MLX5_FLOW_LAYER_IPIP) { > + if (item_flags & MLX5_FLOW_LAYER_TUNNEL) { > if (mask && spec) > next_proto = mask->hdr.next_proto_id & > spec->hdr.next_proto_id; > @@ -1691,7 +1691,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, > RTE_FLOW_ERROR_TYPE_ITEM, item, > "IPv6 cannot follow L2/VLAN layer " > "which ether type is not IPv6"); > - if (item_flags & MLX5_FLOW_LAYER_IPV6_ENCAP) { > + if (item_flags & MLX5_FLOW_LAYER_TUNNEL) { > if (mask && spec) > next_proto = mask->hdr.proto & spec->hdr.proto; > if (next_proto == IPPROTO_IPIP || next_proto == IPPROTO_IPV6) > -- > 2.25.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd