On Mon, Nov 17, 2014 at 11:03:39AM +0000, Balasubramanian Manoharan wrote: > This patch moves static inlines functions in odp_packet_io.c file into header > file > This patch adds classifier object inside pktio struct > > Signed-off-by: Balasubramanian Manoharan <[email protected]> > --- > .../linux-generic/include/odp_packet_io_internal.h | 17 +++++++++++ > platform/linux-generic/odp_packet_io.c | 34 > ++++++---------------- > 2 files changed, 26 insertions(+), 25 deletions(-) > > diff --git a/platform/linux-generic/include/odp_packet_io_internal.h > b/platform/linux-generic/include/odp_packet_io_internal.h > index 23633ed..cc43cac 100644 > --- a/platform/linux-generic/include/odp_packet_io_internal.h > +++ b/platform/linux-generic/include/odp_packet_io_internal.h > @@ -20,6 +20,7 @@ extern "C" { > > #include <odp_spinlock.h> > #include <odp_packet_socket.h> > +#include <odp_classification_internal.h> > > /** > * Packet IO types > @@ -38,6 +39,7 @@ struct pktio_entry { > odp_pktio_type_t type; /**< pktio type */ > pkt_sock_t pkt_sock; /**< using socket API for IO */ > pkt_sock_mmap_t pkt_sock_mmap; /**< using socket mmap API for IO */ > + classifier_t cls; > }; > > typedef union { > @@ -45,6 +47,21 @@ typedef union { > uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(struct pktio_entry))]; > } pktio_entry_t; > > +typedef struct { > + pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES]; > +} pktio_table_t; > + > +static pktio_table_t *pktio_tbl;
Need to drop the static. As it is each file that includes the header gets a separate copy of the variable, so it's uninitialised in the classifier and packet_classifier() blows up. -- Stuart. _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
