[dpdk-dev] [PATCH] table: fix build error with gcc 8

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Mon Apr 9 19:26:57 CEST 2018


> >
> > If people think that this function conversion is not nice, it can be reworked
> in multiple ways at the expense of API (but not ABI) change:
> > 1. Define the hash function field in the table parameter structure as
> opaque void * rather than 4-parameter version.
> > 2. Create a separate parameter structure just for this hash table type.
> 
> Why just not define your f_hash member as a union:
> 
> struct rte_table_hash_params {
> ...
> union {
>     rte_table_hash_op_hash  f_hash_4params;
>     rte_hash_function f_hash_3_params;
> };
> 
> ?
> 

Yes, agreed, this is yet another way to handle this, thanks Konstantin.


More information about the dev mailing list