Hi,
On 02/11/15 10:25, Maxim Uvarov wrote:
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h
b/platform/linux-generic/include/odp_packet_io_internal.h
index 4745bd5..4432cfc 100644
--- a/platform/linux-generic/include/odp_packet_io_internal.h
+++ b/platform/linux-generic/include/odp_packet_io_internal.h
@@ -94,6 +94,7 @@ typedef struct {
} pktio_table_t;
typedef struct pktio_if_ops {
+ const char *name;
int (*init)(void);
int (*term)(void);
int (*open)(odp_pktio_t pktio, pktio_entry_t *pktio_entry,
This struct includes only function pointers, so it could be cleaner to
use something like:
const char *(*type_string)(void);
I think it's better to name it just info_str:
const char *(*info_str)(void);
I don't think it would be cleaner: I just want a simple string which
contains the name of the instance, not a function pointer which returns
a string.
And I don't see any reason why the fact there are only function pointers
in the struct at the moment means we shouldn't change that. I saw a lot
of other places in different project where they used a const char array
to store some kind of name for the instance of that struct. See 'git
grep "const char.*name;"' in ODP as well.
Zoli
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp