I should also point out that the pool min_seg_len does not mean that this
is the minimum segment size that an application can see. There are lots of
ways for segments to wind up smaller than this, but mostly as a result of
application actions (e.g., splitting a packet, creating references with
short packets, etc.)

On Mon, Jul 24, 2017 at 7:02 AM, Bill Fischofer <bill.fischo...@linaro.org>
wrote:

> An application cannot require that an ODP implementation segment packets.
> Segmentation is a feature of some implementations and the ODP concepts
> surrounding segments are there to permit application portability across
> different implementations that use segmentation.
>
> From an application standpoint, a packet consists of a sequence of bytes
> that may be made addressable to it in one or more contiguous segments.
> That's really all an application needs to know about segments. The pool
> seg_len parameter is there to allow an application to provide a hint as to
> the size of the header(s) it will be processing. The intent is that all
> headers of interest to the application should appear in the first segment
> of the packet. Implementations are free to use segment sizes larger than
> seg_len, but if they cannot provide this minimum (seg_len is specified too
> high) then the odp_pool_create() call fails.
>
> If pool_capa.max_seg_len < pool_param.pkt.len then that's an indication
> that such packets will be segmented in this implementation. The
> odp_packet_num_seg() API will tell you how many segments are contained in a
> given odp_packet_t and this is the preferred means for an application to
> get this information.
>
> On Mon, Jul 24, 2017 at 6:33 AM, shally verma <shallyvermacav...@gmail.com
> > wrote:
>
>> Resending.
>>
>> On Mon, Jul 24, 2017 at 5:01 PM, shally verma
>> <shallyvermacav...@gmail.com> wrote:
>> > Have a question regarding packet pool creation and params. As it says
>> in pool.h
>> >
>> > len = minimum length of pakcet
>> > seg_len = minimum length of 1st segment to hold packet data bytes
>> >
>> > Since it says minimum, so actual segment size used to hold packet data
>> > size may be more than this.
>> >
>> > So if I want to create a packet of length say 2K bytes with 1K segment
>> > size where num_segs = 2, is there any ways to enforce this packet
>> > structure during pool creation? Seems, it is possible only if
>> > pool_capa.max_seg_len < pool_param.pkt.len
>> >
>> > Correct me if I am wrong here.
>> >
>> > Thanks
>> > Shally
>>
>
>

Reply via email to