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 DD932A0A02; Thu, 20 Oct 2022 04:23:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08A9342CA4; Thu, 20 Oct 2022 04:21:40 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2096.outbound.protection.outlook.com [40.107.101.96]) by mails.dpdk.org (Postfix) with ESMTP id 1DB4442CC3 for ; Thu, 20 Oct 2022 04:21:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZVV9e6Zfm5J7ZYFxX6PRSAXr/UB6aCn+jsVmQBioqTUAHa1uu2UJi2Lkx72KdbzSLWuxr9/ZgdrztZW5sJgadjBFBQSwovID+qsNI+4AvKNwg04WkMGfKnwdxPpdpGj/Z9pe8Fw6/rMnsa+eZThF5/OTJoC7uViP16ZockHjWK7DC/yXCOoOTVkUqWtDjeUZINMQwbhlPr5Cixwm/E3acKlEw2KUL1WlzDKV+TW0eIFvXi1MArBMWnqYR614P5TBFRVjydAVpouZpTX1cRCngCEoa3SgTvKx90Q9tq95PULBQbyxB0NRT6mJrJOm2vp0ONUwMKOG8cGqFGIhiSkmbg== 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=oM4lrwe5vH+VGVaBavbOej153WZWP+rvbLO77HKBN0g=; b=TDABjYPJ+cSVPyIyRAlD8lX+5uqwij1VC+HblC53fwwb2Gs7bzZ9T7bdMzNhpcXvXwWvUByWFDqOybW5b6Y6psXLgDhAKLx30O+dUEufUzcGK4szSmlVeZciwi0s3bvK9vW+Z1wCyXiQfuVciJZM3LZazz5+MjCki7u4zf2YnhRhh+yZ8XOmO2dxJoEmfpOyiioQdYQozOKnTx1ED3WvvCSpY+8KuNmBDF+TnRDTQg2/BLiz9/RHqkQDDabvY598CjfldeGcofiyGYLFy0obPvgrNlK+YaDH7TTbyU/nIjQNhShFCy8CLfYGBkeoA2Ad5YwPUMvq4ABijeiS2aMxyQ== 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=oM4lrwe5vH+VGVaBavbOej153WZWP+rvbLO77HKBN0g=; b=qhewFFArqWXkL164WljuUUw87fFJmy0vjrMo2UORun0pWsV4h4zR0YbbcofeEtTI91M58z6nvR80aeUPUGmBzfOH/myX85qb0VlIKIokCTasOtXGPEYrBF2emieHSMoDh7MMGuIbs/FKlPY2H22u5OURh/ZWx30y5FpwOJhAtaE= 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:36 +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:36 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v5 20/25] net/nfp: support DST IPv6 flow action Date: Thu, 20 Oct 2022 10:19:46 +0800 Message-Id: <1666232391-29152-21-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: 5c02b798-f20e-4f56-cfb1-08dab241cfd7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xz4fCd14ReN+JTW4FzpFAWupLGMR2Uw4kPn83CrnKpM/OmHaEEXTddDcnkTUOJZfSndzQ70h8NtI/DgsLlsJ0ZYCblSTMJSlAGWAkEAFEC0AQwU1xfhphzQCB57dnh/rQQTnxJLMU8j6v8YuGO1m3yhMSSceEUYy61TcqrFvCZbLXUCSJPXYvN9gS7HDjHFZFo0mIrvZGBZPIvzidMtMyesvs4QLTD7WrXb4/HMhySYv34rrD5ULUO6ermfe9sk9BQaYusd3iwMf2SC3uQkOhgABf9kXVcsbT+QmMnqrXHVPOuwilC06EjytUnRi2WERIfwgZK62VPCKe9aNnp3qwxQvOx8cZJurUxXrqdJ3Italqrdzo1T7lodOMVWUSa7Ev5PzmLQCeKFqz/9XDo3cHUWw4yRl2V2lA78RoUNXcgArG2xOH2Xphc2y6JtMe9beJggYpzkO2707G2Bu8/iaHX9Vhrebqe4mbOQqjxQA1U3xfNo0AF5WHyLlUfGUJW3ZBYIIvusVa72HN11ZJKbXyFGhOfGfPtzcIUbvpx9PLSa1k0Wb5x465OF5Ru7EnwjB6Vpxmt+en3LL1HgcM5lsbQfBZr3ntFhGIEJj4+3XgrBzDEeMi0mzecKfq/y43LIiDfTuY7DT2Hs630rwuQrc1CHcKZFbuSzGKRH6Q31mIO4j9hpoVXt5d4+RbgMCfOunRme1YjxVVuG2tPlQsIuXa8obV2J/fpPO/OBlxePDZqxUVMtyR05QYdjNIBZ45QM9+FG1ok58lASn+iw5BFTS+Q== 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)(6666004)(107886003)(83380400001)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?THJEQ0NzM25jY0llUFJNMEVUc2xkd1Y2QW03T1dlZVVVSkhSYjNkNnBJUXI5?= =?utf-8?B?QS9VN0cvTnE4bEpqKzkrNGVwMkVnazJxdFcvd2QvRXZFdTUzWUtkSXVEOVpZ?= =?utf-8?B?ZWJ5YVJDUzFzVXFTMlNCbVdJVDc2VzNKOTZraGdpQmxLeHhDYXJnWTh5ck9s?= =?utf-8?B?czhncHgySmdhK1crRGJjSFZwUWFhL1lLUWhJSmRSY0xENHFQK2hjM29mR1hM?= =?utf-8?B?VzRNMTBPdzdudkorOHZqMTd3Uk14SG14RlNZMnZjSWM0Vklob3Y1Vm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VQ3ZkZIQ3FOR2dFRElWUHFnZ0ZKZ2Y5OFR4anlBYmUzM1RJ?= =?utf-8?B?U0cvZWZKeUpxbW15WTBmOWJNVTAxZUxlaGRBRmJUQlZrU1FtTkVOVkZjaGVo?= =?utf-8?B?RlE9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c02b798-f20e-4f56-cfb1-08dab241cfd7 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:35.9272 (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: 3zpABHbUifrKtqRBuceBGtr3Jg7i21utRy1X6mI4s9eIqskUrP4y4omcH48IljitTBq9ivfbxCHzfZehwhz6BZ5xIcYk5M/orhYLPfgfOAk= 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 dest IPv6 address action. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- doc/guides/nics/features/nfp.ini | 1 + drivers/net/nfp/nfp_flow.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini index b17c701..5fcece7 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -46,6 +46,7 @@ of_set_vlan_vid = Y port_id = Y set_ipv4_dst = Y set_ipv4_src = Y +set_ipv6_dst = Y set_ipv6_src = Y set_mac_dst = Y set_mac_src = Y diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 21a7168..29e7b99 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -641,6 +641,10 @@ struct nfp_mask_id_entry { PMD_DRV_LOG(DEBUG, "RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC detected"); key_ls->act_size += sizeof(struct nfp_fl_act_set_ipv6_addr); break; + case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: + PMD_DRV_LOG(DEBUG, "RTE_FLOW_ACTION_TYPE_SET_IPV6_DST detected"); + key_ls->act_size += sizeof(struct nfp_fl_act_set_ipv6_addr); + break; default: PMD_DRV_LOG(ERR, "Action type %d not supported.", action->type); return -ENOTSUP; @@ -1497,6 +1501,11 @@ struct nfp_mask_id_entry { nfp_flow_action_set_ipv6(position, action, true); position += sizeof(struct nfp_fl_act_set_ipv6_addr); break; + case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_IPV6_DST"); + nfp_flow_action_set_ipv6(position, action, false); + position += sizeof(struct nfp_fl_act_set_ipv6_addr); + break; default: PMD_DRV_LOG(ERR, "Unsupported action type: %d", action->type); return -ENOTSUP; -- 1.8.3.1