And what about this first question:

Should _odp_packet_copy_md_to_packet() copy timestamp and op_result?

On 07/06/16 13:03, Bill Fischofer wrote:
Sounds like this should be considered a bug. I'll open one to track it.

On Tue, Jun 7, 2016 at 2:18 AM, Savolainen, Petri (Nokia - FI/Espoo)
<[email protected] <mailto:[email protected]>> wrote:

    /**
      * Full copy of a packet
      *
      * Create a new copy of the packet. The new packet is exact copy of
    the source
      * packet (incl. data and metadata). The pool must have been
    created with
      * ODP_POOL_PACKET type.
      *

    All metadata should be copied into the new packet. User controls
    user_area sizes in dst and src pools and should take care that dst
    pool has always at least as much user area as the src pool (when
    packets will be copied between those pools). This is no different
    from the actual packet data, everything will be copied as long as
    the dst pool can store as large packets as the src pool.

    The function just fails if copy cannot be performed (all packet data
    or metadata cannot be stored into dst pool).

    -Petri



    From: Bill Fischofer [mailto:[email protected]
    <mailto:[email protected]>]
    Sent: Monday, June 06, 2016 10:53 PM
    To: Zoltan Kiss <[email protected] <mailto:[email protected]>>
    Cc: lng-odp <[email protected]
    <mailto:[email protected]>>; Savolainen, Petri (Nokia -
    FI/Espoo) <[email protected]
    <mailto:[email protected]>>
    Subject: Re: packet copy questions

    The user area is explicitly reserved for use by the application. As
    a result any copying or other manipulation of it is the
    application's responsibility. The exception to this is ODP APIs that
    implicitly make a new copy of a source packet (e.g., in response to
    odp_packet_add_data() reallocating the packet) since the
    reallocation is transparent to the application.

    For the specific case of odp_packet_copy(), the reason why there is
    no implied copy of the user area is that odp_packet_copy() allows
    copies to be made in another pool and each pool may independently
    specify the size of any user area associated with packets allocated
    from it. So it's up to the application to decide what is appropriate
    in this case.

    On Mon, Jun 6, 2016 at 2:35 PM, Zoltan Kiss <[email protected]
    <mailto:[email protected]>> wrote:
    Hi,

    During the ODP-DPDK 1.10 upgrade I found these two things:

    - Should _odp_packet_copy_md_to_packet() copy timestamp and op_result?
    - odp_packet_copy() doesn't copy the user area. I think it would be
    better if it just calls _odp_packet_copy_md_to_packet()

    Regards,

    Zoltan


_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to