Well, I would not want to get into
religious discussions here :), but concerning 1) and 3) you have
to compile anyway your final applications, since as far as I've
seen current DPDK makefiles are only compiling static versions of
the lib.
Moreover, I don't think it is feasible to assume that the future
versions of DPDK are going to maintain the exact same headers
(APIs and data structures), basically due to the new HW supported
and additional features that DPDK is going to (hopefully) support.
So at the very end this requires a recompilation anyway. But very
likely you know more about this detail than I do, so I could be
wrong here..
Along this, I personally think that in end-user applications these
parameters (CPU_CORES, channels...) will be either compile time
constants or config file parameters, rather than arguments to the
program. At least in our case, we plan to optimize it for several
platforms and so on, but as a final application there is no need
(and it can be harmful) to expose this to the enduser. Besides,
most of the programs have already their own parameters that are
meaningful for the application.
Unless you are profiling, or simply checking SDK examples (in here
yes, it is great, this is why I think it must be kept), I think
that having such DPDK HW specific argvs is not that useful.
Concerning 2), this has a trivial solution, which is define a
static initializer and a (likely inlined) struct initalizer; e.g.
pthreads.h does:
int pthread_mutex_init(pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr);
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
In any case, for the moment I will continue faking argv's. If I
get more upset about this piece of code, I will try to implement
this call and send the patch here for discussion. At the very end,
it was only a suggestion ;)
Best
marc
On 01/08/13 18:47, Antti Kantee wrote: