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 5F45BA0560; Tue, 18 Oct 2022 13:30:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2793427F4; Tue, 18 Oct 2022 13:28:24 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2134.outbound.protection.outlook.com [40.107.212.134]) by mails.dpdk.org (Postfix) with ESMTP id 132B342B83 for ; Tue, 18 Oct 2022 13:28:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mvCuet7RUAMxCl231S/LOj1JeeDqEsdVTK+cwDJY7Ub64wubFYEwo+QesXUoceZWxyrgvioMbL6N2OAUxACxcdP3yks3AUUmxCNL7XKAFMKx8FP60SBdHyl/XriXMvGkaRGHhHMV6GNdlF0hCNvSQQ6I2wUR3Uw8s7JtwyTzRyeM9PFmm4lLW2AYPsQBFCUS4LrD8o96tB+M4n5tAGqti2lJj7NQIW8nsHuPZfcLmn2CoD2cWAO7i8n2K/GVD1pgZjrhJDTKMUuzzyJ3B5+kGrOBLVTdeoKDR2RieLGq9NmP1eOB4zQ6UGVL8Hej4opKRT4ZuuHdwXhWSii1ClHOJQ== 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=BnobmO1Qe4rXfDJDy28DdOF0ef8dRuHAq93QXijeQ6g=; b=n+TWOBIBT5cDmTX8SHv21HhTkqsmy44ZdwcTdmrsxzJ88hzvXaNHlbVD32KJds2wHyw07kaTm6rjjNsQFnPnYwmIg6MrS86q7iVExJ9UvdmM+ty2yqgvLC9vzHA7RtquEvPsWUy2EUtIgw+fRFiFqXU4o5UngM65/R/efTC+el0UznMQyPqJ73sb4gAnN0nVUjNBlZ6MS8NTAQccIJL1AzHhYI2ABBRMsn0fe+iX6nuLjflltPI8mZMaHdSNkcoOWwizzMc2jw55GtIJU9PEPcwnKGrGG0bXTjQxIzuFOVHRhLH8KvKKrbojnLmMRrFyFNU2dBvoa8QfklAthA7/Jw== 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=BnobmO1Qe4rXfDJDy28DdOF0ef8dRuHAq93QXijeQ6g=; b=qqHrCLZVc+yt/oXYopy9JV8A06BnTl4eRiegMnNy5XameKaUt3DdsDwF419loEl40cXCj/5WD9I8Jb9iKUboQGVQWw4F+pNn3khh56mqdWGBDpU3ZHrQXSE8gg6dUKmAxW6u1lIyCYMyEJFOhzvzcFwliqCdUEZIx/cICCABc/g= 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 PH0PR13MB5975.namprd13.prod.outlook.com (2603:10b6:510:16e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.22; Tue, 18 Oct 2022 11:28:22 +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; Tue, 18 Oct 2022 11:28:21 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v4 22/25] net/nfp: support TP DST flow action Date: Tue, 18 Oct 2022 19:27:11 +0800 Message-Id: <1666092434-10357-23-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:54::16) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH0PR13MB5975:EE_ X-MS-Office365-Filtering-Correlation-Id: 2aa4c006-5f3c-4e0d-3afc-08dab0fbdcee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CWnWPMFY4WMmDvkDymh/nLgqLAexh94RR79dW2OgKUX59n6PBYd5uX1lKJDV+r7seNFbl5lEle+9galDXsGmduLbR2WXYBSP2XyPw4qDSSI8Z4aK9buSmCOfa0G7kM9D19WTv2yyFfxISSoijc/OIUrL1WrTnjnS6FcYWBzVepsiUvqJCqkgr04wbgOXH3mJ+MLYl3wvmdeZZrKgR2/Rj5QP7xOOXCFzUnWPIsRdGNFPpU5Bd5HOpRrHpkOQaSaWdBfI5t+iHjfnOebqFKL+/HjthJtGQwdc273RWpbLE6yxia9TOiaLd2QtJy3AsjfvzvI+RqVPcS8J4A23HvlZIsGriEYspfTrT9yYhWqhuMjJ9GYjuyHTjqZhAyvGfFMJNOlwnthJVvL2605FtpGACSXQxMcswpTy76teyV/XV3xG+UOhqkuSV2RergGiBjHeXxjhZxKb/SlAth4VUW7vzL/G4zaVJnFsIX3gCbWAJDBPXgASLdiyi7GsL+kHCGgNR5lfhB1dIwMVtJMO/ye5Fc7xymCD3b5C7e8OlMEcDmkN3RhJXHes2kQcaT9yRGfMHulknp+3IMRBrS1PQtu9DeKXwzZixG7IjIQGvCZzyZE5M0KRSHxW1YveW0Sv73vtwAXJpfaEHdO4okIXpLMXK4kOmXgTjP/yozXb7Aau9e13UmlHZC4Hnc5U25IEzcf3ng5uazciyc6jh76xJLhVV2YTEkq3Y0IhU9HG8cX63+AYZ84yaBvU42TKoBr+Rs5hOJEaJOEcy3LldufUOGthktDhRhLwrfgzDEIKEHAwGW9hGw/uzCRJh6YiuWqg1J4U 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)(366004)(396003)(376002)(136003)(39840400004)(346002)(451199015)(52116002)(86362001)(186003)(2616005)(83380400001)(26005)(107886003)(6506007)(6512007)(6666004)(44832011)(8676002)(316002)(41300700001)(478600001)(6916009)(2906002)(66476007)(66946007)(4326008)(38100700002)(36756003)(66556008)(5660300002)(6486002)(38350700002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QW5EOWZGVlpzbXpmVDhxTllCK0xZMThCdFUrMlVVRXU3b0NLNzdvb1FIYklS?= =?utf-8?B?MnkrdHh2QWlLbk9zaGR0dlo5dmRjUGV5VjNuMFFxZkxCNTZHRWFUYUlxaHc5?= =?utf-8?B?VUYwNEkwYVVYWHRwamViOWNQdytPTjNEUFB3VWZEVkhXSEFleERPUW5ycWky?= =?utf-8?B?d0U0Zm5DZjBrdkxFVEZDajB1aE1KVHpHWUIwYkd4aWR5SnpYRWlVdWFSbW15?= =?utf-8?B?OWlSY1VxYndoV3h3UmpFOFVQRVVaeEJKR0dSRml6YkQ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aDh5UTZzSk43ZGpOQm9vNXBEVHZ3OGRKbWhSUGUwYytqM1I3a25t?= =?utf-8?B?Z3dPbUduNzY5Y0xJeW4xeWpjUGtQWjV6d05GVkRIZEsrQWxkWFFidUs5S2lo?= =?utf-8?B?Q2c9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2aa4c006-5f3c-4e0d-3afc-08dab0fbdcee X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 11:28:21.8726 (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: +qdjRQHuHjxIcGUtp78b9oGcGN0eHy8mSgrOkBzbP19I93sa1X55VRiljSgI8RXbRsev7jF7EuCQrTx1lPuYRk7AduA6MVqvHx1yoguoP54= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB5975 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 f40a995..eb7fb15 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -51,4 +51,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 dc37769..6fe4e6c 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -665,6 +665,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; @@ -1562,6 +1569,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