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 3C148A0A02; Thu, 20 Oct 2022 04:23:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D63F242CD1; Thu, 20 Oct 2022 04:21:43 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2094.outbound.protection.outlook.com [40.107.93.94]) by mails.dpdk.org (Postfix) with ESMTP id 1554542CB8 for ; Thu, 20 Oct 2022 04:21:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HlVod+ZQGMJIQwtXzgWqPcejsQTCDCKXOXpDCe7F6bKa2HdU/aBiyDeN5usaGV3gatEHdcUrgMR94ptml+W2ysN/1+BBWvDC6bsybz63MJhFgjrUfH1trYcOeQixBj5xohUzU6KY3qSnSeiIEkCZiHGsQuKTTLKQni2suxFe8feqHkP6QfX0XaVYc6rV8rtL+ahNCAWVnOkEigwtqpaZAEV+rgytoLqCjIDPx8AJ7czkQKHGQvJ89N7ucl6RqtCKIDnjbNUqD0qxEpgrKG0TdHDAjcBdcyDv/vsIxIXoTZUqyVoCt9SQcsBzendTOlnTu0VhrJ+38PX01BudcAapXg== 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=XAqG27Mt3lhIMNzloyf9mU/hWQv14enLkytDOyUUUAs=; b=aI0Cg7mcdKjedu4faulkw7mYv2fpQnJy8ca+t2WY5PHdD8FYRpODOf0ZbekzTI4xEI3MABoAGt0//ckaXLd58tZ57iUM90HCwJQjUK80dPnVsEFCqO7usrAx3CMn8aZWCIfT6BXuW2BAoVF528dmQ/G2sADpeeZLWPtKKA1f8NUNspVA75hGpmGgDiMK/jpMHwT+p64lskM4O8Vj2dqWMk4LP1UZwnFMcNmpZQ08ZuV9Vi0oFC+vKO6TdFsD+JuXnV/KNVakR/GmizmM2rAYYa1bf3b+W2NT/Mer7SkpPE3nfPgXew36zUyC4fBlowyumgJUbr1T4rYSShN2nR0YGA== 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=XAqG27Mt3lhIMNzloyf9mU/hWQv14enLkytDOyUUUAs=; b=axxiduPl9rs1BjFpYgOxV6ti3R/PQlqOcvc9aiuvWlUcfl9LpP0I+dVfOZk3nM4Wv/3dVVjQk/Mk+LeLNHZhbivcY7/5rDl4X9EAOPSyMY1M/wuIxn1odXEfuM58e8OpsEOVVzVQpPTfXk0B052uQlTBcU4oAz5eO3ivN+gtZFA= 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 CO3PR13MB5784.namprd13.prod.outlook.com (2603:10b6:303:167::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20; Thu, 20 Oct 2022 02:21:40 +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:21:40 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v5 22/25] net/nfp: support TP DST flow action Date: Thu, 20 Oct 2022 10:19:48 +0800 Message-Id: <1666232391-29152-23-git-send-email-chaoyong.he@corigine.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666232391-29152-1-git-send-email-chaoyong.he@corigine.com> References: <1666092434-10357-1-git-send-email-chaoyong.he@corigine.com> <1666232391-29152-1-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|CO3PR13MB5784:EE_ X-MS-Office365-Filtering-Correlation-Id: 54cce0b8-2f8d-4aa1-a367-08dab241d267 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: czBrQBCUgoKoXcLPsu93W7RA3A/wYr3B+EA87SIRh56Zoj7uMgiU4SfFzRPvZt2w56qaC5R98m4pEeLQVG2/wq0zk32TLb0ikN8gsyFTKLCo/E7NbSupOCrwj+9GmNpiio+cgRT1qfjeAKuGeBk/xg4rtm8HU/yC7nfDASd+WBurbNIFYhHu4jPtNR3paGBpZOYA9AwR82+VQfGBE7nwZlFf/Dl1k1XFniiT8oyFejJ5oH5gb8UPae4cKp5tO9a1rjYCvQv68lc+qibcQ/J2DTTGL3yCx88z8DzSAfDkjvDfycFkdT3FXJrMZfjltQ34LfjCGcoLBAoi3SSt5ADb39s3P1erdgsz6pkI0pAGOKTXZETRoROk19sSVAA5wPURU4QKPKxHLCiG2mM7KgbQJXEi0sz7Vp7sR8RAAg6YVpXm1yhzRiW6ocsXWYslpsPBZ4xTzGelvgEYd53y2uVUzqDddegB0NndNt+0WoeMyOzk9PwQFs+zrP28+OjEUbBLCAVpo1khgG6FvLMNG1cLdAIG8MsKIvAecKlMjXIBmhVZkadcUf6QdPnCStjXKayv/N0wjS1i56AbAKnbQ95LgsbvSLF7VJpEtGmQXtMSMAubdITPsBpfqXG6URWgu3pCqwe+b3au7nji0NpH06Gxhq1cafFM76KpPHBv22mHrFTYF4lvhQ0UpHbhdiZNQ1tgkBjgcdWAuzMXau0qhN7HoLJXgIWyVJod3V2+suqcKVB37NARJwJjOuqLNmzFMLrDNYPVGZWIZ2L4S2WC7nB8+A== 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)(346002)(396003)(39840400004)(366004)(376002)(451199015)(6916009)(44832011)(2906002)(316002)(8676002)(478600001)(41300700001)(66556008)(66476007)(6486002)(36756003)(4326008)(66946007)(5660300002)(38100700002)(8936002)(38350700002)(2616005)(6512007)(52116002)(186003)(86362001)(6506007)(107886003)(83380400001)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UkhZanM5K3RUNmZWOVJZV1luSllxaGR2UHdwSXRHaTdobVpRaC9TN2VPbVJM?= =?utf-8?B?WXArSGw5REt5ZEp3dXZPQ1J6MVpBaW9MSVRIekk4OW42bkkxZVZKSXRjQUgv?= =?utf-8?B?YVU1ZTBFa0Z1SEFJaWJjRFMzL2Iwa1NFekF3MHcyUzd4NHZod1QrK0lTem5p?= =?utf-8?B?VVZyalVZK1FzYXN6TGI4aUtqL0xBY3QyL1J6TVBTWm8wTUhlUGJFVVdmazV5?= =?utf-8?B?T2xxUzhScVZHcy92ZUhFbmQwSUFPRGoza3M3QjlDMkllUkJGL0VCNzJOZHpZ?= =?utf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K0tYc0tOSHErSFR0cmREd1ZN?= =?utf-8?B?TTE3SjJyb2VrT0pqQmlQY0V6RUYxZ3NTdFFIdWxNTi9HMjZpbDJQeXlxbXg0?= =?utf-8?B?VFE9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54cce0b8-2f8d-4aa1-a367-08dab241d267 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:21:40.2096 (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: GNIkd3Dvpv/Mdyn669YtBrSXOcha4Lj4ZmciKHr+A17a8hY1aG4Sn/NUkz31DO/nrgiYkFMFidwBLqt1evR2pQ9T6hJ9/Itl9Zhu3kF5dM4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO3PR13MB5784 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 set TP dest port action. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- doc/guides/nics/features/nfp.ini | 1 + drivers/net/nfp/nfp_flow.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini index f3ac51c..e8ccd6a 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -50,4 +50,5 @@ set_ipv6_dst = Y set_ipv6_src = Y set_mac_dst = Y set_mac_src = Y +set_tp_dst = Y set_tp_src = Y diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index db05a5e..93f4c04 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -653,6 +653,13 @@ struct nfp_mask_id_entry { tp_set_flag = true; } break; + case RTE_FLOW_ACTION_TYPE_SET_TP_DST: + PMD_DRV_LOG(DEBUG, "RTE_FLOW_ACTION_TYPE_SET_TP_DST detected"); + if (!tp_set_flag) { + key_ls->act_size += sizeof(struct nfp_fl_act_set_tport); + tp_set_flag = true; + } + break; default: PMD_DRV_LOG(ERR, "Action type %d not supported.", action->type); return -ENOTSUP; @@ -1550,6 +1557,14 @@ struct nfp_mask_id_entry { tp_set_flag = true; } break; + case RTE_FLOW_ACTION_TYPE_SET_TP_DST: + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_TP_DST"); + nfp_flow_action_set_tp(position, action, false, tp_set_flag); + if (!tp_set_flag) { + position += sizeof(struct nfp_fl_act_set_tport); + tp_set_flag = true; + } + break; default: PMD_DRV_LOG(ERR, "Unsupported action type: %d", action->type); return -ENOTSUP; -- 1.8.3.1