diff mbox

linux-gen: pktio: ipc: remove todos

Message ID 1473349980-6480-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit a8e5a8f6853ddc998430d112c22994928ddb4070
Headers show

Commit Message

Maxim Uvarov Sept. 8, 2016, 3:53 p.m. UTC
Remove todo around copying packet data from
shared pool as it's not a bug and can be
considered as future request. But left small
comment that we coping packet data to make
it more  visible.
https://bugs.linaro.org/show_bug.cgi?id=2408

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 platform/linux-generic/pktio/ipc.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

-- 
2.7.1.250.gff4ea60

Comments

Mike Holmes Sept. 12, 2016, 6:11 p.m. UTC | #1
On 8 September 2016 at 11:53, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Remove todo around copying packet data from

> shared pool as it's not a bug and can be

> considered as future request. But left small

> comment that we coping packet data to make

> it more  visible.

> https://bugs.linaro.org/show_bug.cgi?id=2408

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>


I think this is reasonable, if someone starts to use this I assume we will
get patches to remove the copy becasue the performance will suffer.

Reviewed-by: Mike Holmes <mike.holmes@linaro.org>




> ---

>  platform/linux-generic/pktio/ipc.c | 7 +------

>  1 file changed, 1 insertion(+), 6 deletions(-)

>

> diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/

> pktio/ipc.c

> index b779ab7..c1f28db 100644

> --- a/platform/linux-generic/pktio/ipc.c

> +++ b/platform/linux-generic/pktio/ipc.c

> @@ -373,11 +373,6 @@ static int _ipc_slave_start(pktio_entry_t

> *pktio_entry)

>                                              pinfo->master.mdata_offset;

>         pktio_entry->s.ipc.pkt_size = pinfo->master.shm_pkt_size;

>

> -       /* @todo: to simplify in odp-linux implementation we create pool

> for

> -        * packets from IPC queue. On receive implementation copies

> packets to

> -        * that pool. Later we can try to reuse original pool without

> packets

> -        * copying. (pkt refcounts needs to be implemented).

> -        */

>         _ipc_export_pool(pinfo, pktio_entry->s.ipc.pool);

>

>         odp_atomic_store_u32(&pktio_entry->s.ipc.ready, 1);

> @@ -573,7 +568,7 @@ static int ipc_pktio_recv_lockless(pktio_entry_t

> *pktio_entry,

>                                   (PKTIO_TYPE_IPC_SLAVE ==

>                                         pktio_entry->s.ipc.type));

>

> -               /* @todo fix copy packet!!! */

> +               /* Copy packet data from shared pool to local pool. */

>                 memcpy(pkt_data, remote_pkt_data, phdr.frame_len);

>

>                 /* Copy packets L2, L3 parsed offsets and size */

> --

> 2.7.1.250.gff4ea60

>

>



-- 
Mike Holmes
Program Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Maxim Uvarov Oct. 4, 2016, 3:58 p.m. UTC | #2
Merged,
Maxim.

On 09/12/16 21:11, Mike Holmes wrote:
>

>

> On 8 September 2016 at 11:53, Maxim Uvarov <maxim.uvarov@linaro.org 

> <mailto:maxim.uvarov@linaro.org>> wrote:

>

>     Remove todo around copying packet data from

>     shared pool as it's not a bug and can be

>     considered as future request. But left small

>     comment that we coping packet data to make

>     it more  visible.

>     https://bugs.linaro.org/show_bug.cgi?id=2408

>     <https://bugs.linaro.org/show_bug.cgi?id=2408>

>

>     Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org

>     <mailto:maxim.uvarov@linaro.org>>

>

>

> I think this is reasonable, if someone starts to use this I assume we 

> will get patches to remove the copy becasue the performance will suffer.

>

> Reviewed-by: Mike Holmes <mike.holmes@linaro.org 

> <mailto:mike.holmes@linaro.org>>

>

>     ---

>      platform/linux-generic/pktio/ipc.c | 7 +------

>      1 file changed, 1 insertion(+), 6 deletions(-)

>

>     diff --git a/platform/linux-generic/pktio/ipc.c

>     b/platform/linux-generic/pktio/ipc.c

>     index b779ab7..c1f28db 100644

>     --- a/platform/linux-generic/pktio/ipc.c

>     +++ b/platform/linux-generic/pktio/ipc.c

>     @@ -373,11 +373,6 @@ static int _ipc_slave_start(pktio_entry_t

>     *pktio_entry)

>      pinfo->master.mdata_offset;

>             pktio_entry->s.ipc.pkt_size = pinfo->master.shm_pkt_size;

>

>     -       /* @todo: to simplify in odp-linux implementation we

>     create pool for

>     -        * packets from IPC queue. On receive implementation

>     copies packets to

>     -        * that pool. Later we can try to reuse original pool

>     without packets

>     -        * copying. (pkt refcounts needs to be implemented).

>     -        */

>             _ipc_export_pool(pinfo, pktio_entry->s.ipc.pool);

>

>             odp_atomic_store_u32(&pktio_entry->s.ipc.ready, 1);

>     @@ -573,7 +568,7 @@ static int

>     ipc_pktio_recv_lockless(pktio_entry_t *pktio_entry,

>                                       (PKTIO_TYPE_IPC_SLAVE ==

>     pktio_entry->s.ipc.type));

>

>     -               /* @todo fix copy packet!!! */

>     +               /* Copy packet data from shared pool to local pool. */

>                     memcpy(pkt_data, remote_pkt_data, phdr.frame_len);

>

>                     /* Copy packets L2, L3 parsed offsets and size */

>     --

>     2.7.1.250.gff4ea60

>

>

>

>

> -- 

> Mike Holmes

> Program Manager - Linaro Networking Group

> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs

> "Work should be fun and collaborative, the rest follows"

>
diff mbox

Patch

diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c
index b779ab7..c1f28db 100644
--- a/platform/linux-generic/pktio/ipc.c
+++ b/platform/linux-generic/pktio/ipc.c
@@ -373,11 +373,6 @@  static int _ipc_slave_start(pktio_entry_t *pktio_entry)
 					     pinfo->master.mdata_offset;
 	pktio_entry->s.ipc.pkt_size = pinfo->master.shm_pkt_size;
 
-	/* @todo: to simplify in odp-linux implementation we create pool for
-	 * packets from IPC queue. On receive implementation copies packets to
-	 * that pool. Later we can try to reuse original pool without packets
-	 * copying. (pkt refcounts needs to be implemented).
-	 */
 	_ipc_export_pool(pinfo, pktio_entry->s.ipc.pool);
 
 	odp_atomic_store_u32(&pktio_entry->s.ipc.ready, 1);
@@ -573,7 +568,7 @@  static int ipc_pktio_recv_lockless(pktio_entry_t *pktio_entry,
 				  (PKTIO_TYPE_IPC_SLAVE ==
 					pktio_entry->s.ipc.type));
 
-		/* @todo fix copy packet!!! */
+		/* Copy packet data from shared pool to local pool. */
 		memcpy(pkt_data, remote_pkt_data, phdr.frame_len);
 
 		/* Copy packets L2, L3 parsed offsets and size */