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 52FA4A0A0E; Thu, 29 Apr 2021 08:16:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D3EB4116C; Thu, 29 Apr 2021 08:16:58 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2067.outbound.protection.outlook.com [40.107.93.67]) by mails.dpdk.org (Postfix) with ESMTP id D060241165 for ; Thu, 29 Apr 2021 08:16:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jmeBRnGmk9EQuh/akBWoj7Uh8BuDET02mE7J6lMYgkKun5dKYplLBRfiiS+RO0FO/HWGnpM8fIQtOdkLA2U8ujz4wUxQC5j40i5MghRT71xW/86nxHF9yTJRXlmHBW8l+1gwEePi4Fu5NVqBYq754XPJ2y6elAByphH75pJBWRzimCQoTVdB/pWl9PIvi6fHYzBfLKQixxulOS9hDxpm3U6vnTLRHL8/Ka27W0C9Nmwrz+mHiOeyta1BccZ134iXb/yTgwahSRHzTcVqJSx5HNjGR4VluK5DGxjN7hN96+svn27XNr2ktDphwASckxAK5essjxl+4Z/4cMQL3YKCdQ== 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-SenderADCheck; bh=L8oNwFoLvvgJ8BSkVyHKRlhStWRBV5gT6Cm1E5/YuTo=; b=mRVRQadvvyboNokeyYFZ0ytdZrO7RA3sZUQzOohjvABApTv4hc9YmiOB7IGsLFaoJ+zt8b1espT7NXa3i4gDsk1pmGMEpgXrldlfdKDhaCAffHCO3B5lAJJO+ohSJ9+xXiEzViYulnAjoyqM4d7uyLeFBh7YsyQ0RAB292jPoFWRxqtr6fbwwDCW4VRuEc8QCRSo/mE/QaW+uYHDWEQ1BjmOqlPBF0OIeD+XDJT90T5IaiTDqBCHF0GVHOGiJknVsBzm/ysFFk3kPRhL7VvYoiJ3Y8AtLr43mMeQKfH/oBnbf3hcJ/t+14GbDBgkSO5QU4VoiXCjZV10QciUShw6sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=oktetlabs.ru smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=L8oNwFoLvvgJ8BSkVyHKRlhStWRBV5gT6Cm1E5/YuTo=; b=TdfjsYcwhLsMfX9CaosjdE401eLAnci8j+8uZSnDLH4DnQm6kyr8DGWAyZkoUdTPuTkiG10tOC2qMNrQnzg80XSwLl51Pkx1A6eYelj5cnkTlUJA5ZzO2kRCso7b9FS69hOxCyH1rY1w1hkDcX12hSTk/oqm496wwmk1BqhsZQlAi41kid00lhpnk/8GkTXf0ZGLL5JCpRZuo3OX/id4tFiCJhS28ukxVg5AtBWRfGJc6YMYLwfRjNknxaAgF2u+oJepotdHMYnq89SdfLdXg0VxPamaT+gAasnkUQQyfmhCAgvt6j1nm7pepa5Z3DvxS/Ac8f2oUqze+RtVUJyklg== Received: from MW4PR04CA0057.namprd04.prod.outlook.com (2603:10b6:303:6a::32) by BL0PR12MB4852.namprd12.prod.outlook.com (2603:10b6:208:1ce::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.24; Thu, 29 Apr 2021 06:16:54 +0000 Received: from CO1NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6a:cafe::63) by MW4PR04CA0057.outlook.office365.com (2603:10b6:303:6a::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 06:16:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT020.mail.protection.outlook.com (10.13.174.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 06:16:53 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Apr 2021 06:16:50 +0000 From: Gregory Etelson To: CC: , , , , Viacheslav Ovsiienko , "Thomas Monjalon" , Ferruh Yigit , "Andrew Rybchenko" , Ajit Khaparde Date: Thu, 29 Apr 2021 09:16:30 +0300 Message-ID: <20210429061634.3481-2-getelson@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210429061634.3481-1-getelson@nvidia.com> References: <20210428175906.21387-1-getelson@nvidia.com> <20210429061634.3481-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d3938f4-6830-409b-bc95-08d90ad66220 X-MS-TrafficTypeDiagnostic: BL0PR12MB4852: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8fadoGwe/qB2QpXMzj7w6uk5ykrCY50MADqr+LrQlzE4ckQFCdGDg0OTC8TX/hKAjlr32Xh6ljUjdMyPbMmMCeSgdTyom76v0+bBduNTyQ3+ELR+OO1fgbw9RgQbDdagRVwkpAKgcULXtbVhM7Qii5gTBGoSgDghyQSXYdWbxl0akFg0bmSk71ql8BLUqtAJETCyu8BESs58VIfpArZyZ2Wvpi8Kp6xdsnNQwW+1YEYxTxjT866EQxzFBse3Xis9Oslw6en8AZ7UjG2hfF3J63jcInuFU4+dULp3XnHJMJntTfT8+WEOm2y7uBLJz1mtv0+B7n5nf3K5VMW9iFkbJUWjrQHH0Dxk46u73sWY1Gm0kTb5LmKJPN7rDz+OPPbUSrKbnhQOQ0z5JBXNYVeSuqHonkhn7cA9RXeUYlb3LODyICg97vFhObQIX1HMK5Tv++uTg4X4dKNGI5c90uKciVoJVduxVDZtP1IYmSHjpzTG7RsHtsLjS6mlj2ECuOWPuTY2sjxkJrqfCcOFuDj00jK7du6N5yt7bCc6fEejuZK0sYPJO0oyOgE4A1wczO8wFIeg4zmZqYeBHqcQ/Wc23WzXxfmKsRId47eULv8huA8U7NwsZoGQe0q5/G2FQuDmu3jcmDlPODGwwy/lwPfNnQjs8iUzRoQFdksCduRZvZQ= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(396003)(136003)(36840700001)(46966006)(426003)(82740400003)(5660300002)(7636003)(8676002)(26005)(186003)(36756003)(82310400003)(70586007)(70206006)(2616005)(36906005)(6286002)(316002)(1076003)(336012)(55016002)(86362001)(7696005)(6666004)(4326008)(356005)(6916009)(36860700001)(478600001)(16526019)(2906002)(54906003)(47076005)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 06:16:53.4028 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d3938f4-6830-409b-bc95-08d90ad66220 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4852 Subject: [dpdk-dev] [PATCH v2 1/4] ethdev: fix integrity flow item 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 Sender: "dev" Add integrity item definition to the rte_flow_desc_item array. The new entry allows to build RTE flow item from a data stored in rte_flow_item_integrity type. Add bitmasks to the integrity item value. The masks allow to query multiple integrity filters in a single compare operation. Fixes: b10a421a1f3b ("ethdev: add packet integrity check flow rules") Signed-off-by: Gregory Etelson Acked-by: Viacheslav Ovsiienko --- lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index c7c7108933..8cb7a069c8 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -98,6 +98,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = { MK_FLOW_ITEM(PFCP, sizeof(struct rte_flow_item_pfcp)), MK_FLOW_ITEM(ECPRI, sizeof(struct rte_flow_item_ecpri)), MK_FLOW_ITEM(GENEVE_OPT, sizeof(struct rte_flow_item_geneve_opt)), + MK_FLOW_ITEM(INTEGRITY, sizeof(struct rte_flow_item_integrity)), MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)), }; diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index 94c8c1ccc8..147fdefcae 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -1738,6 +1738,15 @@ struct rte_flow_item_integrity { }; }; +#define RTE_FLOW_ITEM_INTEGRITY_PKT_OK RTE_BIT64(0) +#define RTE_FLOW_ITEM_INTEGRITY_L2_OK RTE_BIT64(1) +#define RTE_FLOW_ITEM_INTEGRITY_L3_OK RTE_BIT64(2) +#define RTE_FLOW_ITEM_INTEGRITY_L4_OK RTE_BIT64(3) +#define RTE_FLOW_ITEM_INTEGRITY_L2_CRC_OK RTE_BIT64(4) +#define RTE_FLOW_ITEM_INTEGRITY_IPV4_CSUM_OK RTE_BIT64(5) +#define RTE_FLOW_ITEM_INTEGRITY_L4_CSUM_OK RTE_BIT64(6) +#define RTE_FLOW_ITEM_INTEGRITY_L3_LEN_OK RTE_BIT64(7) + #ifndef __cplusplus static const struct rte_flow_item_integrity rte_flow_item_integrity_mask = { -- 2.31.1