Re: [lng-odp] odp_packet API queries

2015-01-20 Thread Jerin Jacob
On Mon, Jan 19, 2015 at 10:17:22AM -0600, Bill Fischofer wrote: On Mon, Jan 19, 2015 at 10:00 AM, Jerin Jacob jerin.ja...@caviumnetworks.com wrote: On Mon, Jan 19, 2015 at 09:26:08AM -0600, Bill Fischofer wrote: On Mon, Jan 19, 2015 at 7:22 AM, Jerin Jacob

Re: [lng-odp] odp_packet API queries

2015-01-20 Thread Bill Fischofer
It's an implementation decision as to how to store metadata. Some implementations may choose to store it in hidden buffer prefixes or suffixes while others may choose to store it elsewhere. The linux-generic implementation is an example of the latter. The reason for doing it this way is that

Re: [lng-odp] odp_packet API queries

2015-01-19 Thread Jerin Jacob
On Mon, Jan 19, 2015 at 06:09:34AM -0600, Bill Fischofer wrote: I think Petri should weigh in on these questions. For the first one, what problems do you anticipate some platforms having with that equation? I have two issues around the unit test case, 1) packet_len =

Re: [lng-odp] odp_packet API queries

2015-01-19 Thread Bill Fischofer
On Mon, Jan 19, 2015 at 10:00 AM, Jerin Jacob jerin.ja...@caviumnetworks.com wrote: On Mon, Jan 19, 2015 at 09:26:08AM -0600, Bill Fischofer wrote: On Mon, Jan 19, 2015 at 7:22 AM, Jerin Jacob jerin.ja...@caviumnetworks.com wrote: On Mon, Jan 19, 2015 at 06:09:34AM -0600, Bill

Re: [lng-odp] odp_packet API queries

2015-01-19 Thread Jerin Jacob
On Mon, Jan 19, 2015 at 09:26:08AM -0600, Bill Fischofer wrote: On Mon, Jan 19, 2015 at 7:22 AM, Jerin Jacob jerin.ja...@caviumnetworks.com wrote: On Mon, Jan 19, 2015 at 06:09:34AM -0600, Bill Fischofer wrote: I think Petri should weigh in on these questions. For the first one, what

Re: [lng-odp] odp_packet API queries

2015-01-19 Thread Bill Fischofer
On Mon, Jan 19, 2015 at 7:22 AM, Jerin Jacob jerin.ja...@caviumnetworks.com wrote: On Mon, Jan 19, 2015 at 06:09:34AM -0600, Bill Fischofer wrote: I think Petri should weigh in on these questions. For the first one, what problems do you anticipate some platforms having with that equation?

Re: [lng-odp] odp_packet API queries

2015-01-19 Thread Bill Fischofer
I think Petri should weigh in on these questions. For the first one, what problems do you anticipate some platforms having with that equation? I think the cleanest solution would be to have the platform segment size for a given pool accessible as pool metadata, e.g., odp_pool_seg_size(pool), but

Re: [lng-odp] odp_packet API queries

2015-01-19 Thread Jerin Jacob
On Sat, Jan 17, 2015 at 09:45:12AM -0600, Bill Fischofer wrote: Application-visible sizes refer to application-visible data. Metadata is always implementation-specific and not included in such counts. Metadata is off books data that is associated with the packet but is not part of any

[lng-odp] odp_packet API queries

2015-01-17 Thread Jacob, Jerin
Some odp_packet API queries based on exiting odp packet unit test case, 1) In exiting odp packet unit test case, In order to create one full length packet in one segment, We have used following formula, packet_len = ODP_CONFIG_PACKET_BUF_LEN_MIN - ODP_CONFIG_PACKET_HEADROOM -

Re: [lng-odp] odp_packet API queries

2015-01-17 Thread Bill Fischofer
Application-visible sizes refer to application-visible data. Metadata is always implementation-specific and not included in such counts. Metadata is off books data that is associated with the packet but is not part of any addressable packet storage. The advantage of having a packet object is