On Wed, Jul 19, 2017 at 7:51 AM, Ilya Maximets <i.maxim...@samsung.com> wrote:
> This allows to compose packets with different real lenghts from
> odp flows i.e. memory will be allocated for requested packet
> size and all required headers like ip->tot_len filled correctly.
>
> Will be used in netdev-dummy to properly handle '--len' option.
>
> Signed-off-by: Ilya Maximets <i.maxim...@samsung.com>

Thank you for working on this.  Although those functions are mainly
for testing, it is still good that we improve them.

I am wondering about a slightly different approach. Instead of adding
'packet_size' to the flow_compose() interface, would it make
sense to come up with a new function whose task is to
expand a packet to the final length, (similar to flow_compose_l4_csum())

We would first create the necessary headers for all layers based on
flow, without fill in the actual size related field or compute checksums.

Then the fix size function will take over, fill in data, and
update various headers.

Then checksums can be computed and filled in.

I think the logics will be easier to follow with this approach. What
do you think?
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to