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 B8BA4433FD; Tue, 5 Dec 2023 03:56:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FBC742E04; Tue, 5 Dec 2023 03:55:41 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2126.outbound.protection.outlook.com [40.107.237.126]) by mails.dpdk.org (Postfix) with ESMTP id 6326442E12 for ; Tue, 5 Dec 2023 03:55:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFPPl9Y7AraXeoHjMrxj7PwLWUoAJLZ431FQBpVLvn3wASOqzCMbLf9ds0XgJrJ2yg4YASzrjmSe0iQkq6pQS4loecKhRoQcafYTOZ8fHY3flsyxSUDAKfqlAGv3E6fxqIkqmlmzywtXrCgV1pUyd5VLL6uVPIN1BU/qXuZxG5CJqe7p5oaugKXrZQZqZb4zn0osCyYdRxs56vawJNTrm9HQhSCVS+K4yujzsM8LmcxrMnyAy691IjySm/QZ/bOKV35WqDT2NyeRUmmyzbl3cGPkAzjgPyQnU/vlkaJbek7WTC2LxUbEAbMUbDqDkolSRu1kb3bkXw0j30HHcnoxuQ== 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=DCNP9TgDci8qhsmSMiwZwvBsDQt2eaUv6yWm91B/DDc=; b=aWiy55mnYCYIkWsVBrSXhEwhmgGisgBBdhW1FDovq1+SewlEVRnrdayOQi6TLenT6yLTYMhVDOiCxM3O+7XSvd8AgmOwvFDuiTwsomGBBpwIRmLOc9wmb+WaVkrNZ6B6EbT2E9QlrtLPraNI9HMJOWlVFQ7LUfTVAVj1J4BwwBe0f3jtaS5pBy3ax+mhIXSkkTXH0sZdAZUJkjVi61isJdqVYJ33WgNAWgExTqZQqV81hQcjilBlbEnepVeoGdn889wILJWZaeHdagTAzg4M4bk3AjvHyYxyVZOLoK7zz1juvqLq43SdSAYDig363vLo0lhM7O6Wp5q3eH67WSRFZg== 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=DCNP9TgDci8qhsmSMiwZwvBsDQt2eaUv6yWm91B/DDc=; b=Tw9ILicVP38fqWILrnw+bbJsw0PkL1r67wreBRrZCPwaUtOAyjdLAXwZUMNVi3LRD7Snx8QwsmfvJEyVA6rsocZbDQcsR5tS1V5AE2Zg5a+c/uGulmFDzYbwVKfFgwqFpoSc+I9x94y7zM4pyKL/QnBPw1a/jWIqSHrYfpJFGa0= 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 BY5PR13MB4439.namprd13.prod.outlook.com (2603:10b6:a03:1dd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Tue, 5 Dec 2023 02:55:38 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.7046.033; Tue, 5 Dec 2023 02:55:38 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v2 11/11] net/nfp: support QUEUE flow action Date: Tue, 5 Dec 2023 10:54:57 +0800 Message-Id: <20231205025457.1067372-12-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231205025457.1067372-1-chaoyong.he@corigine.com> References: <20231103062606.2632012-1-chaoyong.he@corigine.com> <20231205025457.1067372-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0214.namprd03.prod.outlook.com (2603:10b6:a03:39f::9) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BY5PR13MB4439:EE_ X-MS-Office365-Filtering-Correlation-Id: fc9123d9-9129-478a-fd32-08dbf53da8e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 52uP1QQHxMy7JkKuV/u5S7OH0L2y+aCrwyblnJ8b0AmcZGYn0YIJr/nOYhiOayzLVrr4QBb1ZuWULuys655xrjpLiCWU/n/oY90x+13QWLWRxnsH9PA0nlT/IKLlx+8xxnP5DtBvOyK4+HA+QvpsNlEr+H0KbiqxExFGQcytYowsQ8LFYNOcE4eFjm+RU4a5tylAooYqnVJSbZyGlW2G5+GvR4qvTqP/QIGAe6PTsDn5Pdbmgs77OWzhL5w2Ajjep65MexDVyfNxCRR43PGarhmoS/NZjHkyp3TRJMWbqKUBujCjSMxFmtUpdW0PNfQ2vtLgbEfd7i6bYEZDFwOCC3+QTEdBdMSzpdtSfJ0GGowvR/okbarg/aC+S6myGLbaU4sb3GnXa7HwlzhKa5uz6K1rvXiMPtf8ySO0wJIGHSehvOVm1xIOfglC7m4jG+eOaTrFI8eeoxw/W7+hJGlmzLbD7ZPFX+4l6a8cJrSWDREeX/OnSWHdWkpW4BptdJmggbxdPsCOorDHFhFkOjLC7zjJMJLCSSbHl2su1/r64vCBuKoBRYjKk5pf2xyLgP4x5lxsAdqfyub6B61u+22RHv21UhgibZquKVcw3RYeZ6uSOElkHt0s9/l0n8AKSZOl4RlGMyptwZFNS6QWpJZrEDzK9e/72rkn0eNcCgBtuuc= 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:(13230031)(366004)(136003)(396003)(346002)(376002)(39830400003)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(6486002)(478600001)(6512007)(52116002)(2616005)(6506007)(26005)(6666004)(1076003)(107886003)(316002)(66476007)(54906003)(6916009)(66556008)(66946007)(86362001)(41300700001)(36756003)(8676002)(4326008)(8936002)(38350700005)(2906002)(44832011)(5660300002)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Gut31O+q7KKOmglDsjjtHoZmn8ztRsPMAa59JBfbqJVyASUrwzxF25Oa/h0o?= =?us-ascii?Q?Ayssr3VB7CfoZgJPfGQw875rglDRyP63mWTlXjLUuSWsfyYgetSF/LNG/flg?= =?us-ascii?Q?0HDZ64Suu5FHqN40lFdlOLaHxPoAHHYXUkfH6bGgXjFxpLLMYBCtwF5itm/R?= =?us-ascii?Q?19gzzeVWYxGFSxucOZ4vDF5MzXbrmJarPQ6J+gpmPkYgxwywkLk9TpMEAEKS?= =?us-ascii?Q?d1aB8vAtY0MQgIRvf3bzk4xfrsiho9eQfsyl1s3aoHAA66hPze/tRvjUMhPt?= =?us-ascii?Q?skgLLt1lkxD9M46F/bMH7MZnjsoeA0NBVGR6GVIdUj4lt/ZbQsoeYKBK+cv5?= =?us-ascii?Q?SM+cz28JdV/Q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bbbe5qx?= =?us-ascii?Q?DLd37YknePWlNRb4q+6GqMqb5F98JjUPUXnQCA74Kyks+m+79ELDja2TtqFK?= =?us-ascii?Q?KMd3qQ/rprZDrP137h6+SHeQk0ZmmxBZBeoUJ1A9m3tlcQXjYXKAr/rOpk0K?= =?us-ascii?Q?QwQQ6s8GY7kQQszB6PR5CAjPH+N+Q1Q75Uqqyj+aqellg7iY0HCe1hHWsjs7?= =?us-ascii?Q?a+Gzxs9+PUK+WDUeIZFfeq0XpS3cuNokzDz3fMdzC+Yl90TQu30CkKXEWxMO?= =?us-ascii?Q?T5OdrTs/igq+9EM20VdYC3gTckNCuKBtVSrUPZ+O/U28TkTDSS/qcL7R3eQy?= =?us-ascii?Q?r94Voyh+UhyQmevxTc9eZQD4J9Gd9Q8npaNXmR4NtRy1XaGyKiAE3MbPWxgC?= =?us-ascii?Q?dw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc9123d9-9129-478a-fd32-08dbf53da8e5 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2023 02:55:38.1334 (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: 19VRz1mLuxtaQJO1a6re5RGIcGwTUQsmgziufnJkFV7Jhu3RRDh09f3Rc/5DG9ZRL06MBl9M6f7hzVFjSOE9+olr+Us/TQWwTZ2tGRnt0os= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR13MB4439 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 Add the corresponding logics to support the offload of QUEUE action. Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- doc/guides/nics/features/nfp.ini | 1 + drivers/net/nfp/nfp_net_flow.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini index 248fd34a39..df1d403c6e 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -54,6 +54,7 @@ of_pop_vlan = Y of_push_vlan = Y of_set_vlan_pcp = Y of_set_vlan_vid = Y +queue = Y raw_decap = Y raw_encap = Y represented_port = Y diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 71f126156e..98e8499756 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -562,6 +562,20 @@ nfp_net_flow_action_mark(struct rte_flow *nfp_flow, action_data->mark_id = mark->id; } +static void +nfp_net_flow_action_queue(struct rte_flow *nfp_flow, + const struct rte_flow_action *action) +{ + struct nfp_net_cmsg_action *action_data; + const struct rte_flow_action_queue *queue; + + action_data = (struct nfp_net_cmsg_action *)nfp_flow->payload.action_data; + queue = action->conf; + + action_data->action |= NFP_NET_CMSG_ACTION_QUEUE; + action_data->queue = queue->index; +} + static int nfp_net_flow_compile_actions(const struct rte_flow_action actions[], struct rte_flow *nfp_flow) @@ -578,6 +592,10 @@ nfp_net_flow_compile_actions(const struct rte_flow_action actions[], PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_MARK"); nfp_net_flow_action_mark(nfp_flow, action); break; + case RTE_FLOW_ACTION_TYPE_QUEUE: + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_QUEUE"); + nfp_net_flow_action_queue(nfp_flow, action); + break; default: PMD_DRV_LOG(ERR, "Unsupported action type: %d", action->type); return -ENOTSUP; -- 2.39.1