Hey Ben, Just found, I think there are cases that a whole packet is wanted.
In function "dp_netdev_execute_actions()", there are calls to functions like "push_mpls()" and "pop__mpls()", which requires the packet header pointers (e.g. l2_5, l2 ) in "struct ofpbuf *" be initialized. I think the call to "flow_extract()" here serves to initialize the packet header pointers. So, it seems a bit confusing to use "flow_extract()" here, since the "struct flow key" is actually initialized in function "dpif_netdev_flow_from_nlattrs()". Also, I want to ask, does it make sense to add a function in ofpbuf.c/h that conducts the initialization of packet header pointers? Kind Regards, Alex Wang On Thu, May 23, 2013 at 10:08 AM, Ben Pfaff <b...@nicira.com> wrote: > On Tue, May 21, 2013 at 11:33:58AM -0700, Alex Wang wrote: > > This commit removes the redundant call to flow_extract in > dpif_netdev_execute, > > since in the next line, the call to dpif_netdev_flow_from_nlattrs will > reset > > the flow variable. > > > > Signed-off-by: Alex Wang <al...@nicira.com> > > I think that the flow_extract() call is here because the > dpif_netdev_execute() interface only requires the caller to pass in > metadata fields (e.g. in_port). The current caller actually passes in > everything, but the interface doesn't require it. >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev