ofproto-dpif-upcall: Forward packets in order of arrival.
authorBen Pfaff <blp@nicira.com>
Thu, 19 Sep 2013 18:03:47 +0000 (11:03 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 19 Sep 2013 18:03:47 +0000 (11:03 -0700)
commit04a19fb8f4b8ba19a9805906aac7b30b65b57206
treeb1c57c6e411072f3a89e86caea29482208f62a7c
parenta31dab7f49223342012860c42d30aad5c3508031
ofproto-dpif-upcall: Forward packets in order of arrival.

Until now, the code in ofproto-dpif-upcall (and the code that preceded it
in ofproto-dpif) obtained a batch of incoming packets, inserted them into
a hash table based on hashes of their flows, processed them, and then
forwarded them in hash order.  Usually this maintains order within a single
network connection, but because OVS's notion of a flow is so fine-grained,
it can reorder packets within (e.g.) a TCP connection if two packets
handled in a single batch have (e.g.) different ECN values.

This commit fixes the problem by making ofproto-dpif-upcall always forward
packets in the same order they were received.

This is far from the minimal change necessary to avoid reordering packets.
I think that the code is easier to understand afterward.

Reported-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif-upcall.h