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 0DC1EA0560; Tue, 18 Oct 2022 13:30:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2420C42BA3; Tue, 18 Oct 2022 13:28:23 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2118.outbound.protection.outlook.com [40.107.93.118]) by mails.dpdk.org (Postfix) with ESMTP id AF8C2410F2 for ; Tue, 18 Oct 2022 13:28:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tfa2lmZcBj1RKzXbKiylOvEWiG3Sn3PmaReS8LkGYAk805PMA0wSsZodF/Ke5rvOUs3Zfgbz8It1JuJ812oW8guPPCDVsxAyBUNlogqmiNBdPSaR7ZgcXec2+OYmp6HYIynzU7BIGFBEn9p8Lg0T+h7Hu3OoENtVtE+E5nq/O+0uVmpB403+amzvowRZqgRdCA7Jz6hoHQU38Vz/zGd72o9c/1KqODGFXItiJ2Aw3BCpG9dAxl6B+DYtQiTRPt+bVdV3cNfPfLo4S5dZZ4EBPkM+yCdT+fH6A8XOyCLuIc8w0dV20nmU53909hFYBZo1LgxocJAn3kkormScnGn7uA== 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=e1//5V1S4xghvLkzfKcDI5sZcF8jrgv63g1tOABdIEk=; b=NVU7ahujvwH1z0J+U8lFxFL+rMHqX0X/kf5ZDMU0tU82SkZm7qKtmuCp8u7pshn2KtKQvBuj17tN7kwFa+Woc5T2ib2hsWXYxmgBoFzrm74F02JOJeXyoqzdu/wpzZZT2ndfoxRzG34/KE9Fh6/+LpFDOIL0u1DkT7JiZx0CRDHtbH9OFk7EaqUUNaUyLXsYtV5x63VK0ondPOGKUtVBOpEAoyaAvmJ4DYPqvCivFK68VUbAK5zsDwNeWHMafOf2v7XQv4nT+H+G+a1CZmQM9W/5xoYSX8dctNe5MXmNXzZoWfaK7uXwVBbP80jYAdRyEU5THGOfUrfFsewOTf5tpg== 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=e1//5V1S4xghvLkzfKcDI5sZcF8jrgv63g1tOABdIEk=; b=fqWphWiwqa734gt7CXaV13Ih1RcPU4qhDYjzeSBVgv3tdxPczx2BqvIhDPOyptRJVH3dCea6+q+/TBW15MUrMAkwF1clM7opcN4gm047CoIU56np6IY8zGntZl+r1zeHRlJlOWbrOsahzemuEkXfRuVxw5DwnrWr5SOyIM+PeBg= 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:17 +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:17 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v4 20/25] net/nfp: support DST IPv6 flow action Date: Tue, 18 Oct 2022 19:27:09 +0800 Message-Id: <1666092434-10357-21-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: 8d208a1d-e779-4f63-afa3-08dab0fbda2e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PsfXVHiBt4yFUeAJ6CbtehrUEJjGScMbyTRBblhzie5kns1nfBAwXQ9chTozuETqZIJl+SpXsTkKn9ae+Eyg9bToXrhwamBSDreRLVAG+ekm/fdYI71hWJprqbVv+tGZ6O1o7Sm1o0HCCnBm0S/H4EUBxqAT8N1MEcisef4P4XYPhqnInDbTx1ioJClzBswYeawOshwRErxNbXGWxcM4nWtfYNIh/TzsZ42189+1BFvJP8mbxJglqSEzVlndigk/+snRk9IbplCyRWJuZLUnD3J+VaR3HxT2l4tQTHwtmlMam2DxQhOhaGiaNtzt4se2h2YBN/FwAvuWhBXovUayUyHCsP+s8GIHD0315Xe0rtqr3pITYaK0T19MDKLKMMtm6QbEonfvXHHZ7O9xdWwFIH5A3h3m6/N76fyzROQo/pinmYNc1qBW5wdUlOHE4pbWZCnniXYQx3nvMKPpZUHENbrtnkIo/755bvCAVQ5VKU447jgHDrQFXCSHE18YW32tz7f1UCA1hAZFWpYBSWwgKRF/HJFJs7REy6AZQ0NL+CDwZZAgkg7UjGjOpL7SdA90AVgx0G7W0yrlCRYwFfvrtK6wfi39zIm54Jyw7zxPpRZrhS6lnxChsEXe4SEtLKoeB0BNI84RvHVIKAh6IUB0Hx9QwlIwbgtX1qnw/X+1JNrUcOyEbjCSgZMOOBaPGfCW9yQ4bcm70f1QAzmaONPl/pChYvGPS5ragQZBJ3Nt5D1JIpbwXqTEHmOFAmhjQ0HRJwU+9CUTHJvQ6DSonMov9+HzLmWftsJeMmRO6BBbaW1R5ATykmzD+FffhbpPsshM 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?VFo4V3JDejFyR1NZeEVKdFNiNUFZdHpjS09KZHZ4Zm9UMVFBSXRBbXBvWFdq?= =?utf-8?B?aWpnN3kzNWRQRFB2b1RCYURuNTd6TXM1VHFKVVI0NU1EMXErZklleVpFQWV1?= =?utf-8?B?aTNPaEY0QW5UMVU0dFluY3JYNERUUjdKR3dtSVFBa25HQWRnYmtJV3ZNRm9R?= =?utf-8?B?ekQxd0dLUmhZSEl0NWxnQm55YVhwUmh3QXF4UDMzcnFUVFZOZ1BxY1A4Z2FG?= =?utf-8?B?cW1wMjV3TnZ2NEpFdHQ2R3IvMmRZLys3WCtjMXA3cGZ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B?U3V1SXBmVTExdDYrQkhpLzBrMzNDK2UvUHBuUWZoc0ZFMWRhUGhKcHFhQ0hG?= =?utf-8?B?MW1jL2IwYVdjWExOYU5xUmlSL3BGS0I0OGh5cUovZk5PT0dkb1QzMFFXOEpQ?= =?utf-8?B?UWc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d208a1d-e779-4f63-afa3-08dab0fbda2e 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:17.2774 (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: I2/1HxiF2rUsvX4vRHRbafprLOoFxku3zYVTafAHqSadQ6luDsWvFCJmIe0QXHv4doourkYFq0PnN2jyqJvZPXCof2LpAt0hkr4+E55Qo88= 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 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 d841782..67c3ebe 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -47,6 +47,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 839f559..2cf82ce 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -653,6 +653,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; @@ -1509,6 +1513,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