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 967F1A0548 for ; Fri, 3 Dec 2021 07:07:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46A8040041; Fri, 3 Dec 2021 07:07:14 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 5FC5340041 for ; Fri, 3 Dec 2021 07:07:12 +0100 (CET) Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (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-internal-0.canonical.com (Postfix) with ESMTPS id 227853F1F7 for ; Fri, 3 Dec 2021 06:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638511632; bh=Z2uiWzE3XIgpgrB9WekoCdc4v+swfEnyRBLMwcZ2bAg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=t70ycoF3FHM6SfPIErvdmsYAto6AoxzjCB/lOtFXspEwsY585moUbxj9K8LeZB1SD fIt3VOhLRVg8EM0JwB5LV8YK/z+JvQbjgnRioCWsdM9ZZGz9BAbkcxzGT9P/rccLtA jollD+YqDEhFEUgA+wGfURpP8t1gaqpAZaiDyNTmBaDrGMDUxzZFAjbc6D9Rh6g8UN RZ9aXcAihpTMb1QBWxn7OGjCq2uVOhJeX25Gjp5PCrK3Ojk4YHbsrBqKFxQbVNxnZC udwTpxlbHdVsXQcOT+F+11UHO9HRZ0nx9L9cD68rLU0rUGBLY19/nDCDlfeQSto3pt 4y/Q1YXihvBsg== Received: by mail-qv1-f70.google.com with SMTP id h14-20020a0562140dae00b003ae664126e9so2379827qvh.3 for ; Thu, 02 Dec 2021 22:07:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z2uiWzE3XIgpgrB9WekoCdc4v+swfEnyRBLMwcZ2bAg=; b=027LtseiarEnoR+UT9lHke0wgb8yd9eC22h/bZgy02cl1RhafgwPzd2hP2dxJsCLHe fZ4tpmtNxnwS1ZJpQULfUomQQIvUS5NyS1NOysy7O5ApTGG1UDRXFRoaEkc4HpKGIdLo e9B21LdjAV+yibL8TKQ8zSnehIDFyPDKZ516P4dRJIMZUJMDGmPlqUh54fabEoOT4db9 hHHgiugLPAiZYlp4EtXYUUZ9nmUlBZI5GOiYtg23H73ofnh8QmtRPaBhgpbhe6Vzv7N6 U1wfn8n7eM/kF7L0BnyMKGwMvuZkKh/6GJRoyFsIXnOxr15dCrck0nY5LjMwqSqzKm0J ojPA== X-Gm-Message-State: AOAM533bjFUvJ5RneV81XB7tzdRWMu6JM4pqrH6swClnxJoS8dmijsyQ amyTjfnwGBHOvqoX5ULCTTXhO/6exXpBxYnEHqGBs9WDNlRl8mRw2ziUl506zMmrvBUaKLcS9YM bwTFRVPdLGGB9/v+8/oL6/39mgowObxcsLFsK2692 X-Received: by 2002:a05:620a:1aa0:: with SMTP id bl32mr16691193qkb.140.1638511631040; Thu, 02 Dec 2021 22:07:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyCQQxCFq51tTfl1rC8XLuJtdA22aYEpeSZUe+qnh+SY4EcnPN1WKUaMyc1bI2akEL5h10u1dzu4QqOzr5TDo= X-Received: by 2002:a05:620a:1aa0:: with SMTP id bl32mr16691181qkb.140.1638511630809; Thu, 02 Dec 2021 22:07:10 -0800 (PST) MIME-Version: 1.0 References: <20211202160409.26762-1-getelson@nvidia.com> In-Reply-To: <20211202160409.26762-1-getelson@nvidia.com> From: Christian Ehrhardt Date: Fri, 3 Dec 2021 07:06:45 +0100 Message-ID: Subject: Re: [PATCH 19.11 6/6] net/mlx5: fix GENEVE and VXLAN-GPE flow item matching To: Gregory Etelson Cc: stable@dpdk.org, Alexander Kozyrev , Viacheslav Ovsiienko , Matan Azrad , Shahaf Shuler Content-Type: text/plain; charset="UTF-8" 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 On Thu, Dec 2, 2021 at 5:04 PM Gregory Etelson wrote: > > From: Alexander Kozyrev > > [ upstream commit 94421842de9a821778b95b928945ed8ea382302d ] Thank you for the backports, patch 2 of the series was already applied - the other 5 I added now. > GENEVE and VXLAN-GPE item matching is done similarly to GRE matching. > Users can skip the specification of the protocol type and expect that > this type is deducted from the inner header type automatically. > But the inner header type may not be specified in order to match all the > protocol types. In this case, PMD should not specify the protocol type. > Check if we have the inner header type before setting the protocol type. > > Fixes: 690391dd0e8b ("net/mlx5: fix GENEVE protocol type translation") > Fixes: 861fa3796f75 ("net/mlx5: fix VXLAN-GPE next protocol translation") > Cc: stable@dpdk.org > > Signed-off-by: Alexander Kozyrev > Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c > index cd55deaf56..4766ce155d 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -6119,7 +6119,6 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key, > m_protocol = vxlan_m->protocol; > v_protocol = vxlan_v->protocol; > if (!m_protocol) { > - m_protocol = 0xff; > /* Force next protocol to ensure next headers parsing. */ > if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2) > v_protocol = RTE_VXLAN_GPE_TYPE_ETH; > @@ -6127,6 +6126,8 @@ flow_dv_translate_item_vxlan_gpe(void *matcher, void *key, > v_protocol = RTE_VXLAN_GPE_TYPE_IPV4; > else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6) > v_protocol = RTE_VXLAN_GPE_TYPE_IPV6; > + if (v_protocol) > + m_protocol = 0xFF; > } > MLX5_SET(fte_match_set_misc3, misc_m, > outer_vxlan_gpe_next_protocol, m_protocol); > @@ -6197,8 +6198,9 @@ flow_dv_translate_item_geneve(void *matcher, void *key, > protocol_v = rte_be_to_cpu_16(geneve_v->protocol); > if (!protocol_m) { > /* Force next protocol to prevent matchers duplication */ > - protocol_m = 0xFFFF; > protocol_v = mlx5_translate_tunnel_etypes(pattern_flags); > + if (protocol_v) > + protocol_m = 0xFFFF; > } > MLX5_SET(fte_match_set_misc, misc_m, geneve_protocol_type, protocol_m); > MLX5_SET(fte_match_set_misc, misc_v, geneve_protocol_type, > -- > 2.34.0 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd