From: Ben Pfaff Date: Wed, 14 Aug 2013 23:26:05 +0000 (-0700) Subject: ofproto: Remove obsolete comment and assertion. X-Git-Tag: v1.9.3~5 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=02e51c6a0fffe8db84a0d4c39d9dd26f2f36a68c ofproto: Remove obsolete comment and assertion. 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 --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c9bb87754..203d58202 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1956,8 +1956,7 @@ ofoperation_has_out_port(const struct ofoperation *op, uint16_t out_port) } /* Executes the actions indicated by 'rule' on 'packet' and credits 'rule''s - * statistics appropriately. 'packet' must have at least sizeof(struct - * ofp_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. @@ -1968,8 +1967,6 @@ rule_execute(struct rule *rule, uint16_t in_port, struct ofpbuf *packet) { struct flow flow; - assert(ofpbuf_headroom(packet) >= sizeof(struct ofp_packet_in)); - flow_extract(packet, 0, 0, NULL, in_port, &flow); return rule->ofproto->ofproto_class->rule_execute(rule, &flow, packet); }