From patchwork Thu Oct 20 02:19:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 118677 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E13DA0A02; Thu, 20 Oct 2022 04:20:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E04D240DD8; Thu, 20 Oct 2022 04:20:57 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2113.outbound.protection.outlook.com [40.107.92.113]) by mails.dpdk.org (Postfix) with ESMTP id A7CFF40A7D for ; Thu, 20 Oct 2022 04:20:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gg+g8VOrBZvs0NHc00KLM33TGyb63j5GCjM61u4AEJX4fyKJBNdU0uIXMEOnMjI/3at9xaxDB4oCI+owm7v+n5eDevIEzqdLFEm7NkGWNbJ9q80+7AWFVBnbhJzSnkUZU/BVIaxTPCLd/X+lqQJOZseDna+AlPMTlOTEhCLXcl+p94Gll9thrKkBbhOyC3AeivP6Wmqx9XFp4Ep4jSdijr/HbRlCM+Z8Y/bfamLkFqxLXQrLWMOHt8GHZQVpEWtLZ1g4+y1K3FwniCCC3GDmNTsRD0croqfcmyIncbI5flNQ2oJREj7/VOx9NR2mgGrFiqgy0CgC6vsmk33Sxga4rQ== 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=BsHYEyUlmY/YR65N7zTACGpuennXa5WnHArko1NeAYM=; b=gq7OFcEEv27pXVgX0o022OnDfwosu/n8yGD65LZqZ76xzJ1AkNTYBlGApMCXhrl7PJ6CSJf/zgmbYd5V3MI5Tb8+vCjhwwp8KmErQwyLvwT6H55q+rR+EoY8rh9qWRW5mn+Vjd7qTdY9VFe7Jz0t7w9KjiyOoGrkRA4QQMfMvaZh2n8kIjwiytGxaVexvP5UsRPl8AqS+w4AEh0kNbK8yGCd0vONEJ2ck0+BuQw7f6NjVL76zpUzxL6H36aecUsVe0SrrG+vYCn6zWOOHblUsz9j2YSy3nxrPEF3gLcN0D1IQ34UEPRXlwooV8PpOXZD1+DwUaVqM61ZxOs7RvRyAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BsHYEyUlmY/YR65N7zTACGpuennXa5WnHArko1NeAYM=; b=d4IHMN05A6l+GHXfEE8C7T/Qok2szG0ZXrLgZHbqNUqVvHNcVbcHTGlZgFyC/lVOgu+VotyHrwgM15qL/JZR5x0IFLbT5qR4Bhl3CfdpIgDO3IgblPnnem/tljCYsTpDaDr7i+eL2KCRgd0UdUMWYCJjMBF6+eCh8hvvrAcchAY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by DM4PR13MB5906.namprd13.prod.outlook.com (2603:10b6:8:4c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16; Thu, 20 Oct 2022 02:20:53 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7c26:1a0b:2825:6f4b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7c26:1a0b:2825:6f4b%4]) with mapi id 15.20.5723.014; Thu, 20 Oct 2022 02:20:53 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v5 00/25] add the basic rte_flow offload support of nfp PMD Date: Thu, 20 Oct 2022 10:19:26 +0800 Message-Id: <1666232391-29152-1-git-send-email-chaoyong.he@corigine.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666092434-10357-1-git-send-email-chaoyong.he@corigine.com> References: <1666092434-10357-1-git-send-email-chaoyong.he@corigine.com> X-ClientProxiedBy: SI2PR02CA0048.apcprd02.prod.outlook.com (2603:1096:4:196::23) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DM4PR13MB5906:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d60b4f2-9eae-4b89-b0a9-08dab241b651 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: orWqefGWfZsGMU2aZQqqCerWoJtzttQ7SODXAZHIPmI3IuMY1y7lm7pAWvf1LN9RgDkzdxJ/gK9B/gq/uiym4hq9N/Z5KhgmXMrkotaonRePneXFO5Ox/01SLwNd9wLQ+spx0MfeCyypSSC6qQmIo7G6tZnJfRhaX/FNTwvP5k3fmFovveLPymZd8RwVHU2jy+3TM8k9ojys9bjlKitANGAfRyOpBfA0DVqIrWFeArTWvNcFa07Hag+Lx3HdcmTrXmnMZBqGaScXAbkQFfl/++K0VEY7pdlfH72M33ie/PJk5mIjt4TAIgxVh2ayTcv+ZDfH060nsEwWxhX0NlG9XPStLD5JLo2yNmJWE7HbyENQ737WAKz33dYfIZ8f4EixgcLTH1NnF1y6qEdpfstv4tWJLokjUgWtuQPTh2GfQKwXE2w+zT+J5WpEkyFfNBmoxDE7nn6TLSKALJAnVj/mfE3+HQANbeyCXVcVYLgu+3ItSSH2lPWwi0jltBSkL14JrDzflUElmmu5pkaWeHA62Lb2vMrktZek25oBQQikGVhsY7SAhixquuuD++kM97N2aPgLtfwyUg6cKpN5MZicW5u9c8v6JSimKEwe/IqFqdSyrcJa3Byd5d8hukOR4WT6PdiFgCT6El5euAkkd6OCmNZ29FHaLc3r2zlLCHyDwOT4bN5aXkj7TN5kxvXvFOE04rvFxQWuobIOAgQrdJgUbOev1klXtSe2ajOORQK2AlkuneGO6R7S7+SaMo2tz0Da0k2Y9onzJ+hn/Q84XJCQyesU3+ZqqfDw026Pq+yUPTo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39840400004)(346002)(396003)(366004)(451199015)(38100700002)(478600001)(38350700002)(316002)(6916009)(2906002)(186003)(66476007)(52116002)(66556008)(6666004)(66946007)(107886003)(4326008)(6506007)(2616005)(41300700001)(5660300002)(36756003)(8676002)(6486002)(8936002)(26005)(44832011)(86362001)(83380400001)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?sHg8hf7LFYqwv7eDk0DjeHKBfaqD?= =?utf-8?q?X+2q2qIRqyjkbiOxYT2LbuEi8a2UzqZzHsu9ii9V9pO1YoWo8FnjNbMo60QcoqXid?= =?utf-8?q?HAUuhKwJz+tC0PcSnE5epm0zf3Yzy+5Sm0Bb4kFrzFmwpMnAeWPpE5J4xsTZ/zrNt?= =?utf-8?q?XE0JDI7N41kF3kkqJ1g1GUAqj/tAnI2bBp3sACoyTmyb3CddvTn3RiEN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/0PV1H1Fn3NOBIiS8zVl4LVSGLuG42/Lya0Du2gqsm+D5TKSSTfOzNhFPIjpOYL8?= =?utf-8?q?B5ucJCssYo2oSNm/xg1tcGzF/krGsBLpRJte+wZm71Pq8df1jI+WF6i3tZL1L8z1t?= =?utf-8?q?9rFgUyqDE5vJ53UO5vylz89Pk5hrmn5IS99Mtpnu7HM5P48oV1w7j3Oq86oiAFIP7?= =?utf-8?q?mSkaScyM1YTZrN6GLmNIyqBvJy/IUKgv3kYyZouXsWk4HzHdby6oamYux/u8p0ZH/?= =?utf-8?q?modO3/6Kqa4LvLrGiMJOmAS0H7FVz8LJFJAjkHFNSdT3yATZ9o3FZq29Os6UIJbot?= =?utf-8?q?Ae1UhaW+bewy3oVhQrF4Kc2z3VLFw5AiGZrsVIQvQdeSdZihqoqJ6Z0xpoYGCEB6D?= =?utf-8?q?s0a3XyRmFoVeTAiBRjjWbJTNEVMQ1J7b2/zem4O3HMOM08S+qAIvaScCN7X5bNu9m?= =?utf-8?q?F9w6jxBvByiuTqMyKEUclpdIuSL06U4hVw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d60b4f2-9eae-4b89-b0a9-08dab241b651 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 02:20:53.1364 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: p0Kg3uAaITSmlQTyGs5vJ6jiooB2NADKJ2cpGHti121gBOzk4TyYDDw9boC3KsOvtvGqv3EgEyGsXTDHl3wP/PmvLuijGj4WnIW7N9w7a1M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR13MB5906 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 This is the second patch series to add the support of rte_flow offload for nfp PMD, includes: Implement the rte_flow related API Implement the offload framework of nfp card Add the offload support of common rte_flow pattern items Add the offload support of common rte_flow actions * Changes since v4 - Store the hash_key to avoid the uncessary repeat calculation. - Make sure '.validate' don't update 'flower_version'. - Guarante 'query' is zeroed out. - Use the 'rest' field of query action to decide if reset the stats. - Modify the 'nfp.ini' document. * Changes since v3 - Change the release note. - Change the headline of commit message. - Adjust the order of commits to prevent the memory problem. * Changes since v2 - Fix one problem import by the first patch series * Changes since v1 - Add the 'Depends-on' tag Chaoyong He (25): net/nfp: fix CPP bridge service requirement net/nfp: add the structures and functions for flow offload net/nfp: add the stats process logic in ctrl VNIC service net/nfp: add the flow APIs of nfp PMD net/nfp: support basic flow items net/nfp: support basic flow actions net/nfp: support VLAN flow item net/nfp: support IPv4 flow item net/nfp: support IPv6 flow item net/nfp: support TCP flow item net/nfp: support UDP flow item net/nfp: support SCTP flow item net/nfp: support SRC MAC flow action net/nfp: support DST MAC flow action net/nfp: support pop VLAN flow action net/nfp: support push VLAN flow action net/nfp: support SRC IPv4 flow action net/nfp: support DST IPv4 flow action net/nfp: support SRC IPv6 flow action net/nfp: support DST IPv6 flow action net/nfp: support TP SRC flow action net/nfp: support TP DST flow action net/nfp: support TTL flow action net/nfp: support IPv4 DSCP flow action net/nfp: support IPv6 DSCP flow action doc/guides/nics/features/nfp.ini | 30 + doc/guides/rel_notes/release_22_11.rst | 2 + drivers/net/nfp/flower/nfp_flower.c | 11 +- drivers/net/nfp/flower/nfp_flower.h | 2 + drivers/net/nfp/flower/nfp_flower_cmsg.c | 69 + drivers/net/nfp/flower/nfp_flower_cmsg.h | 337 ++++ drivers/net/nfp/flower/nfp_flower_ctrl.c | 73 +- drivers/net/nfp/flower/nfp_flower_representor.c | 3 + drivers/net/nfp/meson.build | 3 + drivers/net/nfp/nfp_ethdev.c | 13 +- drivers/net/nfp/nfp_flow.c | 2295 +++++++++++++++++++++++ drivers/net/nfp/nfp_flow.h | 176 ++ 12 files changed, 3000 insertions(+), 14 deletions(-) create mode 100644 drivers/net/nfp/nfp_flow.c create mode 100644 drivers/net/nfp/nfp_flow.h