DPDK usage discussions
 help / color / mirror / Atom feed
From: David Schramm <david.schramm@live.com>
To: users@dpdk.org
Subject: KNI and mbuf pool with external memory
Date: Thu, 18 Nov 2021 19:56:55 +0000 (UTC)	[thread overview]
Message-ID: <AM6P192MB0437CE1960AA51A553AC4FA6989B9@AM6P192MB0437.EURP192.PROD.OUTLOOK.COM> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1517 bytes --]

Hi,

is it possible to use the kni with a mbuf pool which uses external memory?

In my attempt, the kni module seems to crash when it tries to access a mbuf from the pool:

[Do Nov 18 18:56:08 2021] device fw0 entered promiscuous mode
[Do Nov 18 19:03:38 2021] rte_kni: Creating kni...
[Do Nov 18 19:03:53 2021] general protection fault, probably for non-canonical address 0xae88ba513f6f816e: 0000 [#1] SMP NOPTI
[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
[Do Nov 18 19:03:53 2021] Hardware name: Gigabyte Technology Co., Ltd. B560 HD3/B560 HD3, BIOS F4 03/16/2021
[Do Nov 18 19:03:53 2021] RIP: 0010:memcpy_erms+0x6/0x10
...
...
[Do Nov 18 19:03:53 2021]  kni_net_tx+0x163/0x3a0 [rte_kni]
[Do Nov 18 19:03:53 2021]  dev_hard_start_xmit+0xc1/0x1e0
[Do Nov 18 19:03:53 2021]  sch_direct_xmit+0x9d/0x370

The full log is also attached to this mail. I'm trying to forward packets between a NIC and a kni interface, when using rte_pktmbuf_pool_create, it works as expected.
The corresponding code for creating the pool is here: https://github.com/daschr/cuda_firewall/blob/6b20d6e45f558085157d0c279b077a9610b5aa35/misc.c#L61
The whole code: https://github.com/daschr/cuda_firewall/tree/plain-fwd-kni

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.

Cheers,

David

[-- Attachment #1.2: Type: text/html, Size: 3700 bytes --]

[-- Attachment #2: dump.txt --]
[-- Type: text/plain, Size: 5622 bytes --]

[Do Nov 18 18:56:08 2021] device fw0 entered promiscuous mode
[Do Nov 18 19:03:38 2021] rte_kni: Creating kni...
[Do Nov 18 19:03:53 2021] general protection fault, probably for non-canonical address 0xae88ba513f6f816e: 0000 [#1] SMP NOPTI
[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
[Do Nov 18 19:03:53 2021] Hardware name: Gigabyte Technology Co., Ltd. B560 HD3/B560 HD3, BIOS F4 03/16/2021
[Do Nov 18 19:03:53 2021] RIP: 0010:memcpy_erms+0x6/0x10
[Do Nov 18 19:03:53 2021] Code: cc cc cc cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe
[Do Nov 18 19:03:53 2021] RSP: 0018:ffffa60640234cd0 EFLAGS: 00010213
[Do Nov 18 19:03:53 2021] RAX: ae88ba513f6f816e RBX: ffff98eee0442000 RCX: 0000000000000036
[Do Nov 18 19:03:53 2021] RDX: 0000000000000036 RSI: ffff98ee89cbb002 RDI: ae88ba513f6f816e
[Do Nov 18 19:03:53 2021] RBP: ffff98eea0b75400 R08: 0000000000000000 R09: 0000000000000001
[Do Nov 18 19:03:53 2021] R10: ffff98eee0325300 R11: 0000000000000005 R12: 1182dd106338dd32
[Do Nov 18 19:03:53 2021] R13: 0000000000000036 R14: ffff98ed8243fd82 R15: 0000000000000036
[Do Nov 18 19:03:53 2021] FS:  0000000000000000(0000) GS:ffff98f22fb00000(0000) knlGS:0000000000000000
[Do Nov 18 19:03:53 2021] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Do Nov 18 19:03:53 2021] CR2: 00007f82819dfc10 CR3: 00000002bc210001 CR4: 0000000000770ee0
[Do Nov 18 19:03:53 2021] PKRU: 55555554
[Do Nov 18 19:03:53 2021] Call Trace:
[Do Nov 18 19:03:53 2021]  <IRQ>
[Do Nov 18 19:03:53 2021]  kni_net_tx+0x163/0x3a0 [rte_kni]
[Do Nov 18 19:03:53 2021]  dev_hard_start_xmit+0xc1/0x1e0
[Do Nov 18 19:03:53 2021]  sch_direct_xmit+0x9d/0x370
[Do Nov 18 19:03:53 2021]  __dev_queue_xmit+0x5aa/0xb00
[Do Nov 18 19:03:53 2021]  ip_finish_output2+0x194/0x590
[Do Nov 18 19:03:53 2021]  igmp_ifc_timer_expire+0x1d7/0x420
[Do Nov 18 19:03:53 2021]  ? igmp_start_timer+0x70/0x70
[Do Nov 18 19:03:53 2021]  call_timer_fn+0x24/0xf0
[Do Nov 18 19:03:53 2021]  __run_timers.part.0+0x1ca/0x230
[Do Nov 18 19:03:53 2021]  ? cpumask_next_wrap+0x2d/0x70
[Do Nov 18 19:03:53 2021]  ? _nohz_idle_balance.constprop.0.isra.0+0xb6/0x270
[Do Nov 18 19:03:53 2021]  run_timer_softirq+0x26/0x50
[Do Nov 18 19:03:53 2021]  __do_softirq+0xc2/0x268
[Do Nov 18 19:03:53 2021]  irq_exit_rcu+0x99/0xb0
[Do Nov 18 19:03:53 2021]  sysvec_call_function_single+0x72/0x90
[Do Nov 18 19:03:53 2021]  </IRQ>
[Do Nov 18 19:03:53 2021]  asm_sysvec_call_function_single+0x12/0x20
[Do Nov 18 19:03:53 2021] RIP: 0010:cpuidle_enter_state+0xc7/0x350
[Do Nov 18 19:03:53 2021] Code: 8b 3d 65 49 35 62 e8 e8 b4 a0 ff 49 89 c5 0f 1f 44 00 00 31 ff e8 69 bf a0 ff 45 84 ff 0f 85 fa 00 00 00 fb 66 0f 1f 44 00 00 <45> 85 f6 0f 88 06 01 00 00 49 63 c6 4c 2b 2c 24 48 8d 14 40 48 8d
[Do Nov 18 19:03:53 2021] RSP: 0018:ffffa60640143ea8 EFLAGS: 00000246
[Do Nov 18 19:03:53 2021] RAX: ffff98f22fb2ca80 RBX: 0000000000000003 RCX: 000000000000001f
[Do Nov 18 19:03:53 2021] RDX: 0000000000000000 RSI: 0000000020b84733 RDI: 0000000000000000
[Do Nov 18 19:03:53 2021] RBP: ffff98f22fb37000 R08: 000019a3ca7f9d9f R09: 0000000000000018
[Do Nov 18 19:03:53 2021] R10: 000000000000085e R11: 0000000000000c50 R12: ffffffff9edb9960
[Do Nov 18 19:03:53 2021] R13: 000019a3ca7f9d9f R14: 0000000000000003 R15: 0000000000000000
[Do Nov 18 19:03:53 2021]  ? cpuidle_enter_state+0xb7/0x350
[Do Nov 18 19:03:53 2021]  cpuidle_enter+0x29/0x40
[Do Nov 18 19:03:53 2021]  do_idle+0x1f6/0x2b0
[Do Nov 18 19:03:53 2021]  cpu_startup_entry+0x19/0x20
[Do Nov 18 19:03:53 2021]  secondary_startup_64_no_verify+0xb0/0xbb
[Do Nov 18 19:03:53 2021] Modules linked in: sd_mod uas usb_storage nvidia_uvm(POE) sch_ingress sch_multiq tun rte_kni(OE) rfcomm intel_rapl_msr intel_rapl_common bnep mei_hdcp x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel nvidia_drm(POE) kvm drm_kms_helper irqbypass cec ghash_clmulni_intel rc_core aesni_intel btusb btrtl btbcm snd_sof_pci_intel_tgl btintel crypto_simd nvidia_modeset(POE) cryptd snd_sof_intel_hda_common intel_cstate bluetooth soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_core snd_compress snd_hda_codec_hdmi soundwire_bus binfmt_misc intel_uncore ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi jitterentropy_rng pcspkr nls_ascii snd_usb_audio snd_hda_codec nls_cp437 iTCO_wdt snd_usbmidi_lib efi_pstore intel_pmc_bxt vfat iTCO_vendor_support sha512_ssse3 snd_rawmidi
[Do Nov 18 19:03:53 2021]  nvidia(POE) intel_wmi_thunderbolt wmi_bmof fat watchdog ee1004 sha512_generic snd_hda_core snd_seq_device ctr mc snd_hwdep drbg snd_pcm ansi_cprng joydev snd_timer snd ecdh_generic mei_me rfkill ecc soundcore mei sg evdev intel_pmc_core acpi_pad acpi_tad sunrpc parport_pc drm ppdev lp parport fuse configfs efivarfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic mlx4_ib ib_uverbs ib_core mlx4_en ptp pps_core hid_generic usbhid hid sr_mod cdrom xhci_pci ahci xhci_hcd libahci libata mlx4_core usbcore r8169 nvme realtek scsi_mod mdio_devres nvme_core libphy crc32_pclmul crc32c_intel i2c_i801 i2c_smbus t10_pi crc_t10dif crct10dif_generic crct10dif_pclmul usb_common crct10dif_common fan wmi video button
[Do Nov 18 19:03:53 2021] ---[ end trace c5cf0670bde49bd2 ]---

                 reply	other threads:[~2021-11-18 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6P192MB0437CE1960AA51A553AC4FA6989B9@AM6P192MB0437.EURP192.PROD.OUTLOOK.COM \
    --to=david.schramm@live.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).