Skip to contentSkip to conversation

examples/l3fwd: enable hash multi lookup for ARM

PATCH In review Ruifeng Wang 4 participants 6 messages Jan 2, 2019 – Jan 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/l3fwd: enable hash multi lookup for ARM

Compile option for hash_multi_lookup was broken, and caused feature cannot be enabled on Arm.
This patch sets hash_multi_lookup method as default, and sequential lookup becomes optional.

In test of 8192 flows with 128-byte packets, throughput increased by 25.6% after enabling hash_multi_lookup.

Fixes 52c97adc1f0f ("examples/l3fwd: fix exact match performance")
---
 examples/l3fwd/l3fwd.h | 4 ----
 1 file changed, 4 deletions(-)
examples/l3fwd/l3fwd.h +0 -4
index c962deac3..063b80018 100644
@@ -11,10 +11,6 @@
 
 #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
 
-#if !defined(NO_HASH_MULTI_LOOKUP) && defined(RTE_MACHINE_CPUFLAG_NEON)
-#define NO_HASH_MULTI_LOOKUP 1
-#endif
-
 #define MAX_PKT_BURST     32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
 
Signature · 1 line
2.17.1
#1 lore raw

Thanks Ruifeng for the patch. I have one question inline.

Jerin/Hemant,
It would be good if you could test this on your platforms, since this is being made default.

Thanks,
Honnappa

Quoted 11 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Tuesday, January 1, 2019 11:28 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; Ruifeng Wang (Arm Technology China) <[email protected]>; [email protected]
Subject: [PATCH v1] examples/l3fwd: enable hash multi lookup for ARM

Quoted 8 lines

Compile option for hash_multi_lookup was broken, and caused feature cannot be enabled on Arm.
This patch sets hash_multi_lookup method as default, and sequential lookup becomes optional.

In test of 8192 flows with 128-byte packets, throughput increased by 25.6% after enabling hash_multi_lookup.

I assume these are lookup-hit numbers. Do you have look-up miss numbers?

Quoted 28 lines
Fixes 52c97adc1f0f ("examples/l3fwd: fix exact match performance")
---
 examples/l3fwd/l3fwd.h | 4 ----
 1 file changed, 4 deletions(-)
examples/l3fwd/l3fwd.h index renamed from examples/l3fwd/l3fwd.h +0 -0

c962deac3..063b80018 100644

examples/l3fwd/l3fwd.h +0 -1
@@ -11,10 +11,6 @@
 
 #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
 
-#if !defined(NO_HASH_MULTI_LOOKUP) &&

defined(RTE_MACHINE_CPUFLAG_NEON) -#define NO_HASH_MULTI_LOOKUP 1 -#endif
-
#define MAX_PKT_BURST 32
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */

--
2.17.1

#2 lore raw

Hi Honnappa,

Quoted 38 lines

-----Original Message-----
From: Honnappa Nagarahalli <[email protected]>
Sent: Thursday, January 3, 2019 2:23
To: Ruifeng Wang (Arm Technology China) <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; nd <[email protected]>; Ruifeng Wang (Arm Technology China) <[email protected]>; [email protected]; nd <[email protected]>
Subject: RE: [PATCH v1] examples/l3fwd: enable hash multi lookup for ARM

Thanks Ruifeng for the patch. I have one question inline.

Jerin/Hemant,
It would be good if you could test this on your platforms, since this is
being made default.

Thanks,
Honnappa

Quoted 5 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Tuesday, January 1, 2019 11:28 PM
To: [email protected]
Cc: [email protected]; [email protected];

[email protected];

Quoted 2 lines

[email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>;

Ruifeng

Quoted 9 lines

Wang (Arm Technology China) <[email protected]>; [email protected]
Subject: [PATCH v1] examples/l3fwd: enable hash multi lookup for ARM

Compile option for hash_multi_lookup was broken, and caused feature cannot be enabled on Arm.
This patch sets hash_multi_lookup method as default, and sequential lookup becomes optional.

Quoted 5 lines
Quoted 3 lines

In test of 8192 flows with 128-byte packets, throughput increased by 25.6% after enabling hash_multi_lookup.

I assume these are lookup-hit numbers. Do you have look-up miss numbers?

Yes, lookup-hit had 25.6% gain.
In lookup-miss tests, throughput had over 33% gain.

Quoted 29 lines
Quoted 20 lines
Fixes 52c97adc1f0f ("examples/l3fwd: fix exact match performance")
---
 examples/l3fwd/l3fwd.h | 4 ----
 1 file changed, 4 deletions(-)
examples/l3fwd/l3fwd.h index renamed from examples/l3fwd/l3fwd.h +0 -0

c962deac3..063b80018 100644

examples/l3fwd/l3fwd.h +0 -1
@@ -11,10 +11,6 @@
 
 #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
 
-#if !defined(NO_HASH_MULTI_LOOKUP) &&
Quoted 1 line

defined(RTE_MACHINE_CPUFLAG_NEON) -#define

NO_HASH_MULTI_LOOKUP 1

Quoted 7 lines
examples/l3fwd/l3fwd.h +0 -3
-#endif
-
 #define MAX_PKT_BURST     32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
 
--

2.17.1

#3 lore raw
In reply to Honnappa Nagarahalli
Quoted 26 lines · Honnappa Nagarahalli

Thanks Ruifeng for the patch. I have one question inline.

Jerin/Hemant,
It would be good if you could test this on your platforms, since this is being made default.

Thanks,
Honnappa

Quoted 18 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Tuesday, January 1, 2019 11:28 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; Ruifeng Wang (Arm Technology China) <[email protected]>; [email protected]
Subject: [PATCH v1] examples/l3fwd: enable hash multi lookup for ARM

Compile option for hash_multi_lookup was broken, and caused feature cannot be enabled on Arm.
This patch sets hash_multi_lookup method as default, and sequential lookup becomes optional.

In test of 8192 flows with 128-byte packets, throughput increased by 25.6% after enabling hash_multi_lookup.

Hi,

  I tested this patch on LS2088 (A72) platform. I have tried both dpaa2
and armv8a config for builds.

In both cases, I am seeing a drop of 3-8%  in different scenario using 1 core case with small packets.

 - 1 flow case -  7-8 % drop in performance

 - 8 K flow case - 2-5 % drop in performance

Regards,

Hemant

Quoted 30 lines

I assume these are lookup-hit numbers. Do you have look-up miss numbers?

Quoted 28 lines
Fixes 52c97adc1f0f ("examples/l3fwd: fix exact match performance")
---
  examples/l3fwd/l3fwd.h | 4 ----
  1 file changed, 4 deletions(-)
examples/l3fwd/l3fwd.h index renamed from examples/l3fwd/l3fwd.h +0 -0

c962deac3..063b80018 100644

examples/l3fwd/l3fwd.h +0 -1
@@ -11,10 +11,6 @@
 
  #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
 
-#if !defined(NO_HASH_MULTI_LOOKUP) &&

defined(RTE_MACHINE_CPUFLAG_NEON) -#define NO_HASH_MULTI_LOOKUP 1 -#endif
-
#define MAX_PKT_BURST 32
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */

--
2.17.1

#4 lore raw

Hi Hemant,

Quoted 51 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Thursday, January 3, 2019 16:05
To: Honnappa Nagarahalli <[email protected]>; Ruifeng Wang (Arm Technology China) <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; nd <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v1] examples/l3fwd: enable hash multi lookup for ARM

Quoted 4 lines · Honnappa Nagarahalli

Thanks Ruifeng for the patch. I have one question inline.

Jerin/Hemant,
It would be good if you could test this on your platforms, since this is

being made default.

Quoted 9 lines

Thanks,
Honnappa

Quoted 5 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Tuesday, January 1, 2019 11:28 PM
To: [email protected]
Cc: [email protected]; [email protected];

[email protected];

Quoted 2 lines
Quoted 2 lines

[email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>;

Ruifeng

Quoted 11 lines
Quoted 11 lines

Wang (Arm Technology China) <[email protected]>; [email protected]
Subject: [PATCH v1] examples/l3fwd: enable hash multi lookup for ARM

Compile option for hash_multi_lookup was broken, and caused feature cannot be enabled on Arm.
This patch sets hash_multi_lookup method as default, and sequential lookup becomes optional.

In test of 8192 flows with 128-byte packets, throughput increased by 25.6% after enabling hash_multi_lookup.

Hi,

  I tested this patch on LS2088 (A72) platform. I have tried both dpaa2 and
armv8a config for builds.

In both cases, I am seeing a drop of 3-8%  in different scenario using 1 core case with small packets.

Quoted 9 lines

 - 1 flow case -  7-8 % drop in performance

 - 8 K flow case - 2-5 % drop in performance

Regards,

Hemant

Thanks for your tests.
Were the 8K flow in your case all for hit?
Not know why, but in my tests, 1 core case with 64B packet had notable performance gain with 8K flow. Although performance had drop with few hash entry configured.

Command used:
./l3fwd -n 4 -c 0x80 -- -E -P --parse-ptype -p 0x3 --config="(0,0,7),(1,0,7)" --hash-entry-num=0x8000

Quoted 32 lines
Quoted 1 line

I assume these are lookup-hit numbers. Do you have look-up miss

numbers?

Quoted 18 lines
Quoted 18 lines
Fixes 52c97adc1f0f ("examples/l3fwd: fix exact match performance")
---
  examples/l3fwd/l3fwd.h | 4 ----
  1 file changed, 4 deletions(-)
examples/l3fwd/l3fwd.h index renamed from examples/l3fwd/l3fwd.h +0 -0

c962deac3..063b80018 100644

examples/l3fwd/l3fwd.h +0 -0
@@ -11,10 +11,6 @@
 
Quoted 4 lines
Quoted 4 lines
examples/l3fwd/l3fwd.h +0 -1
  #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
 
-#if !defined(NO_HASH_MULTI_LOOKUP) &&

defined(RTE_MACHINE_CPUFLAG_NEON) -#define

NO_HASH_MULTI_LOOKUP 1

Quoted 7 lines
Quoted 7 lines
examples/l3fwd/l3fwd.h +0 -3
-#endif
-
  #define MAX_PKT_BURST     32
  #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
 
--

2.17.1

#5 lore raw
In reply to Ruifeng Wang
Quoted 9 lines · Ruifeng Wang

-------------------------------------------------------------------
---
Compile option for hash_multi_lookup was broken, and caused feature cannot be enabled on Arm.
This patch sets hash_multi_lookup method as default, and sequential lookup becomes optional.

In test of 8192 flows with 128-byte packets, throughput increased by 25.6% after enabling hash_multi_lookup.

# Are you changing l3fwd source code to test with 8K flows? meaning it has only a few flows for hit case.

# Are you testing with ThunderX2?

# Can you check with single flow with 64B and one core? In my case, I am getting >20% regression with octeontx.

Command used:
#./l3fwd -c 0x800000 -n 4 -- -P -E -p 0x3 --config="(0, 0, 23),(1,0,23)"

In addition to that,

The file examples/l3fwd/l3fwd_em_hlm.h has following change, Not sure why we need ARM64 specific change there?

#ifdef RTE_ARCH_ARM64
#define EM_HASH_LOOKUP_COUNT 16
#else
#define EM_HASH_LOOKUP_COUNT 8
#endif

Quoted 27 lines
Fixes 52c97adc1f0f ("examples/l3fwd: fix exact match performance")
---
 examples/l3fwd/l3fwd.h | 4 ----
 1 file changed, 4 deletions(-)
examples/l3fwd/l3fwd.h +0 -4
index c962deac3..063b80018 100644
@@ -11,10 +11,6 @@
 
 #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
 
-#if !defined(NO_HASH_MULTI_LOOKUP) &&
 defined(RTE_MACHINE_CPUFLAG_NEON)
-#define NO_HASH_MULTI_LOOKUP 1
-#endif
-
 #define MAX_PKT_BURST     32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */