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 DAF6BA0544; Mon, 10 Oct 2022 08:11:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9EFE42BC9; Mon, 10 Oct 2022 08:10:04 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2113.outbound.protection.outlook.com [40.107.94.113]) by mails.dpdk.org (Postfix) with ESMTP id 7785B42BD1 for ; Mon, 10 Oct 2022 08:10:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RcvGKGfamsTF8dLyniS3MryCRbOAogeKNnBYU9dmdlAWrEnsx5ZgE6txIuYUl1c3pdBP6HdqbeVXfnz5266TW7UtegcOQ0ZJa/+lv5cmiHzCJjmV14aKAZSGFzGIyL8T/zHy+h/nv6v8aEAqRaftvn0km1I3fdS59aYczMRNz35cNvrLM7swU11HjCsgldpaJY2WXBwNERH42xzLLbbCNVXxAPUlNU7sce1VQKf4eM/avuQT/UkxB2HDwE7jxVwh6IEv1MG3n1bXjjRwGQm1r77+U8GmC9MlxMnk3f5WnUvxjGxcga/oBj4zhuyP4qRXFW0T2Bz4SiJQ8czy9iDJGg== 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=jDSbf+Ne1xCAjOxRwFmCaHOlV/nCTxbjg7jbmrR9yNM=; b=DyltKPpLt15xCqkc5pRgc4yRylnE+tSqQpBUWNUku3L05hKpIzivoBpn4/FWHA0uY1hvnXZufQE95EiJIyIJZ5D5APkK9m9sh0U90Nvdozsy84nR9QGQX/5Bkhwut6ZLU1h4tZR5bzv24n0RRHlNWvvVPcKJUWQGXb4Xwef2ct3vksZjYVbdYCJ53N1Yl3SGB4L1/tOpg729Bf6YKc/NAAhHYOjZQ2TXsDDvM1WkO3FziMgLvBY72u/hsDyB6nmqVstMiOB9CdE8R3E5LEWaqyCaEAtd6dYRMGdTrnZ5qwbKUv6YDigKUPIj0rwsfXJacYUYkwvAQnSN2qSjAeE5+A== 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=jDSbf+Ne1xCAjOxRwFmCaHOlV/nCTxbjg7jbmrR9yNM=; b=bWxIBZmA8TeD8oq5qE/0xiezwQ4VBK/KDUYyE3ZClGMCiBVK3AShko/5HkNp6nL6oNdLojg4Sb6038bvTGfhYBYuyEGC24xdAHW75wrdM71mO10LuApVVTLUMto/DsvnH00Iai5fC+3BJSyXPwjZPw8E+usI0FTVRVWARQSprDA= 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 CH2PR13MB3877.namprd13.prod.outlook.com (2603:10b6:610:91::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.14; Mon, 10 Oct 2022 06:10:01 +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; Mon, 10 Oct 2022 06:10:01 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v2 21/24] net/nfp: add the offload support of set TP DST port action Date: Mon, 10 Oct 2022 14:08:59 +0800 Message-Id: <1665382142-21684-22-git-send-email-chaoyong.he@corigine.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1665382142-21684-1-git-send-email-chaoyong.he@corigine.com> References: <1665382142-21684-1-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR01CA0051.apcprd01.prod.exchangelabs.com (2603:1096:4:193::6) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CH2PR13MB3877:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f55e8ae-260a-4829-66e0-08daaa861122 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qeyZVaHcFuteNGaXDU3DnZMKq1ubPoqL69MfhSj0pZSt+WjV3NezzdtDwsgOSmIEnJbqMJLvBx1oPgQRULAQIP0MfP1ykEvur4hxgaNb1reN72Cq9FAsHJ/u2gXxURrLf7+0chOpyMid0zgy4LZD/NOSSf/eyjsUswe8Z2FR/+RdZ6CIFnuZ0yYMkjNLMvc7sFxtxKJkDAXFJIs4A0exLOQsm0m3vFWqysXNOBwMTmvAyx764ytvtJifC7ssYcDZZVhDochh2Ids/Kf47CDJdMGomGGWPjZTDtZtYFFK46BTQgRNoTEW6cGvZw/MitU6lLX2TQiG4FDHgJjg8KQts5wijjxAWMMJTFUGQvSfShLSDon8DS3yIbTF66xxylrvJ/Sf2bF3TL/Zn2kxfwlxn/Pc3b0B0RGuyVjUl10VDkVM5eCIrDVukbJwFlPlH0b0kN3ONOGHHcNpOs8CQi3NAWQmmDGFkavo9C8Mn+GVTrFlYE3+1PjG0uiOLU+DefVt6D30DCedrH9ebwsI+BfBP92U6rH65K7Rrh4MSEe4d5n4HOnh189nRVUAsGEgdwxZ6NQJGM2yUqMn78ut1w9WI5X9uAujiBGmeNqBS1rjjFM3LCL8t27WMsJ0yvGgvZttgOdpuMaAWCzOhG4YIup2dWHqrZFMY0kiQVPki+YlRpL9UDotQj93Ck3PFXy37IL5/wMVVQ41fAchapJ4c5cPtJCii2oA77Wz+qWcJoKR5btK47R05p9zPxB7/K970N/NzInd0YUqV7xE1IxDPNsvcCz2TYALW9Ew+ZkbcNgmuk4JwTLubpPyuYhUDzfyD8zM 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)(366004)(39830400003)(346002)(396003)(451199015)(36756003)(4326008)(2906002)(8936002)(44832011)(5660300002)(41300700001)(83380400001)(52116002)(2616005)(107886003)(26005)(6512007)(86362001)(8676002)(66476007)(66556008)(6486002)(478600001)(6916009)(66946007)(316002)(6506007)(38350700002)(186003)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bzVsamQ1Ny9GbW1jR0JlWUE5cGRId2NpeFdJc0lpS3hISGpOc3NpT3VVSXVy?= =?utf-8?B?dTZLWkUyWGFvUk4vRnZ3MFMvUDhOYm02OFNNYm5nZGZxdVlvb0Ira283VnRU?= =?utf-8?B?M0M1UjdFUlVzT0Iva1lGbEh5STV0K1VJVThDejVTUVkzM3ovVWMwRks5U0ln?= =?utf-8?B?WGdJVFoyS1ZBcnJqd2oyUFFFSHdHVFczS0pzdzFNOUpkSEFCNlFFdlV1bGd0?= =?utf-8?B?cFJpaExDeGVyblQrWk41Q0RMUVdoUFBCRWt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f-8?B?bWZiTXYvcmhyTHBBaGRSdjE3VmhkNnNHL1VOeGhUMFhtOTVaY3piUlpFYjha?= =?utf-8?B?L0QxUG1xc1YxeXZ5K0ZEdnEwZFdBOFZRdUFaR3VlaVl1eDdEMkU4WklTS095?= =?utf-8?B?ZFE9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f55e8ae-260a-4829-66e0-08daaa861122 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2022 06:10:01.8965 (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: TKhMSjGn/O/lJLjFAmGaR8kkajWIkJiPXKKVULsh4xvbdJ7GIEuPMFZn3UimtaXsttjU10t/dH0ks9Cu51+K+9Z/IqBAOOO3MOuZGQtaWeQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB3877 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 + doc/guides/rel_notes/release_22_11.rst | 1 + drivers/net/nfp/nfp_flow.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini index 68f5b89..c7b560b 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -52,4 +52,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/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst index 6f0c9e9..f0416e5 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -169,6 +169,7 @@ New Features * Set the MAC address * POP and PUSH VLAN * Set the IP address of IPv4 and IPv6 + * Set the port number * **Updated NXP dpaa2 driver.** diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 96bb69d..cbdd357 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