Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp929137rwb; Thu, 12 Jan 2023 14:26:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvqH51raGmRvoAFLIiwJG03pkpCMHT8eQ38rcVr3ly0AFJ40/CIC5iAu1GRQjEsHuuBOlSk X-Received: by 2002:a17:90a:858c:b0:223:f4e9:b22b with SMTP id m12-20020a17090a858c00b00223f4e9b22bmr79730783pjn.41.1673562369390; Thu, 12 Jan 2023 14:26:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673562369; cv=none; d=google.com; s=arc-20160816; b=JRIrR4NWmcNJNEcyHOhJOV7AlAvvdrAYnmecGALdeR5K9ibXgVYRQf46Pch5vXZWq9 JgxouBykr5wg+WTEAOEZA4qn/HmopOORYYrIL4LHHhYNfd4xw/0c0S4kWdTAyRe/Ynvc EJVHHZ9sMDLfpRSo+73PfaTRPItL/IJ9x6FYg5aGEP85C2fXF6HCZDF5MoyQYO/z+WBW oBHjsx2ZpvIk2bdpKkeBcwagwosGjBnwF0auFiC7+NGYziATeheaQrYPh9ABtinNrikS 9/AF1NGvvMSUEMDJVHTdPxU6L5Yq1obYwSLCrkdo79r8NPL3POB6ST6MMtjzWDu3m+yh Q/kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xAEr7b8eWHGA69/IdRu8mUtv76MS8HNh8m/8P7DLctU=; b=N8uLSfwVO0TF8pCqCdA3BIeACzddGeWdBABP1LpUjz+WiMjGTrF/7vBPKa7X30M+fF cxCVvRxP5iLn+fZ42p0Rfy33YA+Hd8rblIBvkAJ3AKCo8lbkD+bi48DLp1BZ0J+TYCdZ PMkPN+3i3kbhEPs3nRt2I01cY/vA8P+5MSKuFVQTNQaEq4qYKqNvSqXwLuuIrcql6D+k qo2aFSwJrweFKZKjBSGPgc24Y29nC1oDiZtoEj4Rx3j0wbVcbQIRz3bYV2wDaRIZVG5G /i5N3ZLd9vqALHOV6csboET19E758rwiQOc4VEqK+FZKODV5k+NVp1O6KA8HbzR+0rPZ Pegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=KXhpverr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t24-20020a634458000000b00478831d07f9si18698622pgk.312.2023.01.12.14.26.02; Thu, 12 Jan 2023 14:26:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=KXhpverr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239916AbjALWOo (ORCPT + 50 others); Thu, 12 Jan 2023 17:14:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240925AbjALWOR (ORCPT ); Thu, 12 Jan 2023 17:14:17 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B63A66986 for ; Thu, 12 Jan 2023 14:08:05 -0800 (PST) Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.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-1.canonical.com (Postfix) with ESMTPS id 9F27C3F76A for ; Thu, 12 Jan 2023 22:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1673561283; bh=xAEr7b8eWHGA69/IdRu8mUtv76MS8HNh8m/8P7DLctU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=KXhpverrPQ3+CxF5e+Pa0QvOUI0vG19pKL1zJuqOK1msE8KcXh9TwhCA5DQ6rer52 6aYP53RqU9X0qGfaJ5xKsq2DNztF3+mzPJAJMlIjdQWJXhskFW/cWR3caWRzsZuTnR FCuuj1hzmEVy8h8nhxl9NxH+xxEWqoFmdG/oVy9Hog+Z/BcTIcPky0tAyL0j7SXs5m Dwp1inBu1dBDLrF0sPmUnonAbZDVyxoLIrWOT+jm48LqP1fb/siZv5o8WOAXaTPRcq oq4g+Cv3Gdm8YAj+x9zWiju7g8nf33LqjN9FO9577H6nQEDDAJD7PVdGxSgFo7mOZa JSqvOncB34Avg== Received: by mail-io1-f70.google.com with SMTP id d24-20020a5d9bd8000000b006ee2ddf6d77so12044489ion.6 for ; Thu, 12 Jan 2023 14:08:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xAEr7b8eWHGA69/IdRu8mUtv76MS8HNh8m/8P7DLctU=; b=OyUByDCuApbnH8hf4+6zhV4LBt/djJp7ILe4u0C4O9qq9idOFd/NCbY507EluyVoE+ lo1MLyNgAFrQxXxOISSD2tfZx5QsKJO/QcpY/Jqnj/j7EXULZgiXswTYTVtujoZQnNr+ QjsWENMBoQLhFePBiqzhmQkj7Ld4PaJIV9JLyRPluQ/tUz0/TZZS5P9Gboe7FRV2z3LB CBU4k5LNGd2TDMxsFlT4a3RqMnbWGxKzf1SWhT99qd5/QPUl7j090HCRnYfDp7argLYN pg78RmJVMwiaend6vX/ke2lX12ZVdYc+fNkNN4L2PddPRtmIiKMei/PuEqUJRpwPcbK7 Ymcg== X-Gm-Message-State: AFqh2kr8xok/4c4+y3hoS3iTj0CnsHWHXNX7ZY3XD9MbAb6p5Fp62rPK SPL21rBx9zjea5nfnzCHZISaaW7R5f+3I2Bbxa1kub9rCLP4F92f0GnF06lkQ1L0oAqvZ3vBEoY A4eZC1uxu9OQAL4KIv9k3EaHG+Y7Vhhp7w/ySoF6ITw== X-Received: by 2002:a5d:81ca:0:b0:704:56dd:23fd with SMTP id t10-20020a5d81ca000000b0070456dd23fdmr9211231iol.16.1673561282357; Thu, 12 Jan 2023 14:08:02 -0800 (PST) X-Received: by 2002:a5d:81ca:0:b0:704:56dd:23fd with SMTP id t10-20020a5d81ca000000b0070456dd23fdmr9211220iol.16.1673561282066; Thu, 12 Jan 2023 14:08:02 -0800 (PST) Received: from xps13.dannf ([38.15.56.166]) by smtp.gmail.com with ESMTPSA id c8-20020a6bfd08000000b006bbfb3856d6sm6353789ioi.5.2023.01.12.14.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 14:08:01 -0800 (PST) Date: Thu, 12 Jan 2023 15:07:59 -0700 From: dann frazier To: Sasha Levin , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Roi Dayan , Maor Dickman , Saeed Mahameed , Ran Drori , Frode Nordahl Subject: Re: [PATCH 5.15 049/230] net/mlx5e: Check action fwd/drop flag exists also for nic flows Message-ID: References: <20220711090604.055883544@linuxfoundation.org> <20220711090605.473699898@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220711090605.473699898@linuxfoundation.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 11, 2022 at 11:05:05AM +0200, Greg Kroah-Hartman wrote: > From: Roi Dayan > > [ Upstream commit 6b50cf45b6a0e99f3cab848a72ecca8da56b7460 ] > > The driver should add offloaded rules with either a fwd or drop action. > The check existed in parsing fdb flows but not when parsing nic flows. > Move the test into actions_match_supported() which is called for > checking nic flows and fdb flows. > > Signed-off-by: Roi Dayan > Reviewed-by: Maor Dickman > Signed-off-by: Saeed Mahameed > Signed-off-by: Sasha Levin hey Sasha, A contact at Nvidia tells me that this has caused a regression w/ OVN HW offload. To fix that, commit 7f8770c7 ("net/mlx5e: Set action fwd flag when parsing tc action goto") is also required. I'm not really sure what flagged this patch for stable, so I don't know whether to suggest it be reverted, or that additonal patch be applied. Roi - what's your thought? -dann > --- > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > index 3aa8d0b83d10..fe52db591121 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c > @@ -3305,6 +3305,12 @@ static bool actions_match_supported(struct mlx5e_priv *priv, > ct_flow = flow_flag_test(flow, CT) && !ct_clear; > actions = flow->attr->action; > > + if (!(actions & > + (MLX5_FLOW_CONTEXT_ACTION_FWD_DEST | MLX5_FLOW_CONTEXT_ACTION_DROP))) { > + NL_SET_ERR_MSG_MOD(extack, "Rule must have at least one forward/drop action"); > + return false; > + } > + > if (mlx5e_is_eswitch_flow(flow)) { > if (flow->attr->esw_attr->split_count && ct_flow && > !MLX5_CAP_GEN(flow->attr->esw_attr->in_mdev, reg_c_preserve)) { > @@ -4207,13 +4213,6 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, > attr->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; > } > > - if (!(attr->action & > - (MLX5_FLOW_CONTEXT_ACTION_FWD_DEST | MLX5_FLOW_CONTEXT_ACTION_DROP))) { > - NL_SET_ERR_MSG_MOD(extack, > - "Rule must have at least one forward/drop action"); > - return -EOPNOTSUPP; > - } > - > if (esw_attr->split_count > 0 && !mlx5_esw_has_fwd_fdb(priv->mdev)) { > NL_SET_ERR_MSG_MOD(extack, > "current firmware doesn't support split rule for port mirroring");