datapath: Fix tunnel source port selection for mega flow
authorAndy Zhou <azhou@nicira.com>
Tue, 2 Jul 2013 22:58:19 +0000 (15:58 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 3 Jul 2013 00:10:27 +0000 (17:10 -0700)
commit5bc6241b420ba5ce0ff40f9456f0b8215d34f3fb
tree1e87906ec5ed003288a423be8412ba7e0287b10b
parente4052cb95af2250e29984ea9fe26cc40fac47713
datapath: Fix tunnel source port selection for mega flow

Tunnel source port selection was based on hash value cached in the
flow. This no longer works with mega flow, since all flows matching
a mega flow will be transmitted with the same tunnel source port.

This patch computes the tunnel source port at run time based on each
incoming packet. Packets belong to the same micro flow would still get
the same source port, but multiple micro flows hitting the same mega flow
can get different source ports.

Packets injected from the usespace will be assigned to the same
source port as if they are forwarded in the kernel.

Bug #18216

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/tunnel.c