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 8094445BC0; Tue, 29 Oct 2024 18:19:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A532D4325B; Tue, 29 Oct 2024 18:17:55 +0100 (CET) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id 8F806432DC for ; Tue, 29 Oct 2024 18:17:44 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2172.outbound.protection.outlook.com [104.47.17.172]) by mx-outbound17-86.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 17:17:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ochpuLyWTUVM2I46opn0P1VOwvBa0W3P0sLhuNicwytWdOLtLZDE7GSXI/gz9toSfLE0GTM6HHWCqkaTnY/JpvnfcIo7lpbNwtQ9gQG3DuKIIKeC19vMbNna/3EHF+RMr2AH2kPbvQdrK2E9VdpKWOQmZM5Wqvvy5Lk8b7lbGkw+esqJGmWOEf9yX2prUf2gvCgKe7JPQCte2oaDmnGhKWr9LTdhwySt6PctV6paTLEXoRMP59DbcA3hC9QbQzNq48C81J6If87ss6VNSeG04RfAMD+ScdpuJBI+f0U96wQ1hNNs3bEQI/k9eNO3M7X13t2y91FDVM80xjwhMsdzEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Ppj30RUySaMOTswJUWjSjZQJpLatOmgV5p+pX3ljPsc=; b=JJQvugufWF375Z0FWMvusXxvRBKxdGFH/fzfKdG8ZxJ67V48YS7ZkKZIKuF9v7rgdd6dBtF6oP53pCPoS2V8c2tcekNG9dc5KK2LMfUXH2+t7lzsy7oatyncejcM0deOeWDNsGpBNtNpfvohVUdB2gO4YO1Pu0Zn81fRLP3R7rx0QIRImwiMYaDKQhvCftay76Tlglq5cn8wEO4sEiy0v85Kp3/28zSsrgA5PQKthjqmPmUX+D7vwzpChM12PmZm5kCg9PrIIdwQVIHSzuTbR1oMtQYj3zpD6Ss/BmwSn0FksE/8CDBEAVBMkpHZLYWrznb5bCI8+6jtnZ68+Kraaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ppj30RUySaMOTswJUWjSjZQJpLatOmgV5p+pX3ljPsc=; b=lLIQKPnUZDHIdIZ55W2VmVBmk3MUbJQlMb2Aqs6nR8AoB3hurYKopwHZl4ALrsu2Wy8AiNWEKg4W6mJwbT5vGulyEJHzpt0MaoRozjD9tcMn3wGZq5aZUYEly1FaEfn9woKUyUh/+UYF8WvNKlQsbt8pRK7WR4Ei4hUT3BMoPB4= Received: from DUZPR01CA0210.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::24) by DU5P190MB2050.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:520::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:44:07 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::2a) by DUZPR01CA0210.outlook.office365.com (2603:10a6:10:4b6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.29 via Frontend Transport; Tue, 29 Oct 2024 16:44:07 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:44:07 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, stephen@networkplumber.org, Danylo Vodopianov Subject: [PATCH v4 75/86] net/ntnic: add flow action update Date: Tue, 29 Oct 2024 17:42:19 +0100 Message-ID: <20241029164243.1648775-76-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|DU5P190MB2050:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: c3a3427f-3a9e-47da-b8dc-08dcf838e816 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GD0ZiYUOlnvRh+AR3Jh3IePN0f015Yybh41lgmRlXTpTzZ2lAcozC7IRcwts?= =?us-ascii?Q?S4wKH+HYM3JttmIl9ImfBCJkGBNfPBtMdKPdZd5Sx76js8inYpEJQJ9m0mQ/?= =?us-ascii?Q?h+lgLuylfclySqNLLaJpepJfX3pQb4ke/99Dqq0yn0pSCqD+qc2e10I3Y19u?= =?us-ascii?Q?AkCl7W1NL9i3hiLbunkwb3HK3Fjh1SDT9Ft74kkJtgLjuA2Pd04Ln4QEZi2f?= =?us-ascii?Q?K7D2zHkuPPkx4l9EWYjnGEmq5G9M76IRW+BsxbIp0HKIbf4lejKuuDMrN1Oh?= =?us-ascii?Q?u8dSvSAn76CuhxpptO37JnnbZMjcf8jCarHgVRNicvPxnvELhjfjtdA6y4BD?= =?us-ascii?Q?ZS4Uqk/CUXcu7iukUlB5W7bmnXzvreDzlR9NvU25wx26vuL10AE8l8a9d3Cl?= =?us-ascii?Q?OFCYP7qaSYwFOcGOWv+DlvhEpPMKllZ1pMn3JGbWGkzV/Y7EUdKeHRIo1pcN?= =?us-ascii?Q?eg698G+t6ygSk/chGxl+a75Gpd57+bgmE2+J9tkjTTNi74rLjhDN5exaTN0A?= =?us-ascii?Q?T4PFpMzv8Q8J8+j8XjciXwbwb1U8imb4NJ8g3z99Iwpd9wGhre/6RRLmM5Yr?= =?us-ascii?Q?67Ac1g2zdMiqJdGLmWsDItAMsoG7W4iIwZ5obpqW5vowYOmv+EVv1pYMCAlU?= =?us-ascii?Q?AD1uIlkWEtxlZy66n7tDG7/S6r/nW+xHC8FovPjBS6LTKPpYxEg72dlhVzT5?= =?us-ascii?Q?jn0JafCX6ewNVzaZAbzEo5YGiUC1NDfC6PQnIOYziecXVbQAsufxZysEks8X?= =?us-ascii?Q?8EHf4OQU8Z6RaNbQHV8UfqFoQOBqhYmROs0YM0DdvulCKEnmaZBeAcibN4F0?= =?us-ascii?Q?mc0SYqduffekYKZhRjghQhyubS2ZLUeyPdAU4yXNS10qGm/FrubCI1PBNnDo?= =?us-ascii?Q?WQ6zNQEw+PgZpNpg6V+KLN3j1T4jvgJUPRjzOg1PCSL47aj430tF0u5Ejlbh?= =?us-ascii?Q?TqEYFnpRyxfwO6J2inbcHdn2AiJhrWp2N7PoBDqit1lbvgjqqUAk4j+M0km+?= =?us-ascii?Q?wuEqyCJMrQQEcmnlNiaRVV4HrdT4U3wgxn7Z44SnE+QWtpBoQ/0OqKSFdAJI?= =?us-ascii?Q?+LL0cDFlpXqzsMRp14d5iR7dkAcBPBO0dZPujCcY2L6ynKoD8bajgohi4s3O?= =?us-ascii?Q?JZb9sQEdsEBhZHN18Lya4kZd2nc0RHDz/tu5GkKZdmgL+N1ERvoG3SMbrtcR?= =?us-ascii?Q?Z7nIHf9qk+qLEymoO8SIxwVelgxY88pATFceDVMV48LZTX9hkUdBy38FVRk8?= =?us-ascii?Q?laRtr4O+WM1wTDNXOZH2ZAK1P0FD24pHSUDCmDlOmakrU3IVJVtuXkHHctL+?= =?us-ascii?Q?YjIox7ZuZpqLgt4RO36g6IA4rDICueAdf197bIIgnIC5mxp2ZFhTLQOXU+2S?= =?us-ascii?Q?Sw6GXLoSLQMrysqSxL08abFnLytDDXrx6A2zaLOiOjJzMLl2LQ=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: IrDinYpMZpUzqIDjPN1LfSE9wPadiqEUNpl0VRavcdT+gW1Y8pRDHMQyrxa4KofyMl90Ml1EsGPJqInWbVNYz42LPpXb8DdwAvIunRDynfhOFt8ooQG8u2uoTXMD2Cko3uBGqVkC2wMY27aOCIOF6+pmDWHvTLqh8zQ8IVozL+H/dCLOxGld098eBVJwPnk4s/r1g1ZJywgqgn5o/akaO/9sG+E68yAABaFst6NjvuieUw+NgU26mKJUayzwAAmOZEoQAkMU+j4/Yu3aGf82b6I0gdM6YZ/+3Fzm6E5ohVfwx37M1+JNEzTmIrCRZ4Hcy9e4aPCb0tkVs7k1ZD12rAJHL8poq3Ouxak8UgzsEvpWsA7V4MP0nmFcpWqNjArB4MF0iOLBR+Czv/ZsswQGE0Gm1qMZ/sRC3Gm80dIgvQmy+4qb6suHWURAG5n0TtwRwlN+Acq1PRjRz2P/aJ7/b6a20MXCZAKfFzQ2HDDF2DltfYm/Xyn1pVaK5ymawVaYBHlICiaHVhSJR672n8u4gIPQMCr2gJAhPQ5Z5J0+L+ZFwPXmEOrv52bPFs31N0SW7Tfl/RD8VAwX3a0hLVi3LoOxVBmYHYOPNWRzayfAcqgo/+Mm5EWYsylH/uPOaSRAYOUXWeL/KkvbHbDX6uKk1xjGtI2wy4pW4Sd+yz2KAUE= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:44:07.2459 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3a3427f-3a9e-47da-b8dc-08dcf838e816 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5P190MB2050 X-OriginatorOrg: napatech.com X-BESS-ID: 1730222261-304438-12712-32054-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.172 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkbGZsZAVgZQ0MjC1MgizSjNIs kg0czSwNg0OSk5JS3ZwDTF0Ng4NTlFqTYWAFASZwtBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260064 [from cloudscan23-168.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Danylo Vodopianov flow_filter_ops was extended with flow action update API. Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/nthw/flow_api/flow_api.c | 16 ++++++++++++++++ .../profile_inline/flow_api_profile_inline.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c index 5349dc84ab..9164f4cc2e 100644 --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c @@ -266,6 +266,21 @@ static int flow_flush(struct flow_eth_dev *dev, uint16_t caller_id, struct rte_f return profile_inline_ops->flow_flush_profile_inline(dev, caller_id, error); } +static int flow_actions_update(struct flow_eth_dev *dev, + struct flow_handle *flow, + const struct rte_flow_action action[], + struct rte_flow_error *error) +{ + const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops(); + + if (profile_inline_ops == NULL) { + NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized"); + return -1; + } + + return profile_inline_ops->flow_actions_update_profile_inline(dev, flow, action, error); +} + /* * Device Management API */ @@ -1127,6 +1142,7 @@ static const struct flow_filter_ops ops = { .flow_create = flow_create, .flow_destroy = flow_destroy, .flow_flush = flow_flush, + .flow_actions_update = flow_actions_update, .flow_dev_dump = flow_dev_dump, .flow_get_flm_stats = flow_get_flm_stats, .flow_get_aged_flows = flow_get_aged_flows, diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h index ea1d9c31b2..8a03be1ab7 100644 --- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h +++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h @@ -42,6 +42,11 @@ int flow_flush_profile_inline(struct flow_eth_dev *dev, uint16_t caller_id, struct rte_flow_error *error); +int flow_actions_update_profile_inline(struct flow_eth_dev *dev, + struct flow_handle *flow, + const struct rte_flow_action action[], + struct rte_flow_error *error); + int flow_dev_dump_profile_inline(struct flow_eth_dev *dev, struct flow_handle *flow, uint16_t caller_id, -- 2.45.0