[ovs-dev] [PATCH] upcall: Remove redundant xlate_actions_for_side_effects().
Ethan Jackson
ethan at nicira.com
Thu May 22 17:57:19 UTC 2014
As a result of commit a0bab87 (ofproto: Remove per-flow miss hash
table from upcall handler.) we're guaranteed that every packet has had
xlate_actions() called on it at least once. Therefore, there's no
need to re-xlate slow path flows just to shove their packets through
the system.
This also may fix a bug discussed here:
http://openvswitch.org/pipermail/discuss/2014-April/013670.html
Signed-off-by: Ethan Jackson <ethan at nicira.com>
Reported-by: Murphy McCauley <murphy.mccauley at gmail.com>
---
Murphy, would you please verify that this solves your problem?
Ethan
---
ofproto/ofproto-dpif-upcall.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 3bb1a66..db0f17e 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -692,8 +692,8 @@ upcall_init(struct upcall *upcall, struct flow *flow, struct ofpbuf *packet,
struct ofproto_dpif *ofproto, struct dpif_upcall *dupcall,
odp_port_t odp_in_port)
{
- struct xlate_in xin;
struct pkt_metadata md = pkt_metadata_from_flow(flow);
+ struct xlate_in xin;
flow_extract(packet, &md, &upcall->flow);
@@ -708,8 +708,7 @@ upcall_init(struct upcall *upcall, struct flow *flow, struct ofpbuf *packet,
upcall->odp_in_port = odp_in_port;
xlate_in_init(&xin, upcall->ofproto, &upcall->flow, NULL,
- upcall->stats.tcp_flags, NULL);
- xin.may_learn = true;
+ upcall->stats.tcp_flags, packet);
if (upcall->upcall_type == DPIF_UC_MISS) {
xin.resubmit_stats = &upcall->stats;
@@ -867,13 +866,6 @@ handle_upcalls(struct handler *handler, struct upcall *upcalls,
fail_open = fail_open || upcall->xout.fail_open;
- if (upcall->xout.slow) {
- struct xlate_in xin;
-
- xlate_in_init(&xin, upcall->ofproto, &upcall->flow, NULL, 0, packet);
- xlate_actions_for_side_effects(&xin);
- }
-
if (upcall->flow.in_port.ofp_port
!= vsp_realdev_to_vlandev(upcall->ofproto,
upcall->flow.in_port.ofp_port,
--
1.8.1.2
More information about the dev
mailing list