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 7A6CDA0C43; Thu, 23 Sep 2021 10:44:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1719B41225; Thu, 23 Sep 2021 10:44:53 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2073.outbound.protection.outlook.com [40.107.236.73]) by mails.dpdk.org (Postfix) with ESMTP id 8F4EE410DD; Thu, 23 Sep 2021 10:44:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZBSohOVosH0dhEsQlNOBRZcegTYpF189dBXU/Yb8phRsGNbQV8tgTkjGrJprm2AMU+XPdEPfi3xZdALuP0ciYCMye5ohOnDD2Kt2vLjlBMHwxz1RvzAeE003DMUvmFItGqk+A71YsE7WrbbBf3YJVTtBDlZGxCIXyJXZEZa2nwWOSs+ZzfmA+RpFKfkWuVHZnhBMJE1XPdsxaQAtE8qPb2AddkxyGKOugF9x/JJLakKN5K8OSSkhWmv2ZXWWUYfocEordNtfypveKGVRRcHTh7G6FZYq+8wq/ROjpO6oh1oVzK+5XC/mi9het/QFkCq5Ohfl3uMdQtrhLWQJMqw5Dw== 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; bh=xO2gb/kU9apAkfXwnDFsodKIdx5rsv7wc95vFkvu4J8=; b=RzEMR/xff1SRiRxERCZsrT6Zg60y7g6Pb0Eh7iXKKkXL5X4yW6IRgGtR7MJeBoXDDtHzFqbJKg8RWaA4EznmsbvGCv2O2uYnmc2StM0ngI7Erd+6Jetp68M0BGvN1ycxNGb3fJ6ac1DOtEogS44r8ppCXZky0+XmPtlR7lSVVAkgMHJOkXPosw5JLZ4SZwEcCmn5WZoKGycwB/HbHYdH3yHnHumCE7Kb7lRvyqf1cjBXtShEy8lMfK0F81AJ2FNfGSjrDNIzsf1gaX/kQHlKaCCgA8hn5+5VBBeKfXWftaU2L8fmQJyo0BuyGb9BnQpfCqZyqu1lY9kNF4DvCTUhEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.36) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xO2gb/kU9apAkfXwnDFsodKIdx5rsv7wc95vFkvu4J8=; b=SEj2mas2q7aXQHQxT9NWDJMztqumeWJVkNkhYwliQtWVGrI8vqW7GUXj4Ybx6w/jD7fK2XT8lKi2GUk4/eagShFeL9/f9dDGTSEYqUX3nO1pAS9EF6ew+mUJ58bfQjNbWoHxq1OUgQwv1wGfyQSLYuf/djSo6B+fJgNJ8lmM2ef79e/iQDIoBI6+uwjgDCFJqJkz+WI/7gZrtf4mbq72aqnA5FGh+pchpfu9lGplB955tpZI8EQ8OnoVnFEowqOYm3/ThsONini+XqMSr4s66ToENcpJQcv6ISzmGlJ7dbvEqJZD35/aNi3UqtNI6K5USTnV4YZ7BZZdbQ0CCJGf9w== Received: from BN8PR12CA0035.namprd12.prod.outlook.com (2603:10b6:408:60::48) by BN8PR12MB3396.namprd12.prod.outlook.com (2603:10b6:408:45::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Thu, 23 Sep 2021 08:44:49 +0000 Received: from BN8NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:408:60:cafe::7c) by BN8PR12CA0035.outlook.office365.com (2603:10b6:408:60::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 08:44:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.36) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.36 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.36; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.36) by BN8NAM11FT026.mail.protection.outlook.com (10.13.177.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 08:44:49 +0000 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 23 Sep 2021 08:44:47 +0000 Received: from nvidia.com (172.20.187.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 23 Sep 2021 08:44:44 +0000 From: Eli Britstein To: CC: Ferruh Yigit , , Matan Azrad , Shahaf Shuler , Slava Ovsiienko , Gregory Etelson , "Eli Britstein" , Date: Thu, 23 Sep 2021 11:43:00 +0300 Message-ID: <20210923084301.5139-1-elibr@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To DRHQMAIL107.nvidia.com (10.27.9.16) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 65828643-189f-475d-fd35-08d97e6e6731 X-MS-TrafficTypeDiagnostic: BN8PR12MB3396: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bW6XI7BSPIoIfvGGVljlhByOS/Uqt0r0o8WXe4+2e/dIIff9BhHim0cFtcGoulw7t2Y+lQg3zOMv+el31WQQjW4b7b19uAdo3YEIUTmRZcX9EBWa32JOVqQ6piFAvpqqBGsCzXUtx2KoKGiXOfUqclsX9X6oeq6pjkr6MGNh3o6YUO1+tO1L/0DKF8lDjx6Q8QSd+5Fg9cnW+XYE0Q46pjN+DvkRDUzZ3pqeLEj7Bakk6WyJxpqKqSexDY1ucsV/K0Jso/diMtnYYHZIA9CeZW/nZw+XTPScrUVE8KHTc017qwi3ZRfZWLEbap+VYxx9911G98Zw9594csSW4sAP5Q7nfbIV916dkj8Pvu84Lf2O3jYOYwguCnBYXpV0tKF1I60PWIaIfb7zF8s/4ZwZIHX6VzMd/9p9aPaUuvtZ0F8DZTP6z4MBHcC/IcWQ/HuEOLXTIY30FP54EH9F1k2wsktyYjRANGjgUwSQlXEUO6Wd2tyvXBxEDrcgun6Uw85X3anJkpiN2NI4OFYc3EfVBV2RQqS7bgWbcjgHwAfgqHHs6zdjQdnSuFeLHVMCEkt44i6xpmI27zD1rN5L34eeydXr+Rf5T6XdPb6JJhoYdnQcR0HCKziXVKdEO1y4xJ1R3xJxvDEPSgVNlzSMYiW+5oUUZ7FRWhH+BJbStCZwipQPA9c8xKm0O/VsdyGHMvwOLOtDQFhXVRuPlIjepmnmXw== X-Forefront-Antispam-Report: CIP:216.228.112.36; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid05.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(36906005)(508600001)(54906003)(36860700001)(5660300002)(82310400003)(26005)(316002)(55016002)(4326008)(2616005)(6916009)(8936002)(8676002)(36756003)(47076005)(6666004)(356005)(70206006)(70586007)(426003)(336012)(2906002)(86362001)(186003)(16526019)(1076003)(7696005)(7636003)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 08:44:49.0808 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65828643-189f-475d-fd35-08d97e6e6731 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.36]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3396 Subject: [dpdk-dev] [PATCH V2 1/2] app/testpmd: add tunnel types 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 Sender: "dev" Current testpmd implementation supports VXLAN only for tunnel offload. Add GRE, NVGRE and GENEVE for tunnel offload flow matches. For example: testpmd> flow tunnel create 0 type vxlan port 0: flow tunnel #1 type vxlan testpmd> flow tunnel create 0 type nvgre port 0: flow tunnel #2 type nvgre testpmd> flow tunnel create 0 type gre port 0: flow tunnel #3 type gre testpmd> flow tunnel create 0 type geneve port 0: flow tunnel #4 type geneve Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload") Cc: stable@dpdk.org Signed-off-by: Eli Britstein --- app/test-pmd/config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index f5765b34f7..2bb9fc6784 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1210,6 +1210,15 @@ port_flow_tunnel_type(struct rte_flow_tunnel *tunnel) case RTE_FLOW_ITEM_TYPE_VXLAN: type = "vxlan"; break; + case RTE_FLOW_ITEM_TYPE_GRE: + type = "gre"; + break; + case RTE_FLOW_ITEM_TYPE_NVGRE: + type = "nvgre"; + break; + case RTE_FLOW_ITEM_TYPE_GENEVE: + type = "geneve"; + break; } return type; @@ -1270,6 +1279,12 @@ void port_flow_tunnel_create(portid_t port_id, const struct tunnel_ops *ops) if (!strcmp(ops->type, "vxlan")) type = RTE_FLOW_ITEM_TYPE_VXLAN; + else if (!strcmp(ops->type, "gre")) + type = RTE_FLOW_ITEM_TYPE_GRE; + else if (!strcmp(ops->type, "nvgre")) + type = RTE_FLOW_ITEM_TYPE_NVGRE; + else if (!strcmp(ops->type, "geneve")) + type = RTE_FLOW_ITEM_TYPE_GENEVE; else { fprintf(stderr, "cannot offload \"%s\" tunnel type\n", ops->type); -- 2.28.0.2311.g225365fb51