[dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface

Dan Gora dg at adax.com
Wed Sep 12 00:07:47 CEST 2018


On Tue, Sep 11, 2018 at 6:52 PM, Stephen Hemminger
<stephen at networkplumber.org> wrote:
> The carrier state has no meaning when device is down, at least for physical
> devices. Because often the PHY is powered off when the device is marked down.

The thing that caught my attention is that when you mark a kernel
ethernet device 'down', you get a message that the link is down in the
syslog.

snappy:root:bash 2645 => ip link set down dev eth0
Sep 11 18:32:48 snappy kernel: e1000e: eth0 NIC Link is Down

With this method, that's not possible because you cannot change the
link state from the callback from kni_net_release.

The carrier state doesn't have any meaning from a data transfer point
of view, but it's often useful for being able to diagnose connectivity
issues (is my cable plugged in or not).

I'm still not really clear what the objection really is to the ioctl
method.  Is it just the number of changes?  That the kernel driver has
to change as well?  Just that there is another way to do it?

thanks
dan


More information about the dev mailing list