On 10/09/2015 02:59 PM, Maxim Uvarov wrote:
> Add api for packet reference count support. Which is useful in case:
>  - multicast support
>  - TCP retransmission
>  - traffic generator
>
> Introduced new call: newpkt = odp_packet_create_ref(pkt) which creates
> reference to original packet, but handles for reference packet and original
> are different.
"May" be different  more than "are". But not a big deal as only in the commit 
message.

>
> Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>
> ---
>  include/odp/api/config.h | 5 +++++
>  include/odp/api/packet.h | 9 +++++++++
>  2 files changed, 14 insertions(+)
>
> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
> index 295b10d..985290a 100644
> --- a/include/odp/api/config.h
> +++ b/include/odp/api/config.h
> @@ -126,6 +126,11 @@ extern "C" {
>   */
>  #define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_SEG_LEN_MIN*6)
>  
> +/**
> + * Maximum packet references.
> + */
> +#define ODP_CONFIG_PACKET_REFS 2
> +
>  /** Maximum number of shared memory blocks.
>   *
>   * This the the number of separate SHM areas that can be reserved 
> concurrently
> diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h
> index 5d46b7b..f9745fb 100644
> --- a/include/odp/api/packet.h
> +++ b/include/odp/api/packet.h
> @@ -125,6 +125,15 @@ odp_packet_t odp_packet_from_event(odp_event_t ev);
>   */
>  odp_event_t odp_packet_to_event(odp_packet_t pkt);
>  
> +/**
> + * Create reference for packet handle
> + *
> + * @param pkt  Packet handle
> + *
> + * @return New packet handle
> + */
> +odp_packet_t odp_packet_create_ref(odp_packet_t pkt);
> +
>  /*
>   *
>   * Pointers and lengths

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to