mbox

[v2,0/5] kni: add API to set link status on kernel interface

Message ID 20180919195549.5585-1-dg@adax.com (mailing list archive)
Headers

Message

Dan Gora Sept. 19, 2018, 7:55 p.m. UTC
Hi All,

Attached is version 2 of a patchset to add a new API function to
set the link status on kernel interfaces created with the KNI kernel
module.

-dan

v2
====

* Fix bug where "Fixed" and "AutoNeg" were transposed in the link
  status log message.

* Add rte_kni_update_link() to rte_kni_version.map

* Add rte_kni_update_link() tests to kni_autotest

* Update examples/kni to continuously monitor link status and
  update the corresponding kernel interface with
  rte_kni_update_link().

* Minor improvements to examples/kni: Add log message showing how
  to show/zero stats.  Improve zeroing statistics.

Note that checkpatches.sh compains about patch 1/5, but this appears
to be a bug with check-symbol-change or something.  If I move the
fragment of the patch modifying rte_kni_version.map to the bottom of
the patch file, it doesn't complain any more...  I just don't really
have time to investigate this right now.

thanks
dan

> Hi All,
> 
> The following patches are to add support for DPDK applications to be
> able to change the carrier state of Linux network interfaces in the
> KNI kernel module.
> 
> The carrier state is changed by writing to the Linux /sys file:
> /sys/devices/virtual/net/<name>/carrier, where <name> is the KNI
> interface name.
> 
> These patches supercede:
> '[PATCH v2 10/10] kni: add API to set link status on kernel interface'
> https://mails.dpdk.org/archives/dev/2018-August/110383.html


Dan Gora (5):
  kni: add API to set link status on kernel interface
  kni: set default carrier state to 'off'
  examples/kni: monitor and update link status continually
  examples/kni: add log msgs to show and clear stats
  examples/kni: improve zeroing statistics

 examples/kni/Makefile              |   2 +
 examples/kni/main.c                | 104 ++++++++++++++++-------------
 kernel/linux/kni/kni_misc.c        |   2 +
 kernel/linux/kni/kni_net.c         |   2 +
 lib/librte_kni/rte_kni.c           |  57 ++++++++++++++++
 lib/librte_kni/rte_kni.h           |  18 +++++
 lib/librte_kni/rte_kni_version.map |   6 ++
 test/test/test_kni.c               | 100 ++++++++++++++++++++++++++-
 8 files changed, 244 insertions(+), 47 deletions(-)