Alex, Thanks for spotting this. I had momentarily missed the fact that ofpbuf_use_stub() sets the size to zero.
Pushed to master, Jarno On Dec 17, 2013, at 12:16 AM, Alex Wang <al...@nicira.com> wrote: > Commit da546e0 (dpif: Allow execute to modify the packet.) introduced > a bug by subtracting the zero-value ofpbuf size by "sizeof(struct > nlattr)" and assigning the result back to the ofpbuf size. This bug > causes the ovs-assert failure in facet_push_stats(). > > This commit fixes the bug by assigning the right value to the ofpbuf > size. > > Signed-off-by: Alex Wang <al...@nicira.com> > --- > lib/dpif-linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c > index d11b484..34b4d92 100644 > --- a/lib/dpif-linux.c > +++ b/lib/dpif-linux.c > @@ -1473,7 +1473,7 @@ parse_odp_packet(struct ofpbuf *buf, struct dpif_upcall > *upcall, > nl_attr_get_size(a[OVS_PACKET_ATTR_PACKET]) + > sizeof(struct nlattr)); > upcall->packet.data = (char *)upcall->packet.data + sizeof(struct nlattr); > - upcall->packet.size -= sizeof(struct nlattr); > + upcall->packet.size = nl_attr_get_size(a[OVS_PACKET_ATTR_PACKET]); > > *dp_ifindex = ovs_header->dp_ifindex; > > -- > 1.7.9.5 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev