From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F9F1A052B; Wed, 29 Jul 2020 10:29:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B94D1C030; Wed, 29 Jul 2020 10:29:27 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30070.outbound.protection.outlook.com [40.107.3.70]) by dpdk.org (Postfix) with ESMTP id B607F1BFFA for ; Wed, 29 Jul 2020 10:29:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=On2XfWznsLTyKrdgCVTJC420grHXtBWkXk1EhaE7xM1d6Ehy4Uudhkpf/xbZf1zqIk5lS+LTMB2fuiPGitlYbByMmJBhPQXfA7mCOageGJjgiBSFCuzPpE4ENGU+/a/srYElWMe/4NJ3/wn0w9l6rCsR+JtElm4c2P9sTEUxkwuH/ptSBvvaVUXikUdAte1vtc0Kjqy72u6PgBgmovRv2Whpl792G3aVixMuwh2HrQdnlscrVFEEf19Li++9QvxC5oV2+NadaV/Jvh3TOPU5jexFi2p7UlN722CB1boDKAVyFXWIyg3K4npzRcAgM7dp3JMgjU7oWZrq1Rxtf/c8tA== 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-SenderADCheck; bh=gNSXYJ5v+uvTY0JBP0RYiHyu5zq5YZXU14TyBsXjtyE=; b=bm59sutFfZ0wWjD5Ewp+o83gMehZOopQelXnpF66Z5HYQYAAhE0UDfnln+9bWodQFy/JEegp6YToUCJbOoVlz8iGUJUNwLNLe2Mszt7uC1Ckzj57JRIFB6MwtsbJzSVuQqzaDmd5cf2mETipOzDQ4AS77fqZJ3gPZ3+huNAK8j/RTlIlw6d4s16ZdnFrqjtOrp44HKUNM7bqEW3iIHNFM5PJ4Y1wnrsbhhgdt3lC37wRUTNjQG7R3wHhIZwJaorFMorLxQs1lyWiFYcKETpFitdfYqhGIv83ndsDtuXZR4eOei063nGFoYjn9ZhrxfMTfM5m4Eu0WGnQpImhlGP4DQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gNSXYJ5v+uvTY0JBP0RYiHyu5zq5YZXU14TyBsXjtyE=; b=imKQ3n1DTTfsXhtzox7IGRCG0DnvMHmDNzCf7akOXbSKLv58w7DNLhU1aVH3wPCDyzVM6CwOhhlsiP8bCSF0eLTltUOnBiPDT1iZYH2EC5iNdjxpu8UN+eezxyf+pmr6vrqf7hktVTiuhXlvZUtVJEsHlrFnxTWy+66IWS++2ow= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4209.eurprd05.prod.outlook.com (2603:10a6:208:61::22) by AM4PR05MB3204.eurprd05.prod.outlook.com (2603:10a6:205:3::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Wed, 29 Jul 2020 08:29:23 +0000 Received: from AM0PR05MB4209.eurprd05.prod.outlook.com ([fe80::3949:70c3:126:3972]) by AM0PR05MB4209.eurprd05.prod.outlook.com ([fe80::3949:70c3:126:3972%7]) with mapi id 15.20.3216.034; Wed, 29 Jul 2020 08:29:22 +0000 From: Ophir Munk To: dev@dpdk.org, Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Thomas Monjalon Cc: Ophir Munk Date: Wed, 29 Jul 2020 08:29:04 +0000 Message-Id: <20200729082905.19499-3-ophirmu@mellanox.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200729082905.19499-1-ophirmu@mellanox.com> References: <20200729082905.19499-1-ophirmu@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: AM0PR05CA0079.eurprd05.prod.outlook.com (2603:10a6:208:136::19) To AM0PR05MB4209.eurprd05.prod.outlook.com (2603:10a6:208:61::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (37.142.13.130) by AM0PR05CA0079.eurprd05.prod.outlook.com (2603:10a6:208:136::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Wed, 29 Jul 2020 08:29:21 +0000 X-Mailer: git-send-email 2.8.4 X-Originating-IP: [37.142.13.130] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7716fd25-0eea-4f03-d958-08d833997eea X-MS-TrafficTypeDiagnostic: AM4PR05MB3204: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:639; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C47/U3Akyr4SyO5gLpQvz+a/u0VkdsTy+b+4v7kWwg8B3cYCvbULAUFgbkW3vbyDlNf2+wF7aBLPZEj1AFdkOXHDBBnA2HMPLqLBdUmPXEcLBZlVs6JvAUVR4jP8eJYW4TBVOnBlOkYDEh05hZNtrexGgKZLMirPMQRJ4quWpKNrPlDFGg0CXKAcSHSQM88ADkiYGZZydosnV/IFaHndI7N1TQBauFX9RhZMKlk/38K9DOB9bpFGsKl9r2INJH7U75/idYrgY1mjlXIpXC6pgCT9GkN1G07/Icu3e9Kye8B4o2EUQJDlJps8cdX+sBFBYj1gyc/0eNAxejFBAtAaSw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4209.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(346002)(136003)(376002)(39860400002)(396003)(66946007)(66556008)(66476007)(16526019)(478600001)(186003)(2906002)(1076003)(26005)(8676002)(8936002)(5660300002)(2616005)(956004)(83380400001)(316002)(110136005)(4326008)(36756003)(6666004)(8886007)(55016002)(107886003)(52116002)(7696005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 0E7MVf1OTjTFkmeEZpK8KPZzpsUZB+kuga66qBpGs644TV96Rx5fc5exiAufPaDn8rhrZhz5xlHV/wqlzMm9H1m2B3mtdr9wXu9oKxZllPsc3I+SpX00s/KZKboyIEhAUDJu+dHVhCU6NB6vZU/M/Uy1Sp6bBdhPPlPm4RM9QfROlDTEqYc3GEn14WGcYYsfrd+s2Hod9iBmstJwQCG6dLQK477OLF6jJysejzxykNNyp2kMwTB3EgFXB+bEMJTKesLtk4gSv6NHHzv9GV5gsH1GtFOIT114eDHB2forQTsXpUH9rT3IOeqByYCAWi5h6+LWIKokNrwov6FqXCNvoDDM/FlgTCBQo5OK/KyOQN2OppYZSC3xIwVUeWmSxuW0BUyU9TWoK9ihmLQxCNsrudnhH0hN6VHufS44gmpD/CEshyulp0CPX3hxEljyUeSkdvbMhZdAGg4d3YOBF14cT9T7nOpnmi55zM/TNkBRxAVg8gkOgTBKFkqDzn9SHjl2bLHhwdBIt3TaOwHWHOVV7xyC6luJZ6a7H+oDT0a1YmTB+K0tJ7Ww4p//Y6T2AXBlsC/AvkIpBCdRhcWvZuMkmCRg8FY/QgSEf8CNcU+FVurZlV441gkl7KmLFZdzBdcWPOoWxbt+iOP73ggA4RRcdw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7716fd25-0eea-4f03-d958-08d833997eea X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB4209.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2020 08:29:22.8926 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +rYQXBgptMPA2Tgg7d/20LlXeq1sCp4rRnFqNQzDv52ru2zF8zRT/MXhTrzE5hmEabTF27ZGzGzb1pE2akyv+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3204 Subject: [dpdk-dev] [PATCH v1 2/3] app/testpmd: enable configuring GENEVE port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" IANA has assigned port 6081 as the fixed well-known destination port for GENEVE. Nevertheless draft-ietf-nvo3-geneve-09 recommends that implementations make this configurable. This commit enables specifying any positive UDP destination port number for GENEVE. Signed-off-by: Ophir Munk --- app/test-pmd/parameters.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 7cb0e3d..0d135b0 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -70,7 +70,8 @@ usage(char* progname) "--rxpt= | --rxht= | --rxwt= | --rxfreet= | " "--txpt= | --txht= | --txwt= | --txfreet= | " "--txrst= | --tx-offloads= | | --rx-offloads= | " - "--vxlan-gpe-port= ]\n", + "--vxlan-gpe-port= ] " + "--geneve-port= ]\n", progname); #ifdef RTE_LIBRTE_CMDLINE printf(" --interactive: run in interactive mode.\n"); @@ -199,6 +200,7 @@ usage(char* progname) printf(" --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n"); printf(" --hot-plug: enable hot plug for device.\n"); printf(" --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n"); + printf(" --geneve-port=N: UPD port of tunnel GENEVE\n"); printf(" --mlockall: lock all memory\n"); printf(" --no-mlockall: do not lock all memory\n"); printf(" --mp-alloc : mempool allocation method.\n" @@ -664,6 +666,7 @@ launch_args_parse(int argc, char** argv) { "rx-offloads", 1, 0, 0 }, { "hot-plug", 0, 0, 0 }, { "vxlan-gpe-port", 1, 0, 0 }, + { "geneve-port", 1, 0, 0 }, { "mlockall", 0, 0, 0 }, { "no-mlockall", 0, 0, 0 }, { "mp-alloc", 1, 0, 0 }, @@ -1298,6 +1301,14 @@ launch_args_parse(int argc, char** argv) rte_exit(EXIT_FAILURE, "vxlan-gpe-port must be >= 0\n"); } + if (!strcmp(lgopts[opt_idx].name, "geneve-port")) { + n = atoi(optarg); + if (n >= 0) + geneve_udp_port = (uint16_t)n; + else + rte_exit(EXIT_FAILURE, + "geneve-port must be >= 0\n"); + } if (!strcmp(lgopts[opt_idx].name, "print-event")) if (parse_event_printing_config(optarg, 1)) { rte_exit(EXIT_FAILURE, -- 2.8.4