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 F07F9A0A0A; Wed, 28 Apr 2021 19:59:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF7E341172; Wed, 28 Apr 2021 19:59:33 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2080.outbound.protection.outlook.com [40.107.237.80]) by mails.dpdk.org (Postfix) with ESMTP id D5E50410FE for ; Wed, 28 Apr 2021 19:59:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UwddsrjrwEkZITx8nHc+PeUKLiEJCyIw9Rgw5guhMd2+gbvshI2NuJOuaLbZU2xlajcLXZsyzSKjixGW30/1Qi8xuPhEdMSD7Y5lhKZyxXU3zQIljAqpe13VRNKsJeDjQ1BZ7CEUEQN1bbPjPjCOGmjbaVzASF4urKZe4IXvfyBfXN0ybH0XFqnhbeiR4zhOGCG8+mpCqtoBYgTVR5HWRqSuREMAngfWVqL7V0tEk/zt5HYpmJVJ5mZmOf3Yr1Tmv0VmEuGvS8ox8dWNTdTEmoAveeJZj92ogVlEKQyWvIkXQohTJxHcdNrPQa1E7WnzJOlHjgZUvX3Z/WVXR3ROAA== 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=IkM9DYmaztXvLkqz3wk9EjfqDRNeoLyml3k1n7eNCQA=; b=n+CjPpY/cZ1AAusQCDsUltvjSSFKlhW08U3BAnKlCyctCR6tKHjEKVGJA9jgk9+2Q94RtPZnYLylhRVGZTZLX7mnyu6YijhlXn2wpvWfktvUqQcwhiZnSAocq2ah6dz9P4q5ldqoGDYcQE/lGcJEWit8Vk9DTlxH6W3q0a+BYQbyYaZV2fT/x8iZM1ZKEteSj0s2WIdkluun15iWHFkv6ySNEVG5ddDxIC9mpHDr3aVgkjHL6ePuu3+XsZ8EhzvS1goXSLpRMBKG4Z+O7UC3/RvFqwcTemweK4CilY2iFErJTM/+EshInFCvPJ63EYh+b0K3M0WqFoV3f0M3HtZkTA== 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=IkM9DYmaztXvLkqz3wk9EjfqDRNeoLyml3k1n7eNCQA=; b=VPokkytFVJiKwy9apgZ1pH2mUKOqu5SWZwRev//beehNM5z6ENUGMYS1tEzPBR7vv7xMd639UD8nY2VYKx1GYzAhYiqQjcY/4AMu6s7xBE8VxSmNHBG2WfBZrOjI+STo76U6unrPzkPcZOm6h1xqaewCWZPxMP6WFGsDbBb8jZOi8BtmrD9VHYqEJfXC8CSt9o8MFU2tbxjI/u8YagVl8pTv+g4rqs9EMbMmtJIAqpv6VATY0zEXPixCSTAScGhB5Jpzx/wUaOQNAXwuexzyWnD96riiG4jeyMmco5pNCnRRZ3bDmE4IyOzYd2lBlmdcqNfcrRRa0Afqsq3xHgeDvw== Received: from DM5PR05CA0018.namprd05.prod.outlook.com (2603:10b6:3:d4::28) by DM5PR12MB2584.namprd12.prod.outlook.com (2603:10b6:4:b0::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Wed, 28 Apr 2021 17:59:30 +0000 Received: from DM6NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:3:d4:cafe::3f) by DM5PR05CA0018.outlook.office365.com (2603:10b6:3:d4::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.8 via Frontend Transport; Wed, 28 Apr 2021 17:59:30 +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 DM6NAM11FT034.mail.protection.outlook.com (10.13.173.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4065.21 via Frontend Transport; Wed, 28 Apr 2021 17:59:29 +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; Wed, 28 Apr 2021 17:59:26 +0000 From: Gregory Etelson To: CC: , , , , Viacheslav Ovsiienko , "Thomas Monjalon" , Ferruh Yigit , "Andrew Rybchenko" , Ajit Khaparde Date: Wed, 28 Apr 2021 20:59:03 +0300 Message-ID: <20210428175906.21387-2-getelson@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210428175906.21387-1-getelson@nvidia.com> References: <20210428175906.21387-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: 3c7c48f3-8f17-41ca-b9e9-08d90a6f5e77 X-MS-TrafficTypeDiagnostic: DM5PR12MB2584: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GJCtXv8DOSDtnEf9UPypTPgxyfqInrvQa0dkr3LHg9NgZN8lO49gyPfYrazylQg+XJPEJPF7y5L1RQDn72VJnTI+/2Q2BatQFfLTMDGwDWqfRzxSTDoJwdzggq73jyvELtP2VMqwSCfc9ZnHqLUMKlsjOQoc1PFvLlFXk7bNYfUAiIYaVNccGBOPlzh8xWwFwEljoPzK7H0iB5FiBK1h73V3NyRFXwJuYBugxVdvZMq3tgpM8iAiKmp6q/Xna1BdTTE1X7+XIaHFlS/HFZQ0/U2AwpLYhdTNG2C1RWugCcIuASNktOx3lcT31n302tx8gLdHVdwNmnQSLOWTHKNLHYL79NF0nONkLj+7m78u0o2u/tK0kQ/nobL9kCKGAfbhwQ7DI8knLJk0jcPZkNcthzE7oxvTDifbz1NI99jiHDgKE6PTfo6tJLgG8ednhYVxFFHUTqd6Dp32bnBfLBtcmR+YiBXQ0dFUR1HRoGrLpj8kio6kqaQepewv+mbVQ3UQGzU9yanSZwLZB63h0B06zOxv9nc3VktGbTPLQ+JagJb/9tGoK3PMWy5pdFP4zwMpAH7lgDJBFIzYwUNzrpozRYkGPWWaOrjH9zHX2whGtmTTNLZM0RVkXwkaQviyRXMJIw65eSR6U7mVqJ/lsuhy9NX0duVuETBb85KjIh7NZy0= 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)(396003)(346002)(376002)(136003)(39860400002)(46966006)(36840700001)(7636003)(6286002)(36860700001)(2616005)(82740400003)(2906002)(6666004)(55016002)(336012)(86362001)(478600001)(356005)(6916009)(1076003)(5660300002)(70586007)(36906005)(316002)(8676002)(70206006)(186003)(426003)(16526019)(47076005)(36756003)(82310400003)(4326008)(7696005)(26005)(8936002)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2021 17:59:29.1178 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c7c48f3-8f17-41ca-b9e9-08d90a6f5e77 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: DM6NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2584 Subject: [dpdk-dev] [PATCH 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 RTE conv API to work with the new flow item. 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..cf72999cd9 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 (1ULL << 0) +#define RTE_FLOW_ITEM_INTEGRITY_L2_OK (1ULL << 1) +#define RTE_FLOW_ITEM_INTEGRITY_L3_OK (1ULL << 2) +#define RTE_FLOW_ITEM_INTEGRITY_L4_OK (1ULL << 3) +#define RTE_FLOW_ITEM_INTEGRITY_L2_CRC_OK (1ULL << 4) +#define RTE_FLOW_ITEM_INTEGRITY_IPV4_CSUM_OK (1ULL << 5) +#define RTE_FLOW_ITEM_INTEGRITY_L4_CSUM_OK (1ULL << 6) +#define RTE_FLOW_ITEM_INTEGRITY_L3_LEN_OK (1ULL << 7) + #ifndef __cplusplus static const struct rte_flow_item_integrity rte_flow_item_integrity_mask = { -- 2.31.1