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 EED43A0032; Sat, 22 Oct 2022 10:27:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEBB342BB4; Sat, 22 Oct 2022 10:25:39 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2138.outbound.protection.outlook.com [40.107.223.138]) by mails.dpdk.org (Postfix) with ESMTP id D997E42BB7 for ; Sat, 22 Oct 2022 10:25:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DlOsom44xmW/YqZwBb47lypUEONrOpxE7Kt8n2LQifjPHQJakqwT2upm4a0rXpz1XkHR57lB0nM2RgKuCeS7GQgvOwLZjAuTAEyacISh/n0jp4mHXb0FZC//6J7zAIpYIbpTSSbVIwj5N/TulxAHPRrLwLkLO/z5UT4I2zFph2Y6i2U99Iy/JIe8peZmeXTcNde7j7z/uzqch+yQe5Vn+Nx4vyPGZhEA5fnTtPWMol1CxzUAaTCgLcsDKEb+zmSKkmJuU4GtdjLVyGAmzQNoywTKTtdYcdWvobX9VSSp+/Nncn9HFwFRfMG+CwjuxoiartKYMs1yuqyOOQphuOso5w== 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=8xwzoQu2xoK/HMe1RMuGKafDtzGFC1SAFSTFZQj/A7w=; b=Od0HSjpWVrNDhhnO3BpXsQxJXnmJwIyCxZXVD6evCMTRL+HCHLGZ/FpmYJ0sxHkxVlhZ3bbqxp+GJBmZEgmLkFQIrHpiXbsXmSzbxpGd2LGSWTfT+uHjLeF+ORy49ijqllN3iOJw8DOq6xrRFJFNnbJ79nhPB2SvXyxe098nQ+DIH9nO6Wac9t6ZgtUidKCexul6uLBiEZSSirS+uxkk6GBEog67E1JCyPUgRq45v/5ohZJ9ZdVWni6NXZZYoHiYigghoeiSD99nkw8iEQB++4x0uucD4G/7Qy2hLMB8B1YsY7g3Ztc4AXna0bmk0eLr4p+ETL8g11g1zaG7hWVjeg== 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=8xwzoQu2xoK/HMe1RMuGKafDtzGFC1SAFSTFZQj/A7w=; b=tVsR+UxRU9zyvTH4et7JtnQbxT0WIS4wC9j7oNntdZB6sS4d4HetyqXHwQi/p4cdgRM/s3cdPCn78WZZwz86+myqyGUuYkNP+uxxDba8luLZ0iAlXPCkqQ9iZXjC/2+mrXsY+DSwVEqxQmQPzIjftf+RdjOtqFiwA5mGquJFLJQ= 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 PH7PR13MB5454.namprd13.prod.outlook.com (2603:10b6:510:130::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.8; Sat, 22 Oct 2022 08:25:30 +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; Sat, 22 Oct 2022 08:25:30 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v2 20/25] net/nfp: prepare for IPv6 GRE tunnel decap flow action Date: Sat, 22 Oct 2022 16:24:24 +0800 Message-Id: <1666427069-10553-21-git-send-email-chaoyong.he@corigine.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1666427069-10553-1-git-send-email-chaoyong.he@corigine.com> References: <1666063359-34283-1-git-send-email-chaoyong.he@corigine.com> <1666427069-10553-1-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0056.apcprd02.prod.outlook.com (2603:1096:4:54::20) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5454:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d37ab3a-61e4-47a5-9b45-08dab406fb20 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VH/gydqhSwEEQdw2qYfoO8MkorHFnlDNOc7HQlAz8+lMOWDlyWtDJaotnhR8mwYC3QEE8IiOIa4Fo2WTz3I49gSaSp3o9ZpslSFSP5kGokvph1GrktU0Be69lQrQfTKFu+LHZ8D9/38nGlL2crtq1/2Ybmh67+LlsgSgxa2QlEEZn1wiTa2oRUqpT2UFJRrZj46oc1WF/xfr4R/PUe0d3u4AsiqtY/EEA1PJhYqUKFRf2PnWUuIAKtqweGa+CQciOoT5sUzIcGLjVA/zzmMr4EGpSzuX8g0x0Xde9w/A8UXCmSqYztz8HLDUoRkXksuw4f9+srSIKXEuyP0lN9bbEIt0woL/YIHcJrGY0EjOT4V8oikv1JnPXX+U+HFxliYFWLCYm0UunIv+oae3MNadYcytDQG27JC0+86Tl8YKYvcj/MlTYJr+PxQ003L+mhIrLlQdCfp+LNHmxxMSgmi010xalS65CtRRgyVf/hvv9ifLmUv4UZBW1b5tfsfUhn11yjjTczK8Nw0/aDiw/NirZtPkEUbNMBxa1Tnvt4ehu6Lt7HSCL42lkkqIAfl2XG1IBg+1WEORKNRIgptBbNCsG8ZebUntTRdzKE9pufK0EmZUS69V6PLgUf/ZouXN2bOjv02BF6AX9c5Q1gXsehKhI3f87qMrDKbE41ACjjMoWvoZDtoQLqHlYF9RMLey1ybNe474SeVV5H7IPtDoNS/ejoH6x5StHwHgHTsRWDDgCrXtZx/eFW12Xm1uMm1T6FTSrPSScIidgpsKjyTLVLzroR1qLHWlyUbIiUB4rx3FhUbwEx3CRVik090SlkabLWXL 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)(346002)(366004)(396003)(376002)(39840400004)(136003)(451199015)(186003)(6916009)(316002)(83380400001)(2616005)(38350700002)(86362001)(44832011)(38100700002)(66556008)(5660300002)(41300700001)(107886003)(478600001)(6506007)(6486002)(6666004)(8676002)(26005)(6512007)(8936002)(4326008)(2906002)(52116002)(66946007)(66476007)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M2NtZzFsSTQwZkpDaUpGS3ZpR2NtWmR6MnVJNENiTHZSOVBmSnE4RUZjTkNt?= =?utf-8?B?ZVo0V2I0Vld1bElkemF4MXJ3TGk0MnQ4Yk84WElKeERZbmJITDhLSmQ1R2gw?= =?utf-8?B?R1ZGNG1oSGp6dmtxTElObmxyWjZBR0x3aFBRbE9KVHUzbWFXcW1lZUM3WXF2?= =?utf-8?B?UzBTUXQ5SXFIMTZ5Wm93NXpaVHc2SEE5eXZUUEg0S1dUdDNxb3VxYjZ2S0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XbVNxeDE5aUIyc0dtNHJ5WS9v?= =?utf-8?B?NWt5RDhPWW1nK1c4Y3hncG82Y1pvVVZodTYvT2llUTRzM2dHcjM3akZSN05B?= =?utf-8?B?bVQyaVlSVlZvM3l3Sy85WlRRSFJ4aWdLamkxS3BKNjZGSGQwdHZQOWNhQW1v?= =?utf-8?B?Snc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d37ab3a-61e4-47a5-9b45-08dab406fb20 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 08:25:30.7523 (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: H3utF3s0q8PhnL0O7J1Yp+DmgA1Zz7p211+mvDTcr6n48/FDPwwfQ/Ip1R8JnzZcFFiXAi0qndVLk06o8goYr7P7T5OoaMW3rLHC4YCY3yw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5454 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 related data structure and logics, prepare for the decap action of IPv6 GRE tunnel. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower_cmsg.h | 41 ++++++++++++++++++++++++++ drivers/net/nfp/nfp_flow.c | 49 ++++++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 12 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h index 8bca7c2..a48da67 100644 --- a/drivers/net/nfp/flower/nfp_flower_cmsg.h +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.h @@ -604,6 +604,47 @@ struct nfp_flower_ipv4_gre_tun { rte_be32_t reserved2; }; +/* + * Flow Frame GRE TUNNEL V6 --> Tunnel details (12W/48B) + * ----------------------------------------------------------------- + * 3 2 1 + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_src, 31 - 0 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_src, 63 - 32 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_src, 95 - 64 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_src, 127 - 96 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_dst, 31 - 0 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_dst, 63 - 32 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_dst, 95 - 64 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ipv6_addr_dst, 127 - 96 | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | tun_flags | tos | ttl | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Reserved | Ethertype | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Reserved | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +struct nfp_flower_ipv6_gre_tun { + struct nfp_flower_tun_ipv6 ipv6; + rte_be16_t tun_flags; + struct nfp_flower_tun_ip_ext ip_ext; + rte_be16_t reserved1; + rte_be16_t ethertype; + rte_be32_t tun_key; + rte_be32_t reserved2; +}; + struct nfp_fl_act_head { uint8_t jump_id; uint8_t len_lw; diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 01c6e9a..26d3854 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -565,6 +565,7 @@ struct nfp_pre_tun_entry { struct nfp_flower_ipv4_udp_tun *udp4; struct nfp_flower_ipv6_udp_tun *udp6; struct nfp_flower_ipv4_gre_tun *gre4; + struct nfp_flower_ipv6_gre_tun *gre6; struct nfp_flower_meta_tci *meta_tci; struct nfp_flower_ext_meta *ext_meta = NULL; @@ -576,9 +577,15 @@ struct nfp_pre_tun_entry { key_layer2 = rte_be_to_cpu_32(ext_meta->nfp_flow_key_layer2); if (key_layer2 & NFP_FLOWER_LAYER2_TUN_IPV6) { - udp6 = (struct nfp_flower_ipv6_udp_tun *)(nfp_flow->payload.mask_data - - sizeof(struct nfp_flower_ipv6_udp_tun)); - ret = nfp_tun_del_ipv6_off(repr->app_fw_flower, udp6->ipv6.ipv6_dst); + if (key_layer2 & NFP_FLOWER_LAYER2_GRE) { + gre6 = (struct nfp_flower_ipv6_gre_tun *)(nfp_flow->payload.mask_data - + sizeof(struct nfp_flower_ipv6_gre_tun)); + ret = nfp_tun_del_ipv6_off(repr->app_fw_flower, gre6->ipv6.ipv6_dst); + } else { + udp6 = (struct nfp_flower_ipv6_udp_tun *)(nfp_flow->payload.mask_data - + sizeof(struct nfp_flower_ipv6_udp_tun)); + ret = nfp_tun_del_ipv6_off(repr->app_fw_flower, udp6->ipv6.ipv6_dst); + } } else { if (key_layer2 & NFP_FLOWER_LAYER2_GRE) { gre4 = (struct nfp_flower_ipv4_gre_tun *)(nfp_flow->payload.mask_data - @@ -1186,11 +1193,15 @@ struct nfp_pre_tun_entry { struct nfp_flower_meta_tci *meta_tci; const struct rte_flow_item_ipv6 *spec; const struct rte_flow_item_ipv6 *mask; + struct nfp_flower_ext_meta *ext_meta = NULL; struct nfp_flower_ipv6_udp_tun *ipv6_udp_tun; + struct nfp_flower_ipv6_gre_tun *ipv6_gre_tun; spec = item->spec; mask = item->mask ? item->mask : proc->mask_default; meta_tci = (struct nfp_flower_meta_tci *)nfp_flow->payload.unmasked_data; + if (meta_tci->nfp_flow_key_layer & NFP_FLOWER_LAYER_EXT_META) + ext_meta = (struct nfp_flower_ext_meta *)(meta_tci + 1); if (is_outer_layer && nfp_flow_is_tunnel(nfp_flow)) { if (spec == NULL) { @@ -1199,15 +1210,29 @@ struct nfp_pre_tun_entry { } hdr = is_mask ? &mask->hdr : &spec->hdr; - ipv6_udp_tun = (struct nfp_flower_ipv6_udp_tun *)*mbuf_off; - - ipv6_udp_tun->ip_ext.tos = (hdr->vtc_flow & - RTE_IPV6_HDR_TC_MASK) >> RTE_IPV6_HDR_TC_SHIFT; - ipv6_udp_tun->ip_ext.ttl = hdr->hop_limits; - memcpy(ipv6_udp_tun->ipv6.ipv6_src, hdr->src_addr, - sizeof(ipv6_udp_tun->ipv6.ipv6_src)); - memcpy(ipv6_udp_tun->ipv6.ipv6_dst, hdr->dst_addr, - sizeof(ipv6_udp_tun->ipv6.ipv6_dst)); + + if (ext_meta && (rte_be_to_cpu_32(ext_meta->nfp_flow_key_layer2) & + NFP_FLOWER_LAYER2_GRE)) { + ipv6_gre_tun = (struct nfp_flower_ipv6_gre_tun *)*mbuf_off; + + ipv6_gre_tun->ip_ext.tos = (hdr->vtc_flow & + RTE_IPV6_HDR_TC_MASK) >> RTE_IPV6_HDR_TC_SHIFT; + ipv6_gre_tun->ip_ext.ttl = hdr->hop_limits; + memcpy(ipv6_gre_tun->ipv6.ipv6_src, hdr->src_addr, + sizeof(ipv6_gre_tun->ipv6.ipv6_src)); + memcpy(ipv6_gre_tun->ipv6.ipv6_dst, hdr->dst_addr, + sizeof(ipv6_gre_tun->ipv6.ipv6_dst)); + } else { + ipv6_udp_tun = (struct nfp_flower_ipv6_udp_tun *)*mbuf_off; + + ipv6_udp_tun->ip_ext.tos = (hdr->vtc_flow & + RTE_IPV6_HDR_TC_MASK) >> RTE_IPV6_HDR_TC_SHIFT; + ipv6_udp_tun->ip_ext.ttl = hdr->hop_limits; + memcpy(ipv6_udp_tun->ipv6.ipv6_src, hdr->src_addr, + sizeof(ipv6_udp_tun->ipv6.ipv6_src)); + memcpy(ipv6_udp_tun->ipv6.ipv6_dst, hdr->dst_addr, + sizeof(ipv6_udp_tun->ipv6.ipv6_dst)); + } } else { if (spec == NULL) { PMD_DRV_LOG(DEBUG, "nfp flow merge ipv6: no item->spec!"); -- 1.8.3.1