]> git.proxmox.com Git - ovs.git/commit - ofproto/ofproto-dpif-xlate.c
ofproto-dpif: Clean up table lookup code.
authorJarno Rajahalme <jrajahalme@nicira.com>
Mon, 10 Nov 2014 21:14:29 +0000 (13:14 -0800)
committerJarno Rajahalme <jrajahalme@nicira.com>
Mon, 10 Nov 2014 21:33:38 +0000 (13:33 -0800)
commit34dd0d78d9b30b745c5011020701bf228a63810d
treedade318bdcd7b97388d7c5085b21a898415f4838
parent2f47cdf48336debf20488790dfa2b176122fbe1e
ofproto-dpif: Clean up table lookup code.

Keep knowledge about ofproto-dpif internal rules within ofproto-dpif.
This removes duplication of code (accross multiple files), and allows
making the ofproto-dpif-xlate interface a bit smaller.

'may_packet_in' was previously not honored for the
'LOOKUP_VERDICT_DEFAULT' case.  Now it is, but this change did not
break any unit tests.

Also, previously in the 'LOOKUP_VERDICT_CONTROLLER' case packet-in
messages would have been generated when the in_port could not be found
('config' was set to zero in this case, causing 'OFPUTIL_PC_NO_PACKET_IN'
flag to be zero as well).  This patch changes this behavior and never
issues packet-in messages when the in_port cannot be found.  This did
not break any unit tests either.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h