[ovs-dev] [risc 1/4] ofproto: Remove obsolete comment and assertion.
Ben Pfaff
blp at nicira.com
Thu Aug 15 20:00:52 UTC 2013
At one time, the ofproto-dpif implementation of the 'rule_execute' member
function required, indirectly, at least struct(ofp10_packet_in) bytes of
headroom in the packet passed into it. (This allowed constructing an
OFPT_PACKET_IN without allocating and copying a new ofpbuf.) This
restriction has long been lifted, but rule_execute() had not yet caught
up. This commit updates it.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
ofproto/ofproto.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index bbdb2d2..e7f29c6 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -2244,8 +2244,7 @@ ofoperation_has_out_port(const struct ofoperation *op, ofp_port_t out_port)
}
/* Executes the actions indicated by 'rule' on 'packet' and credits 'rule''s
- * statistics appropriately. 'packet' must have at least sizeof(struct
- * ofp10_packet_in) bytes of headroom.
+ * statistics appropriately.
*
* 'packet' doesn't necessarily have to match 'rule'. 'rule' will be credited
* with statistics for 'packet' either way.
@@ -2257,8 +2256,6 @@ rule_execute(struct rule *rule, ofp_port_t in_port, struct ofpbuf *packet)
struct flow flow;
union flow_in_port in_port_;
- ovs_assert(ofpbuf_headroom(packet) >= sizeof(struct ofp10_packet_in));
-
in_port_.ofp_port = in_port;
flow_extract(packet, 0, 0, NULL, &in_port_, &flow);
return rule->ofproto->ofproto_class->rule_execute(rule, &flow, packet);
--
1.7.10.4
More information about the dev
mailing list