Skip to content

kni: Interface detach and link status fixes.

Dan Gora dpdk-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10kni: remove unused variables from struct kni_devkernel/linux/kni/kni_dev.h+0 -40 replies
2/10kni: separate releasing netdev from freeing KNI interfacekernel/linux/kni/kni_misc.c lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h+58 -120 replies
3/10kni: don't touch struct kni_dev after freeingkernel/linux/kni/kni_dev.h kernel/linux/kni/kni_misc.c+26 -30 replies
4/10kni: add rte_kni_free to KNI librarylib/librte_kni/rte_kni.c lib/librte_kni/rte_kni.h+56 -70 replies
5/10kni: don't run rte_kni_handle_request after interface releaselib/librte_kni/rte_kni.c lib/librte_kni/rte_kni.h+9 -10 replies
6/10kni: increase length of timeout for KNI responseskernel/linux/kni/kni_net.c+3 -20 replies
7/10kni: update kni test for rte_kni_freetest/test/test_kni.c+20 -00 replies
8/10kni: add rte_kni_free to KNI example appexamples/kni/main.c+3 -10 replies
9/10kni: add rte_kni_free to KNI vdev driverdrivers/net/kni/rte_eth_kni.c+4 -20 replies
10/10kni: add API to set link status on kernel interfacekernel/linux/kni/kni_misc.c kernel/linux/kni/kni_net.c lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +2 more+136 -10 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFerruh Yigit
SeriesA-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] kni: Interface detach and link status fixes.

Hi All,

The following patches are to fix a problem with detaching a KNI interface using rte_kni_release and to add a new API function to allow users to change the link status (up/down, speed, etc) of the interface in the linux kernel. In previous versions, it was impossible to release a KNI interface without waiting for the timeout in kni_net_process_request to expire if the interface is in the UP state. The solution to this issue was to separate the process of releasing the netdev device from the linux kernel from actually freeing the KNI interface in the kernel and in the RTE library by introducing a new API function, rte_kni_free().

The last patch : 'kni: add API to set link status on kernel interface' adds a new API function to allow the DPDK user to change the link speed and status reported by the netdev in the linux kernel.

This resolves issues with allowing automatic network configuration applciations such as NetworkManager to assign addresses and for user space applications to be able to open sockets on these interfaces, as some operations rely on the link status being up before they work properly.

This last patch is included in this series because both new "features" introduce new ioctls to the rte_kni kernel module, so the order in which the patches get applied affects which number each new ioctl gets. I thought it better to bundle them together to try to get them applied as a series to avoid any issues with this.

Please have a look!

thanks
dan

Dan Gora (10):
kni: remove unused variables from struct kni_dev
kni: separate releasing netdev from freeing KNI interface
kni: don't touch struct kni_dev after freeing
kni: add rte_kni_free to KNI library
kni: don't run rte_kni_handle_request after interface release
kni: increase length of timeout for KNI responses
kni: update kni test for rte_kni_free
kni: add rte_kni_free to KNI example app
kni: add rte_kni_free to KNI vdev driver
kni: add API to set link status on kernel interface

 drivers/net/kni/rte_eth_kni.c                 |   6 +-
 examples/kni/main.c                           |   4 +-
 kernel/linux/kni/kni_dev.h                    |   5 +-
 kernel/linux/kni/kni_misc.c                   | 156 ++++++++++++++++--
 kernel/linux/kni/kni_net.c                    |   7 +-
 .../eal/include/exec-env/rte_kni_common.h     |  20 +++
 lib/librte_kni/rte_kni.c                      |  75 ++++++++-
 lib/librte_kni/rte_kni.h                      |  51 +++++-
 test/test/test_kni.c                          |  20 +++
 9 files changed, 313 insertions(+), 31 deletions(-)
Signature · 1 line
2.18.0.rc1.1.g6f333ff2f