From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A50314779F for ; Mon, 19 Feb 2024 18:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708366808; cv=none; b=VXEQpcQxkqOkCh6Unt7ovqIXELwDTyMc8hfuYINA+TBJQWJ3ooEP6AqsD+Ng915I+q01+t75iN/42coONSCEOv9ilxRQpPBvUupDUcpaPUGLhxQXjXJrVK4/uq15lAVPrfeYiFHTTifW6ITOiZVIN1JDyF3iKsn7dch7O7tLySo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708366808; c=relaxed/simple; bh=klsPyVOBhaHIpGqPSNttD36IsXE5NJRbrVGKhhkGH5M=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=vBfAMZNWkTB6W3sbGrSwUZ0PSlCAXULoTxfcxIFlvdKIYBb1pezjrAVjW/RYFu4JhuAGDGPb3mqaOxsx7o5mWFZe2O7/xBWDRe0pMz542bDnx7+WbOH528B3jq1P7qyCX+LxywxBZrM3UpBEHyLepLGWwqzimVM+Uzuv2k/tScs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l7o2kcV6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="l7o2kcV6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FB0FC433F1; Mon, 19 Feb 2024 18:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708366808; bh=klsPyVOBhaHIpGqPSNttD36IsXE5NJRbrVGKhhkGH5M=; h=Subject:To:Cc:From:Date:From; b=l7o2kcV6JQ8lfu0pQqBD234G99AybaZh/be/xVBHKtDOscD2xW+JUjlL4bS6xmQK1 l97fbnR7Tv+2tfSxSaL7neqnJoTjGV/oTU9rxM+wzBi6iYylVPoWJo27RUU9Zg1zGt BD1xmKqrcvhLdALJAbaWYa6E9HO/1rwCEAHFkDsM= Subject: FAILED: patch "[PATCH] nfp: flower: add hardware offload check for post ct entry" failed to apply to 5.15-stable tree To: hui.zhou@corigine.com,kuba@kernel.org,louis.peens@corigine.com Cc: From: Date: Mon, 19 Feb 2024 19:19:57 +0100 Message-ID: <2024021957-battering-gallows-35b2@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x cefa98e806fd4e2a5e2047457a11ae5f17b8f621 # git commit -s git send-email --to '' --in-reply-to '2024021957-battering-gallows-35b2@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: cefa98e806fd ("nfp: flower: add hardware offload check for post ct entry") 3e44d19934b9 ("nfp: flower: add goto_chain_index for ct entry") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From cefa98e806fd4e2a5e2047457a11ae5f17b8f621 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Wed, 24 Jan 2024 17:19:08 +0200 Subject: [PATCH] nfp: flower: add hardware offload check for post ct entry The nfp offload flow pay will not allocate a mask id when the out port is openvswitch internal port. This is because these flows are used to configure the pre_tun table and are never actually send to the firmware as an add-flow message. When a tc rule which action contains ct and the post ct entry's out port is openvswitch internal port, the merge offload flow pay with the wrong mask id of 0 will be send to the firmware. Actually, the nfp can not support hardware offload for this situation, so return EOPNOTSUPP. Fixes: bd0fe7f96a3c ("nfp: flower-ct: add zone table entry when handling pre/post_ct flows") CC: stable@vger.kernel.org # 5.14+ Signed-off-by: Hui Zhou Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20240124151909.31603-2-louis.peens@corigine.com Signed-off-by: Jakub Kicinski diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c index 2967bab72505..726d8cdf0b9c 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c +++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c @@ -1864,10 +1864,30 @@ int nfp_fl_ct_handle_post_ct(struct nfp_flower_priv *priv, { struct flow_rule *rule = flow_cls_offload_flow_rule(flow); struct nfp_fl_ct_flow_entry *ct_entry; + struct flow_action_entry *ct_goto; struct nfp_fl_ct_zone_entry *zt; + struct flow_action_entry *act; bool wildcarded = false; struct flow_match_ct ct; - struct flow_action_entry *ct_goto; + int i; + + flow_action_for_each(i, act, &rule->action) { + switch (act->id) { + case FLOW_ACTION_REDIRECT: + case FLOW_ACTION_REDIRECT_INGRESS: + case FLOW_ACTION_MIRRED: + case FLOW_ACTION_MIRRED_INGRESS: + if (act->dev->rtnl_link_ops && + !strcmp(act->dev->rtnl_link_ops->kind, "openvswitch")) { + NL_SET_ERR_MSG_MOD(extack, + "unsupported offload: out port is openvswitch internal port"); + return -EOPNOTSUPP; + } + break; + default: + break; + } + } flow_rule_match_ct(rule, &ct); if (!ct.mask->ct_zone) {