Feature: adding rte_kni kernel module as dkms

Bug #1592786 reported by klnikita
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpdk (Ubuntu)
Fix Released
Medium
Christian Ehrhardt 

Bug Description

Hello,
It would be quite interesting to have a package for installing rte_kni.ko as a dkms module.

To explain the purpose of the kni module, here is a quote from the dpdk documentation:

"
The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the Linux* control plane.

The benefits of using the DPDK KNI are:
- Faster than existing Linux TUN/TAP interfaces (by eliminating system calls and copy_to_user()/copy_from_user() operations.
- Allows management of DPDK ports using standard Linux net tools such as ethtool, ifconfig and tcpdump.
- Allows an interface with the kernel network stack.
"

I'm not aware of any package in ubuntu or debian official repos which are using this module but a least there is my application (https://github.com/Gandi/packet-journey) which is using it.
There is also some dpdk examples which require it to run, and it may be a dependency for other dpdk libraries in further dpdk versions.

Note: I would be happy to propose my application as a package if I have this .deb available (it is a hard dependency in my case).

Tags: patch
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
as we already worked a bit on the base of the mail thread.
I don't mind enabling rte_kni as dkms module.

While most I cared about so far worked well with the pure userspace drivers there is no reason to not have it available the way it comes from upstream dpdk that comes to my mind.

As we discussed, next steps are:
- I already got it building
- I already added an adt test for it to make sure it doesn't break by kernel/upstream changes without us knowing
- You'll attach your own patch set here so I can find if I should pick some of that into mine
- I'll provide a ppa for you to test it more thoroughly

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Re-assigning from upstream to Ubuntu-dev release

affects: dpdk → dpdk (Ubuntu)
Changed in dpdk (Ubuntu):
assignee: nobody → ChristianEhrhardt (paelzer)
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
klnikita (klnikita) wrote :

For what is worth, here is the patch I would have used if you have not written yours

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for sharing - our code overall is very similar.
You had missed a few renames from igb_uio, then the changelog and a few other minor things.
I didn't like the quilt patch to fix up the includes - that works much more focused with a small change to the dkms conf.

So I didn't need to pick anything up from it.
I'm currently discussing about potential further simplifications in that file.

Revision history for this message
klnikita (klnikita) wrote :

Ok no problem. It was just a quick win patch.
I also tried to do that with some dkms modifications but I didn't find a way to pass more "CFLAGS" without overriding MODULE_CFLAGS, what was not acceptable since the Makefile was already passing options through that. But I quickly switched to patching the Makefile directly so maybe I have overlooked something.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
the following ppa has the dkms for kni built for all architectures
https://launchpad.net/~paelzer/+archive/ubuntu/dpdk-merge-16.04

Could you give it a test and let me know?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ubuntu-rte-kni-dkms.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
klnikita (klnikita) wrote :

It works fine here, thank you Christian!

Just another suggestion, in debian/rules you have a 'RTE_MACHINE = "default"', it could be interesting to modify it by a 'RTE_MACHINE ?= "default"' since it permit to override it during a rebuild.

In dpdk the default value is core2, and it is disabling sse4/avx/avx2 optimizations at least.
It will also pass a -march=core2 in dpdk Makefiles used by applications.
It should be quite interesting to be able to rebuild it easily for other RTE_MACHINE values (I guess most dpdk users are using more modern CPU than a core2)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpdk - 16.07-0ubuntu2

---------------
dpdk (16.07-0ubuntu2) yakkety; urgency=medium

  * d/t/test-initscripts fix false positive in adt

 -- Christian Ehrhardt <email address hidden> Fri, 12 Aug 2016 12:56:07 +0200

Changed in dpdk (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.