Hi All, One other problem with using the sysfs method to change the link state rather than this ioctl method. The sysfs/netdev method to change the carrier was only introduced in kernel 3.9. For older kernels, we would just be out of luck. The ioctl method will work with any kernel version (2.6+). It's not clear if this is a problem for DPDK apps or not.
thanks dan On Thu, Aug 30, 2018 at 7:11 PM, Dan Gora <d...@adax.com> wrote: > On Thu, Aug 30, 2018 at 7:09 PM, Stephen Hemminger > <step...@networkplumber.org> wrote: >> On Thu, 30 Aug 2018 18:41:14 -0300 >> Dan Gora <d...@adax.com> wrote: >> >>> On the other hand, the "write to /sys" method is a bit more simple and >>> confines the changes to the user space library. If we're confident >>> that the /sys ABI is stable and not going to be changed going forward >>> it seems like a valid alternative. >> >> See Documentation/ABI/testing/sysfs-class-net > > yeah, but it's in the 'testing' directory :) > > From Documentation/ABI/README: > > testing/ > > This directory documents interfaces that are felt to be stable, > as the main development of this interface has been completed. > The interface can be changed to add new features, but the > current interface will not break by doing this, unless grave > errors or security problems are found in them. Userspace > programs can start to rely on these interfaces, but they must be > aware of changes that can occur before these interfaces move to > be marked stable. Programs that use these interfaces are > strongly encouraged to add their name to the description of > these interfaces, so that the kernel developers can easily > notify them if any changes occur (see the description of the > layout of the files below for details on how to do this.) > > Like I said, I'm ok with using this if that's what everyone wants to do. > > d -- Dan Gora Software Engineer Adax, Inc. Rua Dona Maria Alves, 1070 Casa 5 Centro Ubatuba, SP CEP 11680-000 Brasil Tel: +55 (12) 3833-1021 (Brazil and outside of US) : +1 (510) 859-4801 (Inside of US) : dan_gora (Skype) email: d...@adax.com