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 3C71A431D5 for ; Sun, 22 Oct 2023 16:28:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3277140689; Sun, 22 Oct 2023 16:28:42 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2059.outbound.protection.outlook.com [40.107.100.59]) by mails.dpdk.org (Postfix) with ESMTP id A5657402D8 for ; Sun, 22 Oct 2023 16:28:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lMcDbrxA2Af53XNnjaJu5IQYUAne74L39vLZNnF5wudpj6I2LkyPLz5/cCdmYtmGom++XbUUti8sxl/7USQkcbK5KCZP0G/urA07V4lKo1ERF0yGlbm6smzbIi2OTl51lx8GSKQ9DuhOWTOXtVEKP0I+Suti4hjp/MXabuP06dLFM6s1AxeZ4+6qHlxoxeF6SLVoMWsMZuI3KPX30Yrhv1xPgx7tgyi/5iYycxwUKr+/SNUz7S4coBKfAbSv0KXHLImI5ePklANVYUGbl9Gnh1ftuO50bAjC38tLhcE6WnvLJ1UhMGW43yAsPeAmWnv2EfwFuplz0sqn0i02wi3t1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CWDNImxYjniWcs8p3RdlfNS38Tc9RrZQT1E/61qWMOk=; b=RjFXK9LikVYOyvZaR/KbpSh3kqtv3shpFhQbe0KfpbDEvbqsC30spfKNr9M2O699cx9meldYY7QxL+RsaCFCIgEChvqOpjk+30fMS8o15SGKEOyY6cEKglmnLPWW1uSgj1PPG/QcAdgUeBLngBLDpAfGw+GxgWznkgW415lLEp9uwXATEqYohUPJW116Ed0rXHg4kBYgUtpj+lZDobRx5GBfAspFSmu2/jSr5YzIah72IRD/wnV6xEzuxJRq6PfSaRiuLUaL0fMu0h1LJ9ckJrf4aL5J3LzJa+fIpyMoqOYM5MWwbz1gVxDG5/udOa+DbVlHysgtsA9h6wtBD6ZStw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=marvell.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CWDNImxYjniWcs8p3RdlfNS38Tc9RrZQT1E/61qWMOk=; b=Hu29enjAZ3Huv8L3yTNqOCC5p48IGcjZWEMszKD90RNuaoj6avX29IlM5CZQu9N5KDtc6ojb6YCJF0iR04i8AS9AZ6Fc2ckiKlYsFsRNZEa6dc/fJTWYKt4ZnCGX+b+TQBSx7qqSKH3KqhBPSJUwohZLN7qShpX4mFnoWFo6grEncUNtMzuyYnk+lI0srRw8fmUNfaN/PwGl2MYozzvIJ7FUR6OzBZWltRqu2BQWTQVt953O+VPz3Yc/VFMNr4q2FjkI5hGDLBy1Ldgv21iYbertObHZSzsb793dNTyf8YbC5+1ewIKR4hSIYHf11ILJvKlB1DbxCTG0qDsSnRJOyw== Received: from MW4PR03CA0117.namprd03.prod.outlook.com (2603:10b6:303:b7::32) by MW6PR12MB8705.namprd12.prod.outlook.com (2603:10b6:303:24c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.24; Sun, 22 Oct 2023 14:28:38 +0000 Received: from CO1PEPF000044F0.namprd05.prod.outlook.com (2603:10b6:303:b7:cafe::c6) by MW4PR03CA0117.outlook.office365.com (2603:10b6:303:b7::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33 via Frontend Transport; Sun, 22 Oct 2023 14:28:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000044F0.mail.protection.outlook.com (10.167.241.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:28:38 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:28:28 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:28:27 -0700 From: Xueming Li To: Satheesh Paul CC: Kiran Kumar K , dpdk stable Subject: patch 'common/cnxk: fix default flow action setting' has been queued to stable release 22.11.4 Date: Sun, 22 Oct 2023 22:21:32 +0800 Message-ID: <20231022142250.10324-64-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231022142250.10324-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F0:EE_|MW6PR12MB8705:EE_ X-MS-Office365-Filtering-Correlation-Id: 037a0a25-1021-4c85-7d66-08dbd30b2efb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QtkKAMz35Lwhz7c3GITRTZCHdFzUZtyvLONEzD+ZC7FlcfCbQEKDxYKcwNBotZEAXIwWy2sUlTArQ4EZ28l4/P3U2f4TUKOI76yrZQvGuq29l+qfKfmLPLFdJo47UEXXoqDF8CFBm2zIhDiHt7lL/x16fYSi3VNbd+5UtYYq7Jdl6w+nZvfIyvm3vVA7d8EQZ54wYxZ6bMzAZEH4pRqd2QA7v4db/DBBgQcPmVgZlOsRBJbruOAX79UPVceLEf9x7cbJ41Y3cpNdUoRDcqFV5F3PAJKR9o84kCANtEdMb4zUoP3DQOiguofsjwJqdGpiQ2LT8JgbqbQTejJ9KrnBiou7ABAmcLSyLWCl+B9FI4/kdT6Ffc+Eh+MlWw3zlYPSD5ROYvWyA6bSdyPlf9QxJVjYh0DS5HjbF1WhM2HlwECbqkgE6nxCJSZuWD2+ko8/lpd+77UUgN+FiLMyGtWRA+ZRYjGNu+q1lOwG+fkR6BEhJh4scz7waFFMGFl/pSWl/aZ1O/Bi3F1Qt5yRJ2i3IGS1xrhewqs9pd2VHFFKYIWpeqrJhhF8rcUoStjdn+uWq4ahVs+4nr3FwnrAO4JNjrM88T8o5jcTWAba/SqM5dfavm8ezbd3WSYViwl9gUDQUO1Hr5N7sPkHWNryhE7OIUxBp+gLxoHtM0d8B193cV1h1yllkyhrklPdN3UYXAEzn+BO2fG3NtPp9gS//iwNhxXXshGTTIIHjwd5v2uW6DW5k7og3EPnryVbE+p0FdV+w77uNdYy2QLYv1qoW/aKYw== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(39860400002)(376002)(396003)(230922051799003)(451199024)(82310400011)(186009)(1800799009)(64100799003)(46966006)(36840700001)(40470700004)(7696005)(53546011)(6666004)(83380400001)(36860700001)(47076005)(6286002)(7636003)(4001150100001)(356005)(82740400003)(40460700003)(1076003)(426003)(336012)(55016003)(2616005)(86362001)(2906002)(4326008)(41300700001)(8676002)(8936002)(26005)(40480700001)(70586007)(316002)(70206006)(16526019)(6916009)(54906003)(36756003)(5660300002)(478600001)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 14:28:38.8454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 037a0a25-1021-4c85-7d66-08dbd30b2efb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8705 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 Hi, FYI, your patch has been queued to stable release 22.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/15/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=8c360e4392d68edf793ab0d6dacf54e1c9e87f0d Thanks. Xueming Li --- >From 8c360e4392d68edf793ab0d6dacf54e1c9e87f0d Mon Sep 17 00:00:00 2001 From: Satheesh Paul Date: Mon, 31 Jul 2023 08:26:07 +0530 Subject: [PATCH] common/cnxk: fix default flow action setting Cc: Xueming Li [ upstream commit b1f677d4386f7d9ad26a71615c00a2bdcb125c5e ] For MCAM rules with PF/VF action, the PF's default rule action is is copied and overwritten over the user provided action. Fixing this by setting default action only if no other action (like queue) is specified by user. Fixes: a07f7ced436d ("common/cnxk: add NPC init and fini") Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar K --- drivers/common/cnxk/hw/nix.h | 1 + drivers/common/cnxk/roc_npc.c | 17 ++++++++++------- drivers/common/cnxk/roc_npc_mcam_dump.c | 4 ++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h index 425c335bf3..3246ea6573 100644 --- a/drivers/common/cnxk/hw/nix.h +++ b/drivers/common/cnxk/hw/nix.h @@ -617,6 +617,7 @@ #define NIX_RX_ACTIONOP_RSS (0x4ull) #define NIX_RX_ACTIONOP_PF_FUNC_DROP (0x5ull) #define NIX_RX_ACTIONOP_MIRROR (0x6ull) +#define NIX_RX_ACTIONOP_DEFAULT (0xfull) #define NIX_RX_VTAGACTION_VTAG0_RELPTR (0x0ull) #define NIX_RX_VTAGACTION_VTAG1_RELPTR (0x4ull) diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index 5e1ca6bc03..2ee1233757 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -634,11 +634,15 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, if (req_act == ROC_NPC_ACTION_TYPE_VLAN_STRIP) { /* Only VLAN action is provided */ flow->npc_action = NIX_RX_ACTIONOP_UCAST; - } else if (req_act & - (ROC_NPC_ACTION_TYPE_PF | ROC_NPC_ACTION_TYPE_VF)) { - flow->npc_action = NIX_RX_ACTIONOP_UCAST; - if (req_act & ROC_NPC_ACTION_TYPE_QUEUE) - flow->npc_action |= (uint64_t)rq << 20; + } else if (req_act & (ROC_NPC_ACTION_TYPE_PF | ROC_NPC_ACTION_TYPE_VF)) { + /* Check if any other action is set */ + if ((req_act == ROC_NPC_ACTION_TYPE_PF) || (req_act == ROC_NPC_ACTION_TYPE_VF)) { + flow->npc_action = NIX_RX_ACTIONOP_DEFAULT; + } else { + flow->npc_action = NIX_RX_ACTIONOP_UCAST; + if (req_act & ROC_NPC_ACTION_TYPE_QUEUE) + flow->npc_action |= (uint64_t)rq << 20; + } } else if (req_act & ROC_NPC_ACTION_TYPE_DROP) { flow->npc_action = NIX_RX_ACTIONOP_DROP; } else if (req_act & ROC_NPC_ACTION_TYPE_QUEUE) { @@ -649,8 +653,7 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, } else if (req_act & ROC_NPC_ACTION_TYPE_SEC) { flow->npc_action = NIX_RX_ACTIONOP_UCAST_IPSEC; flow->npc_action |= (uint64_t)rq << 20; - } else if (req_act & - (ROC_NPC_ACTION_TYPE_FLAG | ROC_NPC_ACTION_TYPE_MARK)) { + } else if (req_act & (ROC_NPC_ACTION_TYPE_FLAG | ROC_NPC_ACTION_TYPE_MARK)) { flow->npc_action = NIX_RX_ACTIONOP_UCAST; } else if (req_act & ROC_NPC_ACTION_TYPE_COUNT) { /* Keep ROC_NPC_ACTION_TYPE_COUNT_ACT always at the end diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c index cc1599ef33..52f7d96b41 100644 --- a/drivers/common/cnxk/roc_npc_mcam_dump.c +++ b/drivers/common/cnxk/roc_npc_mcam_dump.c @@ -446,6 +446,10 @@ npc_flow_dump_rx_action(FILE *file, uint64_t npc_action) plt_strlcpy(index_name, "Multicast/mirror table index", NPC_MAX_FIELD_NAME_SIZE); break; + case NIX_RX_ACTIONOP_DEFAULT: + fprintf(file, "NIX_RX_ACTIONOP_DEFAULT (%" PRIu64 ")\n", + (uint64_t)NIX_RX_ACTIONOP_DEFAULT); + break; default: plt_err("Unknown NIX_RX_ACTIONOP found"); return; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-22 22:17:36.704104200 +0800 +++ 0063-common-cnxk-fix-default-flow-action-setting.patch 2023-10-22 22:17:34.286723700 +0800 @@ -1 +1 @@ -From b1f677d4386f7d9ad26a71615c00a2bdcb125c5e Mon Sep 17 00:00:00 2001 +From 8c360e4392d68edf793ab0d6dacf54e1c9e87f0d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b1f677d4386f7d9ad26a71615c00a2bdcb125c5e ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 319fe36e04..1720eb3815 100644 +index 425c335bf3..3246ea6573 100644 @@ -26 +28 @@ -@@ -619,6 +619,7 @@ +@@ -617,6 +617,7 @@ @@ -35 +37 @@ -index 86f4d85350..3f4a19b539 100644 +index 5e1ca6bc03..2ee1233757 100644 @@ -38 +40 @@ -@@ -726,11 +726,15 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, +@@ -634,11 +634,15 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, @@ -59 +61 @@ -@@ -741,8 +745,7 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, +@@ -649,8 +653,7 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, @@ -70 +72 @@ -index a88e166fbe..ff831b0a71 100644 +index cc1599ef33..52f7d96b41 100644 @@ -73 +75 @@ -@@ -496,6 +496,10 @@ npc_flow_dump_rx_action(FILE *file, uint64_t npc_action) +@@ -446,6 +446,10 @@ npc_flow_dump_rx_action(FILE *file, uint64_t npc_action)