[ovs-dev] [bug4769] datapath: Get packet metadata from userspace in odp_packet_cmd_execute().

Jesse Gross jesse at nicira.com
Wed Jun 1 18:33:44 UTC 2011


On Wed, Jun 1, 2011 at 11:03 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Jun 01, 2011 at 10:16:47AM -0700, Jesse Gross wrote:
>> On Wed, Jun 1, 2011 at 10:13 AM, Ben Pfaff <blp at nicira.com> wrote:
>> > On Wed, Jun 01, 2011 at 10:08:00AM -0700, Jesse Gross wrote:
>> >> I think we need to be careful about ensuring that the layer pointers
>> >> are correctly initialized. ??If we need to execute an action later on
>> >> it is assumed that the pointers have been set, as they usually are by
>> >> flow_extract(). ??It looks like that is true going into this function
>> >> (although not strictly guaranteed) because in order to generate the
>> >> flow we would have needed to call flow_extract() in the past.
>> >> However, if we go down the 'mutates' branch then we put the data in a
>> >> new ofpbuf and lose those pointers.
>> >
>> > Oops, you're right of course.
>> >
>> > Do you think it's better to copy the layer pointers or just to find
>> > them again with flow_extract()?
>>
>> I would probably just run flow_extract() again.  It's more robust,
>> matches what we do in the kernel, and is not performance critical.
>
> OK, revised incremental:

Looks good.

The whole thing:
Acked-by: Jesse Gross <jesse at nicira.com>



More information about the dev mailing list