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 776A842FA2 for ; Mon, 31 Jul 2023 11:14:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 723AA40A89; Mon, 31 Jul 2023 11:14:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 39D1440150 for ; Mon, 31 Jul 2023 11:14:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690794852; 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=BfGgtQq1P0ba9BdPC884Twm3iWtR0+96tRJBa0Y0sKI=; b=D3AwFK1UUoixYap3iEk/U+HoHjd/jvICRs+LK4U/JJM3/b1PdbiOINUpahmWRSBPl8cTU0 D0tAhW5/9z4FyebwmodtpmCdrn6ikUfzHIMn3k4LXHAL9Pmu4m240SzcW7I3J/h8dssJFM e+UnS2lXIdnCHziUyQWxiVbKHJjk23s= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-YypUUPDoPgO9XG-wE73cgg-1; Mon, 31 Jul 2023 05:14:08 -0400 X-MC-Unique: YypUUPDoPgO9XG-wE73cgg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-314394a798dso2132427f8f.0 for ; Mon, 31 Jul 2023 02:14:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690794847; x=1691399647; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BfGgtQq1P0ba9BdPC884Twm3iWtR0+96tRJBa0Y0sKI=; b=TvK9K+RkjFgMvqk/l5b5QUfA8p9Mu752IGeO4coN8jOKAfXqQ+f4J2S2spitX1sXJW 4zz9tYZVmEbsDGAtsMjxaoapszH/BRTNP57EXBW7BYd3xOUGuLhME4wBDvqJ6y1EAJSN eXmRiP7WNsIIMT0Mg0dtJ13L2fK/gwd0lsnGwbjoUu3So/nr0JjSIGrHUWwEFzWSIQAz 9rNECX0MJPzMlC6r/K1PdpjI6Iqnd13ZS6KOMUcXCG7mgS1U0EyVZMeeOyMKFKrUnI6Y 9RUHty7EfB7hCQrjzClkHKqJxu4bKp9sMHhFGmhoomw4vp2tvHignnEruGxVM08/E4ms hyZw== X-Gm-Message-State: ABy/qLYWSA8b8tlsI/wZ49CNpwSRdMqvcIAob970KNm7hWEiDafmNGqD UJH7BXmcGkyXQie1YbHfxNU9ebTDhYW5qB0kHwUx/c3imKtnBYDJizGsGGTEFnKmKBNqFe4vUR6 loIpywZg= X-Received: by 2002:adf:e489:0:b0:317:5f35:854a with SMTP id i9-20020adfe489000000b003175f35854amr10296590wrm.13.1690794847036; Mon, 31 Jul 2023 02:14:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMrDVcJcINlCGewWCRaQ9uvDJgh+b2U+HidEXHQFebJxydiX9Rwd0+uWc311GjAPwixH8NNA== X-Received: by 2002:adf:e489:0:b0:317:5f35:854a with SMTP id i9-20020adfe489000000b003175f35854amr10296578wrm.13.1690794846797; Mon, 31 Jul 2023 02:14:06 -0700 (PDT) Received: from [192.168.0.36] ([78.17.184.75]) by smtp.gmail.com with ESMTPSA id g18-20020a5d5552000000b003142439c7bcsm12389932wrw.80.2023.07.31.02.14.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 02:14:06 -0700 (PDT) Message-ID: <9aba4a8a-8fe1-eb5e-461c-0be79eb11533@redhat.com> Date: Mon, 31 Jul 2023 10:14:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 21.11] net/mlx5: fix drop action attribute validation To: Dariusz Sosnowski , stable@dpdk.org Cc: Viacheslav Ovsiienko , Matan Azrad , Jiawei Wang , Suanming Mou References: <20230728182518.1302464-1-dsosnowski@nvidia.com> From: Kevin Traynor In-Reply-To: <20230728182518.1302464-1-dsosnowski@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 28/07/2023 19:25, Dariusz Sosnowski wrote: > [ upstream commit c1f0cdae14c5399cd6201e6cf39d5e51f60c6efb ] > > Before this patch, DROP flow action was rejected for all egress > flow rules, which was not correct for all cases. > > When Verbs flow engine is used (dv_flow_en=0) DROP flow action > is implemented using IBV_FLOW_SPEC_ACTION_DROP IBV action. > This action is supported on ingress only. > This patch amends the DROP flow action validation to allow it only on > ingress. > > When DV flow engine is used (dv_flow_en=1) there are 2 implementation > options for DROP flow action: > > - DR drop action (allocated through mlx5dv_dr_action_create_drop() API), > - dedicated drop queue. > > When flow rules are created on non-root flow tables DR drop action can > be used on all steering domains. On root flow table however, this action > ca be used if and only if it is supported by rdma-core and kernel > drivers. mlx5 PMD dynamically checks if DR drop action is supported > on root tables during device probing > (it is checked in mlx5_flow_discover_dr_action_support()). > If DR drop action is not supported on root table, then dedicated > drop queue must be used and as a result, DROP flow action on root > is supported only for ingress flow rules. > This patch amends the DROP flow action validation with this logic > for DV flow engine. > > This patch also renames the dr_drop_action_en field in device's private > data to dr_root_drop_action_en to align the name with field's meaning. > > Fixes: 3c4338a42134 ("net/mlx5: optimize device spawn time with representors") > Fixes: 45633c460c22 ("net/mlx5: workaround drop action with old kernel") > Fixes: da845ae9d7c1 ("net/mlx5: fix drop action for Direct Rules/Verbs") > Cc:stable@dpdk.org > > Signed-off-by: Dariusz Sosnowski > Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/linux/mlx5_os.c | 4 ++-- > drivers/net/mlx5/mlx5.h | 2 +- > drivers/net/mlx5/mlx5_flow.c | 20 ++++++++++++++++---- > drivers/net/mlx5/mlx5_flow.h | 3 ++- > drivers/net/mlx5/mlx5_flow_dv.c | 4 ++-- > drivers/net/mlx5/mlx5_flow_verbs.c | 5 ++++- > 6 files changed, 27 insertions(+), 11 deletions(-) Thanks for the backport. I've applied locally and will push to 21.11 branch when CI completes. Kevin.