mbox series

[API-NEXT,0/4] Packet references as copy

Message ID 1486990410-14928-1-git-send-email-petri.savolainen@linaro.org
Headers show
Series Packet references as copy | expand

Message

Petri Savolainen Feb. 13, 2017, 12:53 p.m. UTC
Change packet references API specification to enable implementation as packet 
copy. Remove validation test cases which test for out-of-range inputs. 
Generally, results are undefined for bad or out-of-range inputs. Update 
validation tests with the API change. Greatly simplify packet reference 
implementation by reverting the previous one and adding a packet copy based 
implementation. When the first reference implementation is simple, 
performance and simplicity of the current (single reference) code base is 
mainteined. Performance of multi-reference packets can be upgraded gradually 
as long as performance and code simplicity are not sacrificed. 


Petri Savolainen (4):
  api: packet: references may be implemented as copy
  validation: packet: remove non compatible tests
  Revert "linux-generic: packet: implement reference apis"
  linux-gen: packet: implement references as copy

 include/odp/api/spec/packet.h                      |  20 +-
 .../linux-generic/include/odp_packet_internal.h    |  85 +--
 platform/linux-generic/odp_packet.c                | 614 ++++++---------------
 test/common_plat/validation/api/packet/packet.c    | 241 +++++---
 4 files changed, 359 insertions(+), 601 deletions(-)

-- 
2.8.1

Comments

Bill Fischofer Feb. 20, 2017, 9:46 p.m. UTC | #1
Based on recent discussions and plan to move forward, for this series:

Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

On Mon, Feb 13, 2017 at 6:53 AM, Petri Savolainen <
petri.savolainen@linaro.org> wrote:

> Change packet references API specification to enable implementation as

> packet

> copy. Remove validation test cases which test for out-of-range inputs.

> Generally, results are undefined for bad or out-of-range inputs. Update

> validation tests with the API change. Greatly simplify packet reference

> implementation by reverting the previous one and adding a packet copy based

> implementation. When the first reference implementation is simple,

> performance and simplicity of the current (single reference) code base is

> mainteined. Performance of multi-reference packets can be upgraded

> gradually

> as long as performance and code simplicity are not sacrificed.

>

>

> Petri Savolainen (4):

>   api: packet: references may be implemented as copy

>   validation: packet: remove non compatible tests

>   Revert "linux-generic: packet: implement reference apis"

>   linux-gen: packet: implement references as copy

>

>  include/odp/api/spec/packet.h                      |  20 +-

>  .../linux-generic/include/odp_packet_internal.h    |  85 +--

>  platform/linux-generic/odp_packet.c                | 614

> ++++++---------------

>  test/common_plat/validation/api/packet/packet.c    | 241 +++++---

>  4 files changed, 359 insertions(+), 601 deletions(-)

>

> --

> 2.8.1

>

>
Maxim Uvarov Feb. 21, 2017, 1:06 p.m. UTC | #2
one more question:

what we do with: odp_packet_has_ref() with copy variant? Now it's always
return 0.

How that will be tested with tests cases which expect there be 1?

Maxim.

On 02/21/17 00:46, Bill Fischofer wrote:
> Based on recent discussions and plan to move forward, for this series:

> 

> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> 

> On Mon, Feb 13, 2017 at 6:53 AM, Petri Savolainen <

> petri.savolainen@linaro.org> wrote:

> 

>> Change packet references API specification to enable implementation as

>> packet

>> copy. Remove validation test cases which test for out-of-range inputs.

>> Generally, results are undefined for bad or out-of-range inputs. Update

>> validation tests with the API change. Greatly simplify packet reference

>> implementation by reverting the previous one and adding a packet copy based

>> implementation. When the first reference implementation is simple,

>> performance and simplicity of the current (single reference) code base is

>> mainteined. Performance of multi-reference packets can be upgraded

>> gradually

>> as long as performance and code simplicity are not sacrificed.

>>

>>

>> Petri Savolainen (4):

>>   api: packet: references may be implemented as copy

>>   validation: packet: remove non compatible tests

>>   Revert "linux-generic: packet: implement reference apis"

>>   linux-gen: packet: implement references as copy

>>

>>  include/odp/api/spec/packet.h                      |  20 +-

>>  .../linux-generic/include/odp_packet_internal.h    |  85 +--

>>  platform/linux-generic/odp_packet.c                | 614

>> ++++++---------------

>>  test/common_plat/validation/api/packet/packet.c    | 241 +++++---

>>  4 files changed, 359 insertions(+), 601 deletions(-)

>>

>> --

>> 2.8.1

>>

>>
Bill Fischofer Feb. 21, 2017, 1:09 p.m. UTC | #3
On Tue, Feb 21, 2017 at 7:06 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> one more question:

>

> what we do with: odp_packet_has_ref() with copy variant? Now it's always

> return 0.

>

> How that will be tested with tests cases which expect there be 1?

>


As soon as Petri's pending patches are merged into master, I'll start
posting patches that start staging non-copy versions of these APIs. So
while odp_packet_has_ref() will return 0 (for now) that won't last for very
long.


>

> Maxim.

>

> On 02/21/17 00:46, Bill Fischofer wrote:

> > Based on recent discussions and plan to move forward, for this series:

> >

> > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> >

> > On Mon, Feb 13, 2017 at 6:53 AM, Petri Savolainen <

> > petri.savolainen@linaro.org> wrote:

> >

> >> Change packet references API specification to enable implementation as

> >> packet

> >> copy. Remove validation test cases which test for out-of-range inputs.

> >> Generally, results are undefined for bad or out-of-range inputs. Update

> >> validation tests with the API change. Greatly simplify packet reference

> >> implementation by reverting the previous one and adding a packet copy

> based

> >> implementation. When the first reference implementation is simple,

> >> performance and simplicity of the current (single reference) code base

> is

> >> mainteined. Performance of multi-reference packets can be upgraded

> >> gradually

> >> as long as performance and code simplicity are not sacrificed.

> >>

> >>

> >> Petri Savolainen (4):

> >>   api: packet: references may be implemented as copy

> >>   validation: packet: remove non compatible tests

> >>   Revert "linux-generic: packet: implement reference apis"

> >>   linux-gen: packet: implement references as copy

> >>

> >>  include/odp/api/spec/packet.h                      |  20 +-

> >>  .../linux-generic/include/odp_packet_internal.h    |  85 +--

> >>  platform/linux-generic/odp_packet.c                | 614

> >> ++++++---------------

> >>  test/common_plat/validation/api/packet/packet.c    | 241 +++++---

> >>  4 files changed, 359 insertions(+), 601 deletions(-)

> >>

> >> --

> >> 2.8.1

> >>

> >>

>

>
Savolainen, Petri (Nokia - FI/Espoo) Feb. 21, 2017, 1:13 p.m. UTC | #4
API and test cases were update to allow either 0 or 1. Copy returns always 0, because there's never anything shared between packets. If a reference returns 1, then the "base packet" must also return 1, since there's sharing between them.

-Petri

> -----Original Message-----

> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Maxim

> Uvarov

> Sent: Tuesday, February 21, 2017 3:07 PM

> To: lng-odp@lists.linaro.org

> Subject: Re: [lng-odp] [API-NEXT PATCH 0/4] Packet references as copy

> 

> one more question:

> 

> what we do with: odp_packet_has_ref() with copy variant? Now it's always

> return 0.

> 

> How that will be tested with tests cases which expect there be 1?

> 

> Maxim.

> 

> On 02/21/17 00:46, Bill Fischofer wrote:

> > Based on recent discussions and plan to move forward, for this series:

> >

> > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> >

> > On Mon, Feb 13, 2017 at 6:53 AM, Petri Savolainen <

> > petri.savolainen@linaro.org> wrote:

> >

> >> Change packet references API specification to enable implementation as

> >> packet

> >> copy. Remove validation test cases which test for out-of-range inputs.

> >> Generally, results are undefined for bad or out-of-range inputs. Update

> >> validation tests with the API change. Greatly simplify packet reference

> >> implementation by reverting the previous one and adding a packet copy

> based

> >> implementation. When the first reference implementation is simple,

> >> performance and simplicity of the current (single reference) code base

> is

> >> mainteined. Performance of multi-reference packets can be upgraded

> >> gradually

> >> as long as performance and code simplicity are not sacrificed.

> >>

> >>

> >> Petri Savolainen (4):

> >>   api: packet: references may be implemented as copy

> >>   validation: packet: remove non compatible tests

> >>   Revert "linux-generic: packet: implement reference apis"

> >>   linux-gen: packet: implement references as copy

> >>

> >>  include/odp/api/spec/packet.h                      |  20 +-

> >>  .../linux-generic/include/odp_packet_internal.h    |  85 +--

> >>  platform/linux-generic/odp_packet.c                | 614

> >> ++++++---------------

> >>  test/common_plat/validation/api/packet/packet.c    | 241 +++++---

> >>  4 files changed, 359 insertions(+), 601 deletions(-)

> >>

> >> --

> >> 2.8.1

> >>

> >>