[ovs-dev] [PATCH] flow: Rearrange struct flow for better megaflows.
Ethan Jackson
ethan at nicira.com
Fri Apr 4 00:46:16 UTC 2014
Since the dp_hash will often be a hash of the 5 tuple, it makes sense
to put it with the L4 header so it hits in the last classifier lookup
stage.
Signed-off-by: Ethan Jackson <ethan at nicira.com>
---
lib/flow.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/flow.h b/lib/flow.h
index a6f45c9..7eb79d9 100644
--- a/lib/flow.h
+++ b/lib/flow.h
@@ -97,17 +97,13 @@ union flow_in_port {
* be looked at. This enables better wildcarding for datapath flows.
*/
struct flow {
- /* Recirculation */
- uint32_t dp_hash; /* Datapath computed hash value. The exact
- computation is opaque to the user space.*/
- uint32_t recirc_id; /* Must be exact match. */
-
/* L1 */
struct flow_tnl tunnel; /* Encapsulating tunnel parameters. */
ovs_be64 metadata; /* OpenFlow Metadata. */
uint32_t regs[FLOW_N_REGS]; /* Registers. */
uint32_t skb_priority; /* Packet priority for QoS. */
uint32_t pkt_mark; /* Packet mark. */
+ uint32_t recirc_id; /* Must be exact match. */
union flow_in_port in_port; /* Input port.*/
/* L2 */
@@ -134,6 +130,8 @@ struct flow {
ovs_be16 pad; /* Padding. */
/* L4 */
+ uint32_t dp_hash; /* Datapath computed hash value. The exact
+ computation is opaque to the user space.*/
ovs_be16 tp_src; /* TCP/UDP/SCTP source port. */
ovs_be16 tp_dst; /* TCP/UDP/SCTP destination port.
* Keep last for the BUILD_ASSERT_DECL below */
--
1.8.1.2
More information about the dev
mailing list