DPDK usage discussions
 help / color / mirror / Atom feed
* KNI and mbuf pool with external memory
@ 2021-11-18 19:56 David Schramm
  0 siblings, 0 replies; only message in thread
From: David Schramm @ 2021-11-18 19:56 UTC (permalink / raw)
  To: users


[-- 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 ]---

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-18 19:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 19:56 KNI and mbuf pool with external memory David Schramm

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git