ofproto-dpif: Get rid of "struct dst".
struct dst is an intermediate form for OFPP_NORMAL translation that
has existed since the beginning of Open vSwitch development. It
has always been a bit ugly, since ideally we wouldn't need any intermediate
form at all. This commit eliminates it, which speeds up OFPP_NORMAL
translation.
struct dst was used earlier to eliminate duplicate packets in OFPP_NORMAL
output. Now, we have rules that eliminate duplicate packets in a cheaper
way.
OFPP_NORMAL outputs packets for two different reasons, forwarding and
mirroring, so those are the two possible sources of packet duplication.
Forwarding by itself never outputs two copies of a packet to a single port
on a given VLAN, and this is also true of mirroring by itself since commit
"ofproto-dpif: Improve RSPAN translation performance from O(n**2) to O(n)".
The only remaining possibility, then, is that forwarding and mirroring
between them duplicate an output packet. However, the algorithms are now
designed to prevent this. Forwarding will never output to a mirroring
destination output port. Forwarding will only output to a mirroring
output VLAN if the packet arrived on a mirroring output VLAN, and in that
case mirroring is disabled.
This commit has the side effect of improving behavior for VLAN output.
Previously, a packet that arrived with an 802.1Q tag with both VID and PCP
of 0 would be output with a similar tag in some cases; now it is
consistently stripped. This change is reflected in the unit test change.
We really need some unit tests for mirroring. I have not tested mirroring
behavior, only theorized about it (see above).