[v2,1/2] testpmd: use RFC values for Tx address and port

Message ID 20180611182526.32327-2-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series testpmd: allow configure of Tx IP parameters |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Stephen Hemminger June 11, 2018, 6:25 p.m. UTC
  Change the IP address and UDP port used for testpmd Tx only
test. The old values overlap common NAT local networks; instead
use reserved addresses in IETF RFC 2544.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 app/test-pmd/txonly.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
  

Comments

Iremonger, Bernard June 14, 2018, 10:17 a.m. UTC | #1
Hi Stephen,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> Hemminger
> Sent: Monday, June 11, 2018 7:25 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Stephen
> Hemminger <sthemmin@microsoft.com>
> Subject: [dpdk-dev] [PATCH v2 1/2] testpmd: use RFC values for Tx address
> and port
> 
> Change the IP address and UDP port used for testpmd Tx only test. The old
> values overlap common NAT local networks; instead use reserved addresses
> in IETF RFC 2544.

The commit message should probably refer to RFC 863 too.

> 
> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
> ---
>  app/test-pmd/txonly.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index
> 1f08b6ed37a2..a24000e3af44 100644
> --- a/app/test-pmd/txonly.c
> +++ b/app/test-pmd/txonly.c
> @@ -40,11 +40,13 @@
> 
>  #include "testpmd.h"
> 
> -#define UDP_SRC_PORT 1024
> -#define UDP_DST_PORT 1024
> +/* RFC863 discard port */
> +#define UDP_SRC_PORT 9
> +#define UDP_DST_PORT 9
> 
> -#define IP_SRC_ADDR ((192U << 24) | (168 << 16) | (0 << 8) | 1) -#define
> IP_DST_ADDR ((192U << 24) | (168 << 16) | (0 << 8) | 2)
> +/* RFC2544 reserved test subnet 192.18.0.0 */ #define IP_SRC_ADDR
> +((192U << 24) | (18 << 16) | (0 << 8) | 1) #define IP_DST_ADDR ((192U
> +<< 24) | (18 << 16) | (0 << 8) | 2)
> 
>  #define IP_DEFTTL  64   /* from RFC 1340. */
>  #define IP_VERSION 0x40
> --
> 2.17.1

dpdk/devtools/check-git-log.sh is showing the following error
Wrong headline label:
        testpmd: use RFC values for Tx address and port

It should be app/testpmd

Regards,

Bernard.
  
Stephen Hemminger June 14, 2018, 3:56 p.m. UTC | #2
On Thu, 14 Jun 2018 10:17:46 +0000
"Iremonger, Bernard" <bernard.iremonger@intel.com> wrote:

> Hi Stephen,
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> > Hemminger
> > Sent: Monday, June 11, 2018 7:25 PM
> > To: dev@dpdk.org
> > Cc: Stephen Hemminger <stephen@networkplumber.org>; Stephen
> > Hemminger <sthemmin@microsoft.com>
> > Subject: [dpdk-dev] [PATCH v2 1/2] testpmd: use RFC values for Tx address
> > and port
> > 
> > Change the IP address and UDP port used for testpmd Tx only test. The old
> > values overlap common NAT local networks; instead use reserved addresses
> > in IETF RFC 2544.  
> 
> The commit message should probably refer to RFC 863 too.
> 

Ok.  I forgot about RFC863. It is 1 page!
  

Patch

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 1f08b6ed37a2..a24000e3af44 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -40,11 +40,13 @@ 
 
 #include "testpmd.h"
 
-#define UDP_SRC_PORT 1024
-#define UDP_DST_PORT 1024
+/* RFC863 discard port */
+#define UDP_SRC_PORT 9
+#define UDP_DST_PORT 9
 
-#define IP_SRC_ADDR ((192U << 24) | (168 << 16) | (0 << 8) | 1)
-#define IP_DST_ADDR ((192U << 24) | (168 << 16) | (0 << 8) | 2)
+/* RFC2544 reserved test subnet 192.18.0.0 */
+#define IP_SRC_ADDR ((192U << 24) | (18 << 16) | (0 << 8) | 1)
+#define IP_DST_ADDR ((192U << 24) | (18 << 16) | (0 << 8) | 2)
 
 #define IP_DEFTTL  64   /* from RFC 1340. */
 #define IP_VERSION 0x40