Configuring the Target Server with RAM disks

Getting Started with Napatech Link-Storage™ Software

Platform
Napatech IPU
Content Type
Getting Started
Capture Software Version
Link-Storage™ Software 1.0

Use this information to configure the SPDK for sharing RAM devices using NVMe™/TCP on the target server.

Before you begin

Make sure that you have:

About this task

Note: The following prompt is used to indicate which part of the system to run the provided commands on.
  • target#: The remote server with storage disks.

Procedure

  1. Check the disk status.
    target# cd spdk
    target# scripts/setup.sh status
    An output example:
    Hugepages
    node     hugesize     free /  total
    node0   1048576kB        0 /      0
    node0      2048kB    10240 /  10240
    
    Type   BDF           Vendor Device NUMA    Driver   Device Block devices
    I/OAT  0000:00:04.0  8086   6f20   unknown ioatdma  -      -
    I/OAT  0000:00:04.1  8086   6f21   unknown ioatdma  -      -
    I/OAT  0000:00:04.2  8086   6f22   unknown ioatdma  -      -
    I/OAT  0000:00:04.3  8086   6f23   unknown ioatdma  -      -
    I/OAT  0000:00:04.4  8086   6f24   unknown ioatdma  -      -
    I/OAT  0000:00:04.5  8086   6f25   unknown ioatdma  -      -
    I/OAT  0000:00:04.6  8086   6f26   unknown ioatdma  -      -
    I/OAT  0000:00:04.7  8086   6f27   unknown ioatdma  -      -
  2. Configure the SPDK.
    Specify the number of huge pages.
    target# export NRHUGE=10240
    Run the setup script to allocate huge page memory.
    target# PCI_ALLOWED=' ' ./scripts/setup.sh
    An output example:
    0000:00:04.7 (8086 6f27): Skipping denied controller at 0000:00:04.7
    0000:00:04.6 (8086 6f26): Skipping denied controller at 0000:00:04.6
    0000:00:04.5 (8086 6f25): Skipping denied controller at 0000:00:04.5
    0000:00:04.4 (8086 6f24): Skipping denied controller at 0000:00:04.4
    0000:00:04.3 (8086 6f23): Skipping denied controller at 0000:00:04.3
    0000:00:04.2 (8086 6f22): Skipping denied controller at 0000:00:04.2
    0000:00:04.1 (8086 6f21): Skipping denied controller at 0000:00:04.1
    0000:00:04.0 (8086 6f20): Skipping denied controller at 0000:00:04.0
    INFO: Requested 10240 hugepages but 10240 already allocated

    PCI_ALLOWED=' ' is used to prevent storage devices from being bound to any drivers.

  3. Verify the status.
    target# scripts/setup.sh status
    An output example:
    Hugepages
    node     hugesize     free /  total
    node0   1048576kB        0 /      0
    node0      2048kB    10240 /  10240
    
    Type   BDF           Vendor Device NUMA    Driver   Device Block devices
    I/OAT  0000:00:04.0  8086   6f20   unknown ioatdma  -      -
    I/OAT  0000:00:04.1  8086   6f21   unknown ioatdma  -      -
    I/OAT  0000:00:04.2  8086   6f22   unknown ioatdma  -      -
    I/OAT  0000:00:04.3  8086   6f23   unknown ioatdma  -      -
    I/OAT  0000:00:04.4  8086   6f24   unknown ioatdma  -      -
    I/OAT  0000:00:04.5  8086   6f25   unknown ioatdma  -      -
    I/OAT  0000:00:04.6  8086   6f26   unknown ioatdma  -      -
    I/OAT  0000:00:04.7  8086   6f27   unknown ioatdma  -      -
    Note: The output may vary depending on the system.
  4. Start the nvmf_tgt application and keep this terminal open.
    target# build/bin/nvmf_tgt -e all -m 0x1 -r /var/tmp/spdk.sock
    where:
    • -e all: Enables all available subsystems.
    • -m 0x1: Specifies the mask of core mask. In this case, it's set to 0x1, indicating that it runs on core 0.
    • -r /var/tmp/spdk.sock: Specifies the location of the SPDK control socket. This socket is used for communicating with the SPDK application to issue commands and retrieve information.
    An output example:
    [2025-01-28 13:50:24.296736] Starting SPDK v25.01-pre git sha1 e01cb43b8 / DPDK 24.03.0 initialization...
    [2025-01-28 13:50:24.296823] [ DPDK EAL parameters: nvmf --no-shconf -c 0x1 --huge-unlink --no-telemetry --log-level=lib.eal:6 --log-level=lib.cryptodev:5 --log-level=lib.power:5 --log-level=user1:6 --base-virtaddr=0x200000000000 --match-allocations --file-prefix=spdk_pid3231155 ]
    [2025-01-28 13:50:24.337088] app.c: 919:spdk_app_start: *NOTICE*: Total cores available: 1
    [2025-01-28 13:50:24.463366] app.c: 612:app_setup_trace: *NOTICE*: Tracepoint Group Mask all specified.
    [2025-01-28 13:50:24.463408] app.c: 616:app_setup_trace: *NOTICE*: Use 'spdk_trace -s nvmf -p 3231155' to capture a snapshot of events at runtime.
    [2025-01-28 13:50:24.463416] app.c: 618:app_setup_trace: *NOTICE*: 'spdk_trace' without parameters will also work if this is the only
    [2025-01-28 13:50:24.463423] app.c: 619:app_setup_trace: *NOTICE*: SPDK application currently running.
    [2025-01-28 13:50:24.463431] app.c: 620:app_setup_trace: *NOTICE*: Or copy /dev/shm/nvmf_trace.pid3231155 for offline analysis/debug.
    [2025-01-28 13:50:24.463510] reactor.c: 995:reactor_run: *NOTICE*: Reactor started on core 0