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 2EAE8A04C7; Tue, 15 Sep 2020 15:17:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 092741C0DB; Tue, 15 Sep 2020 15:17:29 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 060711BF7F for ; Tue, 15 Sep 2020 15:17:22 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from ophirmu@nvidia.com) with SMTP; 15 Sep 2020 16:17:21 +0300 Received: from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 08FDHL46017444; Tue, 15 Sep 2020 16:17:21 +0300 From: Ophir Munk To: dev@dpdk.org, Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Ferruh Yigit Cc: Ophir Munk , Ophir Munk Date: Tue, 15 Sep 2020 13:17:16 +0000 Message-Id: <20200915131717.18252-3-ophirmu@nvidia.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200915131717.18252-1-ophirmu@nvidia.com> References: <20200915125319.16568-2-ophirmu@nvidia.com> <20200915131717.18252-1-ophirmu@nvidia.com> Subject: [dpdk-dev] [PATCH v4 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" From: Ophir Munk 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 | 14 ++++++++++++-- doc/guides/testpmd_app_ug/run_app.rst | 5 +++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 7845153..25e2935 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -70,8 +70,8 @@ usage(char* progname) "--rxpt= | --rxht= | --rxwt= | --rxfreet= | " "--txpt= | --txht= | --txwt= | --txfreet= | " "--txrst= | --tx-offloads= | | --rx-offloads= | " - "--vxlan-gpe-port= | --record-core-cycles | " - "--record-burst-stats]\n", + "--vxlan-gpe-port= | --geneve-port= | " + "--record-core-cycles | --record-burst-stats]\n", progname); #ifdef RTE_LIBRTE_CMDLINE printf(" --interactive: run in interactive mode.\n"); @@ -200,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" @@ -667,6 +668,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 }, @@ -1303,6 +1305,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, diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index e2539f6..dbd22f1 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -426,6 +426,11 @@ The command line options are: Set the UDP port number of tunnel VXLAN-GPE to N. The default value is 4790. +* ``--geneve-port=N`` + + Set the UDP port number of tunnel GENEVE to N. + The default value is 6081. + * ``--mlockall`` Enable locking all memory. -- 2.8.4