diff mbox

linux-generic: packet_io: expose pktio_tbl and is_free()

Message ID 1453314593-6773-1-git-send-email-zoltan.kiss@linaro.org
State Accepted
Commit 9addb9e61e10b336a1ceace56b182209b6056b34
Headers show

Commit Message

Zoltan Kiss Jan. 20, 2016, 6:29 p.m. UTC
The table and the accessor would be used by ODP-DPDK, when it scans
through all the pktio interfaces to flush out TX completed buffers.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 platform/linux-generic/include/odp_packet_io_internal.h | 2 ++
 platform/linux-generic/odp_packet_io.c                  | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Zoltan Kiss Jan. 22, 2016, 5 p.m. UTC | #1
Ping!

On 20/01/16 18:29, Zoltan Kiss wrote:
> The table and the accessor would be used by ODP-DPDK, when it scans
> through all the pktio interfaces to flush out TX completed buffers.
>
> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
> ---
>   platform/linux-generic/include/odp_packet_io_internal.h | 2 ++
>   platform/linux-generic/odp_packet_io.c                  | 4 ++--
>   2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h
> index 84bee1e..3ab0bc8 100644
> --- a/platform/linux-generic/include/odp_packet_io_internal.h
> +++ b/platform/linux-generic/include/odp_packet_io_internal.h
> @@ -104,6 +104,8 @@ typedef struct {
>   	pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES];
>   } pktio_table_t;
>
> +int is_free(pktio_entry_t *entry);
> +
>   typedef struct pktio_if_ops {
>   	int (*init)(void);
>   	int (*term)(void);
> diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
> index 908f9a4..cda1900 100644
> --- a/platform/linux-generic/odp_packet_io.c
> +++ b/platform/linux-generic/odp_packet_io.c
> @@ -25,7 +25,7 @@
>   #include <ifaddrs.h>
>   #include <errno.h>
>
> -static pktio_table_t *pktio_tbl;
> +pktio_table_t *pktio_tbl;
>
>   /* pktio pointer entries ( for inlines) */
>   void *pktio_entry_ptr[ODP_CONFIG_PKTIO_ENTRIES];
> @@ -90,7 +90,7 @@ int odp_pktio_init_local(void)
>   	return 0;
>   }
>
> -static int is_free(pktio_entry_t *entry)
> +int is_free(pktio_entry_t *entry)
>   {
>   	return (entry->s.taken == 0);
>   }
>
Stuart Haslam Jan. 22, 2016, 5:15 p.m. UTC | #2
On Wed, Jan 20, 2016 at 06:29:53PM +0000, Zoltan Kiss wrote:
> The table and the accessor would be used by ODP-DPDK, when it scans
> through all the pktio interfaces to flush out TX completed buffers.
> 
> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>

Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>

> ---
>  platform/linux-generic/include/odp_packet_io_internal.h | 2 ++
>  platform/linux-generic/odp_packet_io.c                  | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h
> index 84bee1e..3ab0bc8 100644
> --- a/platform/linux-generic/include/odp_packet_io_internal.h
> +++ b/platform/linux-generic/include/odp_packet_io_internal.h
> @@ -104,6 +104,8 @@ typedef struct {
>  	pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES];
>  } pktio_table_t;
>  
> +int is_free(pktio_entry_t *entry);
> +
>  typedef struct pktio_if_ops {
>  	int (*init)(void);
>  	int (*term)(void);
> diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
> index 908f9a4..cda1900 100644
> --- a/platform/linux-generic/odp_packet_io.c
> +++ b/platform/linux-generic/odp_packet_io.c
> @@ -25,7 +25,7 @@
>  #include <ifaddrs.h>
>  #include <errno.h>
>  
> -static pktio_table_t *pktio_tbl;
> +pktio_table_t *pktio_tbl;
>  
>  /* pktio pointer entries ( for inlines) */
>  void *pktio_entry_ptr[ODP_CONFIG_PKTIO_ENTRIES];
> @@ -90,7 +90,7 @@ int odp_pktio_init_local(void)
>  	return 0;
>  }
>  
> -static int is_free(pktio_entry_t *entry)
> +int is_free(pktio_entry_t *entry)
>  {
>  	return (entry->s.taken == 0);
>  }
> -- 
> 1.9.1
>
Maxim Uvarov Jan. 25, 2016, 11:46 a.m. UTC | #3
Merged,
Maxim.

On 01/22/2016 20:15, Stuart Haslam wrote:
> On Wed, Jan 20, 2016 at 06:29:53PM +0000, Zoltan Kiss wrote:
>> The table and the accessor would be used by ODP-DPDK, when it scans
>> through all the pktio interfaces to flush out TX completed buffers.
>>
>> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
>
>> ---
>>   platform/linux-generic/include/odp_packet_io_internal.h | 2 ++
>>   platform/linux-generic/odp_packet_io.c                  | 4 ++--
>>   2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h
>> index 84bee1e..3ab0bc8 100644
>> --- a/platform/linux-generic/include/odp_packet_io_internal.h
>> +++ b/platform/linux-generic/include/odp_packet_io_internal.h
>> @@ -104,6 +104,8 @@ typedef struct {
>>   	pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES];
>>   } pktio_table_t;
>>   
>> +int is_free(pktio_entry_t *entry);
>> +
>>   typedef struct pktio_if_ops {
>>   	int (*init)(void);
>>   	int (*term)(void);
>> diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
>> index 908f9a4..cda1900 100644
>> --- a/platform/linux-generic/odp_packet_io.c
>> +++ b/platform/linux-generic/odp_packet_io.c
>> @@ -25,7 +25,7 @@
>>   #include <ifaddrs.h>
>>   #include <errno.h>
>>   
>> -static pktio_table_t *pktio_tbl;
>> +pktio_table_t *pktio_tbl;
>>   
>>   /* pktio pointer entries ( for inlines) */
>>   void *pktio_entry_ptr[ODP_CONFIG_PKTIO_ENTRIES];
>> @@ -90,7 +90,7 @@ int odp_pktio_init_local(void)
>>   	return 0;
>>   }
>>   
>> -static int is_free(pktio_entry_t *entry)
>> +int is_free(pktio_entry_t *entry)
>>   {
>>   	return (entry->s.taken == 0);
>>   }
>> -- 
>> 1.9.1
>>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h
index 84bee1e..3ab0bc8 100644
--- a/platform/linux-generic/include/odp_packet_io_internal.h
+++ b/platform/linux-generic/include/odp_packet_io_internal.h
@@ -104,6 +104,8 @@  typedef struct {
 	pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES];
 } pktio_table_t;
 
+int is_free(pktio_entry_t *entry);
+
 typedef struct pktio_if_ops {
 	int (*init)(void);
 	int (*term)(void);
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 908f9a4..cda1900 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -25,7 +25,7 @@ 
 #include <ifaddrs.h>
 #include <errno.h>
 
-static pktio_table_t *pktio_tbl;
+pktio_table_t *pktio_tbl;
 
 /* pktio pointer entries ( for inlines) */
 void *pktio_entry_ptr[ODP_CONFIG_PKTIO_ENTRIES];
@@ -90,7 +90,7 @@  int odp_pktio_init_local(void)
 	return 0;
 }
 
-static int is_free(pktio_entry_t *entry)
+int is_free(pktio_entry_t *entry)
 {
 	return (entry->s.taken == 0);
 }