DPDK usage discussions
 help / color / mirror / Atom feed
* DPDK KNI vs io_uring
@ 2022-06-24 20:32 Juan Pablo L.
  2022-06-25 21:09 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Juan Pablo L. @ 2022-06-24 20:32 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

Hello folks, I am about to embark on the networking low level parts of my project,
where I will be implementing a SCTP server for AAA for a 4G/5G telecom so I need to squeeze as much performance as possible .. I am looking at how to setup KNI and friends (unless anyone knows about a mature and robust SCTP stack in user space please let me know) ...

I have spent several days reading about io_uring, and I can see that accomplishes exactly the same role as the KNI module (or so I believe) with the advantage that is part of the kernel, etc etc.

I have no experience with KNI or io_uring, so I will be starting from scratch with either one of them.

Has anyone had any experience with io_uring ? is it better, the same, worse than KNI ? any advice ?

On a different note, I have read in the forums and mailing list that KNI is on its way out, that it will be deprecated sometime in the future, is my understanding correct ?
If it is indeed the case, is anyone using anything as a KNI replacement ?

Thank you very much!!!



[-- Attachment #2: Type: text/html, Size: 3273 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: DPDK KNI vs io_uring
@ 2022-06-26  3:35 Juan Pablo L.
  0 siblings, 0 replies; 3+ messages in thread
From: Juan Pablo L. @ 2022-06-26  3:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users

[-- Attachment #1: Type: text/plain, Size: 3886 bytes --]

Hi Stephen, please see my comments below ...


> Hello folks, I am about to embark on the networking low level parts of my project,
> where I will be implementing a SCTP server for AAA for a 4G/5G telecom so I need to squeeze as much performance as possible .. I am looking at how to setup KNI and friends (unless anyone knows about a mature and robust SCTP stack in user space please let me know) ...

Mature and robust and open source SCTP seems unlikely. The closest you might get working is some of
the projects that ran FreeBSD network stack in userspace; but haven't heard about them in several years.

Yes i have seen those projects using FreeBSD stack in user space but I m not sure about that ... I have not seen anyone using the SCTP stack though, only TCP.
The only mature and robust implementation of SCTP I am aware of is, actually, the linux kernel implementation ...

>
> I have spent several days reading about io_uring, and I can see that accomplishes exactly the same role as the KNI module (or so I believe) with the advantage that is part of the kernel, etc etc.

No. io_uring is about bulk socket access; KNI is for pushing packets from DPDK into kernel.
Different API's different formats, different effect.

I could be wrong here, but io_uring is for pushing packets into the kernel and pulling from it with zero copies and zero syscalls (if you configure the kernel polling mode) ... according to my understanding of KNI and io_uring, both work in similar manner (hence my original question) .. you set up shared memory between kernel and userspace, you set up up 2 queues (submission queue/completion queue) and you start pushing buffers into the kernel (submission queue) together with file descriptor (socket in this case, it supports file system ops too) and an opcode of the action you want performed (READ/WRITE/CONNECT etc) and then the kernel notifies you when it is ready on the completion queue (you are polling this queue) ... you can even enqueue several operations and then make a single syscall or if you configured io_uring. the kernel will be polling the submission queue so no syscall needed at all ...


>
> I have no experience with KNI or io_uring, so I will be starting from scratch with either one of them.
>
> Has anyone had any experience with io_uring ? is it better, the same, worse than KNI ? any advice ?

io_uring is done by experienced kernel developers and merged into mainline kernel.
KNI is being deprecated and was never reviewed by the kernel community.

io_uring is driven of of socket send/recv.
KNI is based on dedicated kernel thread(s) doing polling.

> On a different note, I have read in the forums and mailing list that KNI is on its way out, that it will be deprecated sometime in the future, is my understanding correct ?
> If it is indeed the case, is anyone using anything as a KNI replacement ?
>

There is documentation already on how to use virtio_user as better replacement for KNI.

I saw this somewhere in the forums but everything I find about virtio_user is about virtual machines etc ... will look again ...

If you want to use SCTP why are you so interested in DPDK.
It would be better to just use OS stack for that.

Right from the beginning I knew I would not be using the kernel bypass feature from DPDK because I need a TCP/SCTP stack, but DPDK  is a wonderful and great library to support high performance package processing, it has all the elements necessary that otherwise I would have to develop myself a.k.a multicore support (cache management, locality etc etc), mempools, memory management, pipelines, hashing tables, lock free ring buffers, hugepages, etc etc it takes care of many things I do not have to worry about anymore, honestly KNI was a bonus on top of that that I discovered much later 🙂 ....


thank you very much for your comments.

[-- Attachment #2: Type: text/html, Size: 5478 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-26  3:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 20:32 DPDK KNI vs io_uring Juan Pablo L.
2022-06-25 21:09 ` Stephen Hemminger
2022-06-26  3:35 Juan Pablo L.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).