<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">Hi,</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">is it possible to use the kni with a mbuf pool which uses external memory?</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">In my attempt, the kni module seems to crash when it tries to access a mbuf from the pool:</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 18:56:08 2021] device fw0 entered promiscuous mode</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:38 2021] rte_kni: Creating kni...</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] general protection fault, probably for non-canonical address 0xae88ba513f6f816e: 0000 [#1] SMP NOPTI</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] CPU: 4 PID: 0 Comm: swapper/4 Tainted: P OE 5.14.0-2-amd64 #1 Debian 5.14.9-2</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] Hardware name: Gigabyte Technology Co., Ltd. B560 HD3/B560 HD3, BIOS F4 03/16/2021</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] RIP: 0010:memcpy_erms+0x6/0x10</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">...</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">...</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] kni_net_tx+0x163/0x3a0 [rte_kni]</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] dev_hard_start_xmit+0xc1/0x1e0</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">[Do Nov 18 19:03:53 2021] sch_direct_xmit+0x9d/0x370</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">The full log is also attached to this mail. I'm trying to forward packets between a NIC and a kni interface, when using <span style="font-family:ui-monospace, sfmono-regular, ;" sf="" mono?,="" menlo,="" consolas,="" ?liberation="" monospace;?="">rte_pktmbuf_pool_create</span>, it works as expected.</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">The corresponding code for creating the pool is here: https://github.com/daschr/cuda_firewall/blob/6b20d6e45f558085157d0c279b077a9610b5aa35/misc.c#L61</span>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">The whole code: https://github.com/daschr/cuda_firewall/tree/plain-fwd-kni</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">Another question: Do benchmarks of the kni exist? What are the common line/packet rates one can expect when using the kni module? In my tests, I currently get ~20Gbit/s using iperf3.</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">Cheers,</span>
<br>
<br> <span dir="ltr" style="font-family:sans-serif;margin-top:0; margin-bottom:0">David</span>
<br>
</body>
</html>