ofproto: Remove obsolete comment and assertion.
authorBen Pfaff <blp@nicira.com>
Wed, 14 Aug 2013 23:26:05 +0000 (16:26 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 28 Aug 2013 05:06:02 +0000 (22:06 -0700)
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@nicira.com>
ofproto/ofproto.c

index e5ad442..85fad04 100644 (file)
@@ -2272,8 +2272,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.
@@ -2285,8 +2284,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);