Thread (28 messages) 28 messages, 3 authors, 2017-10-07

Re: [PATCH v2 1/2] app/testpmd: support the heavywight mode GRO

From: Ferruh Yigit <hidden>
Date: 2017-08-22 08:30:36

On 8/22/2017 2:00 AM, Hu, Jiayu wrote:
Hi,
quoted
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, August 21, 2017 7:04 PM
To: Hu, Jiayu <redacted>; dev@dpdk.org
Cc: Ananyev, Konstantin <redacted>; Tan, Jianfeng
[off-list ref]; thomas@monjalon.net; Wu, Jingjing
[off-list ref]; Yao, Lei A [off-list ref]
Subject: Re: [PATCH v2 1/2] app/testpmd: support the heavywight mode GRO

On 8/17/2017 10:08 AM, Jiayu Hu wrote:
quoted
The GRO library provides two reassembly modes: lightweight mode and
heavyweight mode. This patch is to support the heavyweight mode in
csum forwarding engine.

With the command "set port <port_id> gro (heavymode|lightmode)
(on|off)",
quoted
users can select the lightweight mode or the heavyweight mode to use.
With
quoted
the command "set gro flush interval <num>", users can set the interval of
flushing GROed packets from reassembly tables for the heavyweight mode.
With the command "show port <port_id> gro", users can display GRO
configuration.

Signed-off-by: Jiayu Hu <redacted>
<...>
quoted
 	lcoreid_t  cpuid_idx;    /**< index of logical core in CPU id table */
@@ -434,13 +436,21 @@ extern struct ether_addr
peer_eth_addrs[RTE_MAX_ETHPORTS];
quoted
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-
retry. */
quoted
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-
retry. */
quoted
+#define GRO_HEAVYMODE 0x1
+#define GRO_LIGHTMODE 0x2
Why these are not part of the gro library?
Is the concept "lightweight mode and heavyweight mode" part of gro
library or implemented only in testpmd?
Lightweight mode and heavyweight mode are two reassembly methods we
provided in the GRO library. For applications, they are just two kinds of APIs.
Applications can select any of them to merge packets.
GRO modes are defined in testpmd, and kept in testpmd variables, library
seems not aware of these modes.

What are these two APIs, rte_gro_reassemble() and
rte_gro_reassemble_burst() ?
Perhaps you can detail what Lightweight mode and heavyweight mode are,
doc also don't have much about it.

This still looks like gro library provides common API and testpmd calls
these API with different parameters and calls these lightweight and
heavyweight, if these modes are common use case, I believe they should
be part of library. If not, instead of saying different gro modes, it
can be presented as different gro usage samples in testpmd.

testpmd good for testing dpdk, and good for providing usage sample for
APIs, but I believe it shouldn't have the concepts coded in it,
libraries should have it, that is what end user uses.
In testpmd, we want to show how to use these two reassembly modes, so
I define two macros to present them. Users can select which one to use via
command line.
quoted
quoted
+
 #define GRO_DEFAULT_FLOW_NUM 4
 #define GRO_DEFAULT_ITEM_NUM_PER_FLOW DEF_PKT_BURST
+
+#define GRO_DEFAULT_FLUSH_INTERVAL 2
+#define GRO_MAX_FLUSH_INTERVAL 4
+
 struct gro_status {
 	struct rte_gro_param param;
 	uint8_t enable;
 };
 extern struct gro_status gro_ports[RTE_MAX_ETHPORTS];
+extern uint32_t gro_flush_interval;
<...>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help