On Wed, 29 Aug 2018 18:02:06 -0300 Dan Gora <d...@adax.com> wrote: > On Wed, Aug 29, 2018 at 12:54 PM, Stephen Hemminger > <step...@networkplumber.org> wrote: > > On Thu, 28 Jun 2018 18:55:08 -0700 > > Dan Gora <d...@adax.com> wrote: > > > >> Add a new API function to KNI, rte_kni_update_link() to allow DPDK > >> applications to update the link state for the KNI network interfaces > >> in the linux kernel. > >> > >> Note that the default carrier state is set to off when the interface > >> is opened. > >> > >> Signed-off-by: Dan Gora <d...@adax.com> > > > > Do you really need a special ioctl for this? > > There is already ability to set link state via sysfs or netlink. > > I think yes.. AFAIK sysfs does not constitute a stable API;
It is a stable API on Linux. > it's only > available for Linux (yes, I know KNI is linux-only currently, but > there's not really any technical reason why it can't work on BSD) and > there are already callbacks to change the MTU and MAC addresses which > could also be done via netlink. IMHO having the kernel have an > accurate view of the link state is more important than the ability to > change the MAC address of the interface... The device model on BSD is significantly different than Linux. Doing KNI on BSD is going to be a full rewrite of the driver anyway; I won't worry about sysfs, dependency. The important part is that if KNI is ever going to be supportable it needs to be upstream in Linux, not a bolt on out of tree driver. Most Enterprise distributions will not support out of tree drivers for good reasons.