On 24 November 2014 at 23:44, Mike Holmes <[email protected]> wrote:

> I like extending the open to define that a NULL to odp_pktio_open()
> will return the default interface, there is then no need to add a new
> API.
>
> I am against environment variables, the implementation knows best what
> the default should be and it may have no relation to any "eth" name.
> What happens with a shared library build of ODP? Then the test can run
> against all builds without a recompile unless the ENV variable is
> used.
>
> The linux-generic example you give that has an ENV variable already is
> ok because it is an internal decision and not seen by applications or
> tests.
>
>
Yes, variable of course is not a public api. It's just hint to linux
generic implementation. Other implementations can use
other methods to define default pktio (like uboot env, config file or some
value in shared memory).
Idea is to have app the same for all platforms.

Maxim.



>
> On 24 November 2014 13:27, Maxim Uvarov <[email protected]> wrote:
> > Hello,
> >
> > Can we go odp_pktio_open() return default interface provided by
> > implementation?
> >
> > For linux-generic we already have environment variables to select between
> > mmap and raw sockets.
> > Also we can add hint what is default interface name.
> >
> > Like:
> > export ODP_PKIO_DEFAULT_DEV="eth0"
> >
> > And if this variable is not exported it might be eth0, eth1, then eth2.
> Or
> > first device found in list returned by ioctl.
> >
> > Reason is to add to CUNIT tests coverage for functions which need pktio.
> >
> > Maxim.
> >
> > _______________________________________________
> > lng-odp mailing list
> > [email protected]
> > http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
> --
> Mike Holmes
> Linaro  Sr Technical Manager
> LNG - ODP
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to