mbox series

[0/3] Change buffer handle to pointer

Message ID 20170707133219.1611-1-petri.savolainen@linaro.org
Headers show
Series Change buffer handle to pointer | expand

Message

Petri Savolainen July 7, 2017, 1:32 p.m. UTC
Change buffer (event, timeout) handle to odp_buffer_hdr_t pointer. Packet 
handle is already a pointer. This removes need for many conversions as handle 
arrays may used directly.

All 'make check' tests pass except pktio_ipc. This can be verified by disabling 
the IPC test.

test/linux-generic/Makefile.am
# TESTS += pktio_ipc/pktio_ipc_run.sh
# SUBDIRS += pktio_ipc

L2fwd packet rate (odp-linux / pktio:dpdk) improves about 3%.

Petri Savolainen (3):
  linux-gen: buffer: change buffer handle to pointer
  linux-gen: queue: avoid extra conversions
  linux-gen: pool: avoid extra conversions

 include/odp/arch/default/api/abi/buffer.h          |   7 +-
 include/odp/arch/default/api/abi/event.h           |   2 +-
 .../include/odp/api/plat/buffer_types.h            |   6 +-
 .../include/odp/api/plat/event_types.h             |   2 +-
 .../include/odp/api/plat/timer_types.h             |   2 +-
 .../linux-generic/include/odp_buffer_inlines.h     |   4 +-
 .../linux-generic/include/odp_buffer_internal.h    |  23 ++--
 .../linux-generic/include/odp_packet_internal.h    |   5 +-
 platform/linux-generic/include/odp_pool_internal.h |  35 +-----
 platform/linux-generic/odp_buffer.c                |   4 +-
 platform/linux-generic/odp_packet.c                | 105 +++++++++---------
 platform/linux-generic/odp_pool.c                  | 123 ++++++++++-----------
 platform/linux-generic/odp_queue.c                 |  61 +++-------
 platform/linux-generic/odp_traffic_mngr.c          |   2 +-
 platform/linux-generic/pktio/ipc.c                 |  11 +-
 15 files changed, 151 insertions(+), 241 deletions(-)

-- 
2.13.0

Comments

Savolainen, Petri (Nokia - FI/Espoo) July 13, 2017, 8:39 a.m. UTC | #1
Ping. It seems that Bill review didn't make it to the list.

IPC test problems I did found out during the development are now confirmed on current master, and thus are not related to this set.



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

> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

> Sent: Friday, July 07, 2017 7:18 PM

> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia.com>

> Cc: Maxim Uvarov <maxim.uvarov@linaro.org>

> Subject: Re: [lng-odp] [PATCH 0/3] Change buffer handle to pointer

> 

> For this series:

> 

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

>
Bill Fischofer July 13, 2017, 12:17 p.m. UTC | #2
Sorry, reposting my previous review:

For this series:

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

Thanks, Petri. IPC has a known issue[1] that is causing it to do
duplicate buffer frees. The zero-copy packet refs code exposes this
because of the introduction of explicit reference counts that flag
these, and I haven't posted that pull request pending resolution of
this issue. I suspect changing ODP_BUFFER_INVALID to NULL is doing
something similar as I too noticed segfaults in pktio_ipc after
applying the first part of this series.

Maxim has been working to debug this and hopefully this will help to
root cause the issue.

---
[1] https://bugs.linaro.org/show_bug.cgi?id=3026

On Thu, Jul 13, 2017 at 3:39 AM, Savolainen, Petri (Nokia - FI/Espoo)
<petri.savolainen@nokia.com> wrote:
> Ping. It seems that Bill review didn't make it to the list.

>

> IPC test problems I did found out during the development are now confirmed on current master, and thus are not related to this set.

>

>

>

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

>> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

>> Sent: Friday, July 07, 2017 7:18 PM

>> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia.com>

>> Cc: Maxim Uvarov <maxim.uvarov@linaro.org>

>> Subject: Re: [lng-odp] [PATCH 0/3] Change buffer handle to pointer

>>

>> For this series:

>>

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

>>

>

>
Savolainen, Petri (Nokia - FI/Espoo) July 13, 2017, 1 p.m. UTC | #3
> -----Original Message-----

> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

> Sent: Thursday, July 13, 2017 3:18 PM

> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia.com>

> Cc: Maxim Uvarov <maxim.uvarov@linaro.org>; lng-odp@lists.linaro.org

> Subject: Re: [lng-odp] [PATCH 0/3] Change buffer handle to pointer

> 

> Sorry, reposting my previous review:

> 

> For this series:

> 

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



I did send v2, which is just a rebase on top of the current master. Patch 2/3 had a conflict.

-Petri