aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2013-03-21 11:17:00 -0700
committerEthan Jackson <ethan@nicira.com>2013-03-22 14:44:34 -0700
commit8a02b5ee895add9b5ec4407ad5e525654a41a3dc (patch)
treeb8e9c0947504b3c93d83fee056b9119a1ecf35e9
parent99c8d7931003c800db581d3fe734186d011ea896 (diff)
ofproto-dpif: xlate actions once with subfacets.
Before this patch, when ofproto-dpif decided that a particular flow miss needed a facet, it would do action translation multiple times. Once in subfacet_make_actions(), and once per packet in subfacet_update_stats(). In the common case (once per miss), this would double the amount of work required in xlate_actions(). The call to facet_push_stats() in subfacet_update_stats() is unnecessary. If the packets are simply accounted to the facet, they will eventually be pushed to the relevant rules in update_stats() or when the facet is removed. Removing the unnecessary step gives us a 20% improvement of the netperf TCP_CRR benchmark with the complex flow tables installed by our controller. Signed-off-by: Ethan Jackson <ethan@nicira.com>
-rw-r--r--ofproto/ofproto-dpif.c1
-rw-r--r--tests/ofproto-dpif.at1
2 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index d56b51a9..2d92dc33 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5251,7 +5251,6 @@ subfacet_update_stats(struct subfacet *subfacet,
facet->packet_count += stats->n_packets;
facet->byte_count += stats->n_bytes;
facet->tcp_flags |= stats->tcp_flags;
- facet_push_stats(facet);
netflow_flow_update_flags(&facet->nf_flow, stats->tcp_flags);
}
}
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 67cd864f..7266054c 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -364,6 +364,7 @@ NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6
udp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
])
+AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
cookie=0x1, n_packets=2, n_bytes=120, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535