Run throughput test using iperf2 TCP on nrf7002 DK

I am attempting to run a throughput test using TCP on the nrf7002 DK as the client and my laptop as the iperf2 server. I am using the sr_coex sample listed in sdk-nrf repo, and modified the following files: src/main.c and prj.conf. In prj.conf I modified the following parameters:

CONFIG_STA_KEY_MGMT_WPA2
CONFIG_STA_SAMPLE_SSID
CONFIG_STA_SAMPLE_PASSWORD
CONFIG_WIFI_ZPERF_PROT_UDP
CONFIG_NET_CONFIG_PEER_IPV4_ADDR

I set CONFIG_WIFI_ZPERF_PROT_UDP to y and the others with my Wifi credentials. I can confirm the Wifi credentials are correct since I was able to perform the throughput test with UDP with no errors.

In the src/main.c file: I changed the following

udp_callback to tcp_callback in line 63,

udp_upload_results_cb to tcp_upload_results_cb in line 303,

udp_callback to tcp_callback in line 332

zperf_udp_upload_async with zperf_tcp_upload_async in line 464

udp_callback to tcp_callback in line 480

After I saved my changes, I used the following commands to build/flash my nrf7002 DK board

west build --pristine  -s <path/to/app> -b nrf7002dk_nrf5340_cpuapp -- -DCONFIG_MPSL_CX=n -Dhci_rpmsg_CONFIG_MPSL_CX=n

west flash --dev-id <DEV_ID>  --hex-file build/zephyr/merged_domains.hex

Both build and flash was successful, I see the throughput test can run, but in the logs I get several messages that look like the following:

<wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x20052cc8 dropped

My question is if there's something else that I need to do to stop getting that error message in order to run a throughput test using TCP

Parents
  • Hi,

    I set CONFIG_WIFI_ZPERF_PROT_UDP to y

    You must set CONFIG_WIFI_ZPERF_PROT_UDP=n to use TCP.

    What command are you using to run iPerf? For TCP you must use the following:

    iperf -s -i 1

    Best regards,
    Marte

  • Thank you for replying. I miswrote the question. I did set CONFIG_WIFI_ZPERF_PROT_UDP to n. The command I used to run iperf I did the following:

    iperf -s -i 1 -P 1

    I added the -P flag since I only want iperf to run for one client and exit. When I ran the test and check the logs, I noticed the iperf test starts, but the logs display several of the same messages during the test run:

    <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x20052cc8 dropped

  • Log from device during throughput test using TCP:

    [00:00:00.284,729] <inf> wifi_nrf: qspi_init: QSPI freq = 24 MHz

    [00:00:00.284,759] <inf> wifi_nrf: qspi_init: QSPI latency = 1

    [00:00:00.292,266] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: LMAC patches loaded

    [00:00:00.303,100] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: LMAC boot check passed

    [00:00:00.306,060] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: UMAC patches loaded

    [00:00:00.316,864] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: UMAC boot check passed

    [00:00:00.338,745] <inf> wifi_nrf: zep_shim_pr_info: RPU LPM type: HW

    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    [00:00:00.453,582] <wrn> net_zperf: zperf_shell_init: Unable to set IP
    [00:00:00.453,613] <wrn> net_zperf: zperf_shell_init: Unable to set IP
    [00:00:00.453,643] <inf> net_zperf: zperf_shell_init: Setting IP address 
    [00:00:00.453,704] <inf> net_zperf: zperf_shell_init: Setting destination IP address x.x.x.x
    [00:00:00.453,735] <inf> net_config: net_config_init_by_iface: Initializing network
    [00:00:00.453,735] <inf> net_config: check_interface: Waiting interface 1 (0x20001ed0) to be up...
    [00:00:00.453,765] <inf> net_config: setup_dhcpv4: Running dhcpv4 client...
    [00:00:00.454,681] <inf> coex: main: Starting nrf7002dk_nrf5340_cpuapp with CPU frequency: 128 MHz
    [00:00:00.454,803] <inf> wpa_supp: wpa_printf_impl: z_wpas_start: 385 Starting wpa_supplicant thread with debug level: 3

    [00:00:00.454,925] <inf> wpa_supp: wpa_printf_impl: Successfully initialized wpa_supplicant
    [00:00:01.454,772] <inf> coex: main: test_wlan = 1 and test_ble = 0

    [00:00:01.454,772] <inf> wifi_nrf: nrf_wifi_config_sr_switch: GPIO P1.10 set to 0

    [00:00:02.448,760] <inf> coex: wifi_connect: Connection requested
    [00:00:02.448,760] <inf> coex: wait_for_next_event: Waiting for Wi-Fi Connection
    [00:00:06.033,233] <inf> wpa_supp: wpa_printf_impl: wlan0: SME: Trying to authenticate with xxxx (SSID='' freq=2462 MHz)
    [00:00:06.035,552] <inf> wifi_nrf: wifi_nrf_wpa_supp_authenticate: wifi_nrf_wpa_supp_authenticate:Authentication request sent successfully

    [00:00:06.334,686] <inf> wpa_supp: wpa_printf_impl: wlan0: Trying to associate with xxxx (SSID='CBCI-AF98' freq=2462 MHz)
    [00:00:06.340,515] <inf> wifi_nrf: wifi_nrf_wpa_supp_associate: wifi_nrf_wpa_supp_associate: Association request sent successfully

    [00:00:06.363,586] <inf> wpa_supp: wpa_printf_impl: wlan0: Associated with xxxx
    [00:00:06.363,647] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
    [00:00:06.412,017] <inf> wpa_supp: wpa_printf_impl: wlan0: WPA: Key negotiation completed with 38:3f:b3:45:af:9c [PTK=CCMP GTK=CCMP]
    [00:00:06.412,139] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-CONNECTED - Connection to 38:3f:b3:45:af:9c completed [id=0 id_str=]
    [00:00:06.416,839] <inf> coex: handle_wifi_connect_result: Connected
    [00:00:06.421,691] <inf> coex: cmd_wifi_status: Status: successful

    [00:00:06.421,691] <inf> coex: cmd_wifi_status: ==================

    [00:00:06.421,691] <inf> coex: cmd_wifi_status: State: GROUP_HANDSHAKE

    [00:00:06.421,722] <inf> coex: cmd_wifi_status: Interface Mode: STATION

    [00:00:06.421,722] <inf> coex: cmd_wifi_status: Link Mode: WIFI 4 (802.11n/HT)

    [00:00:06.421,752] <inf> coex: cmd_wifi_status: SSID: xxxxx

    [00:00:06.421,752] <inf> coex: cmd_wifi_status: BSSID: xxxxxx

    [00:00:06.421,783] <inf> coex: cmd_wifi_status: Band: 2.4GHz

    [00:00:06.421,783] <inf> coex: cmd_wifi_status: Channel: 11

    [00:00:06.421,783] <inf> coex: cmd_wifi_status: Security: WPA2-PSK

    [00:00:06.421,783] <inf> coex: cmd_wifi_status: MFP: Optional

    [00:00:06.421,813] <inf> coex: cmd_wifi_status: RSSI: -49

    [00:00:06.421,875] <inf> coex: wait_for_next_event: Got Wi-Fi Connection
    [00:00:06.421,905] <inf> coex: wait_for_next_event: Waiting for Wi-Fi DHCP
    [00:00:06.662,170] <inf> net_dhcpv4: dhcpv4_handle_msg_ack: Received: xxxx
    [00:00:06.662,261] <inf> net_config: ipv4_addr_add_handler: IPv4 address: xxxx
    [00:00:06.662,261] <inf> net_config: ipv4_addr_add_handler: Lease time: 172800 seconds
    [00:00:06.662,261] <inf> net_config: ipv4_addr_add_handler: Subnet: 255.255.255.0
    [00:00:06.662,292] <inf> net_config: ipv4_addr_add_handler: Router: xxxx
    [00:00:06.662,811] <inf> coex: print_dhcp_ip: IP address: xxxx
    [00:00:06.662,963] <inf> coex: wait_for_next_event: Got Wi-Fi DHCP
    [00:00:06.662,994] <inf> coex: main:

    [00:00:06.662,994] <inf> coex: main: Configuring non-PTA registers.

    [00:00:06.663,452] <inf> coex: main: Configuring PTA registers for 2.4GHz

    [00:00:06.664,489] <inf> coex: main: Starting Wi-Fi benchmark: Zperf client
    [00:00:06.664,520] <inf> coex: parse_ipv4_addr: IPv4 address xxxx
    [00:00:06.664,794] <inf> coex: tcp_upload_results_cb: New TCP session started
    [00:00:06.768,066] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:06.983,551] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.121,520] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.235,443] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.376,708] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.498,443] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.638,427] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.765,838] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:07.907,745] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.025,665] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.177,734] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.308,074] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.435,363] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.572,204] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.725,585] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.836,456] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:08.977,630] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.117,004] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.251,861] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.373,626] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.528,228] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.648,040] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.784,454] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:09.917,572] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:10.074,096] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:10.216,308] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:10.348,144] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:10.472,961] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:10.833,312] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:10.955,474] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:11.082,122] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:11.234,497] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:11.434,600] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:11.871,215] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:12.010,162] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:12.208,892] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:12.358,673] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:12.672,576] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:12.877,410] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:12.983,917] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:13.109,436] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:13.248,352] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:13.397,430] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:13.515,502] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:13.825,866] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.003,967] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.215,606] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.336,486] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.464,996] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.618,560] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.748,046] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:14.885,406] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.011,474] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.161,193] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.299,896] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.442,413] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.566,741] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.707,336] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.838,104] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:15.974,395] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.118,927] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.242,950] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.423,828] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.537,902] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.678,009] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.812,225] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:16.937,683] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:17.078,887] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:17.180,999] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:17.491,485] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:17.633,422] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:17.799,346] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:17.919,403] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.056,213] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.191,741] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.316,772] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.453,887] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.590,454] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.714,965] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:18.919,586] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.144,805] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.283,782] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.425,781] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.557,586] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.686,553] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.816,284] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:19.954,711] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.100,341] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.288,726] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.422,851] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.562,042] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.701,629] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.850,036] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:20.976,165] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:21.111,724] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:21.305,664] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:21.683,929] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:21.790,588] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:22.060,363] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:22.451,385] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:22.573,547] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:22.713,714] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:22.857,574] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:22.984,100] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:23.134,582] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:23.409,759] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:23.553,955] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:23.705,566] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:23.903,472] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:24.025,024] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:24.169,494] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:24.295,715] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:24.409,545] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:24.560,729] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:24.691,040] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.027,587] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.144,042] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.270,263] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.399,749] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.523,559] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.663,208] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.796,508] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:25.930,084] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:26.057,952] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:26.603,485] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:26.753,295] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:26.867,309] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:27.283,203] <wrn> net_conn: conn_raw_socket: pkt cloning failed, pkt 0x200549d0 dropped
    [00:00:27.284,393] <inf> coex: tcp_upload_results_cb: Wi-Fi benchmark: Upload completed!
    [00:00:27.284,423] <inf> coex: tcp_upload_results_cb: Upload results:
    [00:00:27.284,423] <inf> coex: tcp_upload_results_cb: 729088 bytes in 20300 ms
    [00:00:27.284,423] <inf> coex: tcp_upload_results_cb: 712 packets sent
    [00:00:27.284,423] <inf> coex: tcp_upload_results_cb: 2863311530 packets lost
    [00:00:27.284,423] <inf> coex: tcp_upload_results_cb: 0 packets received
    [00:00:27.284,454] <inf> coex: main: TCP SESSION FINISHED
    [00:00:27.284,454] <inf> coex: main: Disconnecting Wi-Fi

    [00:00:27.286,376] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-DISCONNECTED bssid=38:3f:b3:45:af:9c reason=3 locally_generated=1
    [00:00:27.286,895] <inf> coex: handle_wifi_disconnect_result: Disconnection request done (0)
    [00:00:27.299,652] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
    [00:00:27.299,713] <inf> coex: cmd_wifi_status: Status: successful

    [00:00:27.299,713] <inf> coex: cmd_wifi_status: ==================

    [00:00:27.299,743] <inf> coex: cmd_wifi_status: State: DISCONNECTED

    [00:00:27.299,835] <inf> coex: wifi_disconnect: Disconnect requested
    [00:00:27.299,865] <inf> coex: main:
    Coexistence test complete

  • Hi,

    You need to increase the TX and RX buffers.

    CONFIG_NET_PKT_RX_COUNT=32
    CONFIG_NET_PKT_TX_COUNT=32
    CONFIG_NET_BUF_RX_COUNT=32
    CONFIG_NET_BUF_TX_COUNT=64

    This should solve the packet dropped issue.

    Best regards,
    Marte

  • Hello,

    I increased with TX and RX buffers like you suggested, I now get an packet allocation failed error.

    Here is the logs: 

    [00:00:00.284,759] <inf> wifi_nrf: qspi_init: QSPI freq = 24 MHz
    
    [00:00:00.284,790] <inf> wifi_nrf: qspi_init: QSPI latency = 1
    
    [00:00:00.292,297] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: LMAC patches loaded
    
    [00:00:00.303,161] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: LMAC boot check passed
    
    [00:00:00.306,121] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: UMAC patches loaded
    
    [00:00:00.316,925] <inf> wifi_nrf: zep_shim_pr_info: wifi_nrf_fmac_fw_load: UMAC boot check passed
    
    [00:00:00.338,928] <inf> wifi_nrf: zep_shim_pr_info: RPU LPM type: HW
    
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    [00:00:00.453,674] <inf> net_config: net_config_init_by_iface: Initializing network
    [00:00:00.453,674] <inf> net_config: check_interface: Waiting interface 1 (0x20001bc0) to be up...
    [00:00:00.453,704] <inf> net_config: setup_dhcpv4: Running dhcpv4 client...
    [00:00:00.454,620] <inf> coex: main: Starting nrf7002dk_nrf5340_cpuapp with CPU frequency: 128 MHz
    [00:00:00.454,711] <inf> wpa_supp: wpa_printf_impl: z_wpas_start: 385 Starting wpa_supplicant thread with debug level: 3
    
    [00:00:00.454,833] <inf> wpa_supp: wpa_printf_impl: Successfully initialized wpa_supplicant
    [00:00:01.454,681] <inf> coex: main: test_wlan = 1 and test_ble = 0
    
    [00:00:01.454,681] <inf> wifi_nrf: nrf_wifi_config_sr_switch: GPIO P1.10 set to 0
    
    [00:00:02.448,730] <inf> coex: wifi_connect: Connection requested
    [00:00:02.448,760] <inf> coex: wait_for_next_event: Waiting for Wi-Fi Connection
    [00:00:06.032,531] <inf> wpa_supp: wpa_printf_impl: wlan0: SME: Trying to authenticate with 38:3f:b3:45:af:9c (SSID='xxxx' freq=2462 MHz)
    [00:00:06.034,759] <inf> wifi_nrf: wifi_nrf_wpa_supp_authenticate: wifi_nrf_wpa_supp_authenticate:Authentication request sent successfully
    
    [00:00:06.284,454] <inf> wpa_supp: wpa_printf_impl: wlan0: Trying to associate with 38:3f:b3:45:af:9c (SSID='xxxx' freq=2462 MHz)
    [00:00:06.289,703] <inf> wifi_nrf: wifi_nrf_wpa_supp_associate: wifi_nrf_wpa_supp_associate: Association request sent successfully
    
    [00:00:06.302,947] <inf> wpa_supp: wpa_printf_impl: wlan0: Associated with xxxx
    [00:00:06.303,039] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
    [00:00:06.331,939] <inf> wpa_supp: wpa_printf_impl: wlan0: WPA: Key negotiation completed with xxxx [PTK=CCMP GTK=CCMP]
    [00:00:06.332,061] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-CONNECTED - Connection to xxxx completed [id=0 id_str=]
    [00:00:06.336,822] <inf> coex: handle_wifi_connect_result: Connected
    [00:00:06.341,796] <inf> coex: cmd_wifi_status: Status: successful
    
    [00:00:06.341,827] <inf> coex: cmd_wifi_status: ==================
    
    [00:00:06.341,827] <inf> coex: cmd_wifi_status: State: GROUP_HANDSHAKE
    
    [00:00:06.341,827] <inf> coex: cmd_wifi_status: Interface Mode: STATION
    
    [00:00:06.341,857] <inf> coex: cmd_wifi_status: Link Mode: WIFI 4 (802.11n/HT)
    
    [00:00:06.341,857] <inf> coex: cmd_wifi_status: SSID: xxxx                    
    
    [00:00:06.341,888] <inf> coex: cmd_wifi_status: BSSID: xxxx
    
    [00:00:06.341,888] <inf> coex: cmd_wifi_status: Band: 2.4GHz
    
    [00:00:06.341,888] <inf> coex: cmd_wifi_status: Channel: 11
    
    [00:00:06.341,918] <inf> coex: cmd_wifi_status: Security: WPA2-PSK
    
    [00:00:06.341,918] <inf> coex: cmd_wifi_status: MFP: Optional
    
    [00:00:06.341,918] <inf> coex: cmd_wifi_status: RSSI: -46
    
    [00:00:06.342,071] <inf> coex: wait_for_next_event: Got Wi-Fi Connection
    [00:00:06.342,102] <inf> coex: wait_for_next_event: Waiting for Wi-Fi DHCP
    [00:00:06.523,712] <inf> net_dhcpv4: dhcpv4_handle_msg_ack: Received: xxxx
    [00:00:06.523,803] <inf> net_config: ipv4_addr_add_handler: IPv4 address: xxxx
    [00:00:06.523,834] <inf> net_config: ipv4_addr_add_handler: Lease time: 172800 seconds
    [00:00:06.523,834] <inf> net_config: ipv4_addr_add_handler: Subnet: 255.255.255.0
    [00:00:06.523,864] <inf> net_config: ipv4_addr_add_handler: Router: xxxx
    [00:00:06.525,665] <inf> coex: print_dhcp_ip: IP address: xxxx
    [00:00:06.525,695] <inf> coex: wait_for_next_event: Got Wi-Fi DHCP
    [00:00:06.525,726] <inf> coex: main: 
    
    [00:00:06.525,726] <inf> coex: main: Configuring non-PTA registers.
    
    [00:00:06.526,702] <inf> coex: main: Configuring PTA registers for 2.4GHz
    
    [00:00:06.527,221] <inf> coex: main: Starting Wi-Fi benchmark: Zperf client
    [00:00:06.527,252] <inf> coex: parse_ipv4_addr: IPv4 address xxxx
    [00:00:06.637,237] <inf> coex: tcp_upload_results_cb: New TCP session started
    [00:00:07.660,705] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:07.660,705] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:08.548,461] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:08.548,461] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:09.467,102] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:10.496,093] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:10.496,093] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:12.463,958] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:12.463,958] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:13.101,409] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:14.954,650] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:14.954,650] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:15.740,386] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:16.209,930] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:16.209,930] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:16.766,418] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:17.320,922] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:17.320,922] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:18.501,525] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:19.118,072] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:19.118,072] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:19.587,280] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:20.370,819] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:20.370,819] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:21.165,863] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:21.165,863] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:21.754,547] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:22.341,979] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:23.382,904] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:24.339,843] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (1500) allocation failed.
    [00:00:24.339,843] <err> net_tcp: tcp_send_data: conn: 0x200659fc packet allocation failed, len=1460
    [00:00:24.886,077] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:25.564,849] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:26.372,100] <err> net_pkt: net_pkt_alloc_buffer: Data buffer (68) allocation failed.
    [00:00:26.735,626] <inf> coex: tcp_upload_results_cb: Wi-Fi benchmark: Upload completed!
    [00:00:26.735,626] <inf> coex: tcp_upload_results_cb: Upload results:
    [00:00:26.735,626] <inf> coex: tcp_upload_results_cb: 4655104 bytes in 20000 ms
    [00:00:26.735,626] <inf> coex: tcp_upload_results_cb: 4546 packets sent
    [00:00:26.735,626] <inf> coex: tcp_upload_results_cb: 2863311530 packets lost
    [00:00:26.735,656] <inf> coex: tcp_upload_results_cb: 0 packets received
    [00:00:26.735,656] <inf> coex: main: TCP SESSION FINISHED
    [00:00:26.735,656] <inf> coex: main: Disconnecting Wi-Fi
    
    [00:00:26.736,389] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-DISCONNECTED bssid=38:3f:b3:45:af:9c reason=3 locally_generated=1
    [00:00:26.736,419] <inf> coex: handle_wifi_disconnect_result: Disconnection request done (0)
    [00:00:26.747,528] <inf> wpa_supp: wpa_printf_impl: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
    [00:00:26.747,619] <inf> coex: cmd_wifi_status: Status: successful
    
    [00:00:26.747,619] <inf> coex: cmd_wifi_status: ==================
    
    [00:00:26.747,619] <inf> coex: cmd_wifi_status: State: DISCONNECTED
    
    [00:00:26.747,894] <inf> coex: wifi_disconnect: Disconnect requested
    [00:00:26.747,894] <inf> coex: main: 
                                         Coexistence test complete

    Here is my prj.conf file

    #
    # Copyright (c) 2022 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_WIFI=y
    CONFIG_WIFI_NRF700X=y
    
    # Test mode
    CONFIG_TEST_TYPE_WLAN_ONLY=y
    
    # WPA supplicant
    CONFIG_WPA_SUPP=y
    
    # System settings
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_NANO=n
    
    # Networking
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_POSIX_API=y
    CONFIG_NET_LOG=y
    CONFIG_NET_IPV4=y
    CONFIG_NET_UDP=y
    CONFIG_NET_TCP=y
    CONFIG_NET_DHCPV4=y
    
    CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=2
    CONFIG_NET_MAX_CONTEXTS=8
    CONFIG_NET_CONTEXT_SYNC_RECV=y
    
    CONFIG_INIT_STACKS=y
    
    CONFIG_NET_L2_ETHERNET=y
    
    CONFIG_NET_CONFIG_SETTINGS=y
    
    CONFIG_NET_SOCKETS_POLL_MAX=4
    
    # Memories
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    CONFIG_NET_TX_STACK_SIZE=4096
    CONFIG_NET_RX_STACK_SIZE=4096
    
    # Debugging
    CONFIG_STACK_SENTINEL=y
    CONFIG_DEBUG_COREDUMP=y
    CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y
    CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
    
    # Kernel options
    CONFIG_ENTROPY_GENERATOR=y
    
    # Logging
    CONFIG_LOG=y
    CONFIG_PRINTK=y
    CONFIG_POSIX_CLOCK=y
    
    # Benchmarking
    CONFIG_NET_ZPERF=y
    
    # Optimized networking settings for performance
    CONFIG_NET_TC_TX_COUNT=1
    CONFIG_NET_PKT_RX_COUNT=32
    CONFIG_NET_PKT_TX_COUNT=32
    CONFIG_NET_BUF_RX_COUNT=32
    CONFIG_NET_BUF_TX_COUNT=64
    CONFIG_HEAP_MEM_POOL_SIZE=200000
    CONFIG_NET_BUF_DATA_SIZE=1100
    
    # Below configs need to be modified based on security
    # CONFIG_STA_KEY_MGMT_NONE=y
    CONFIG_STA_KEY_MGMT_WPA2=y
    # CONFIG_STA_KEY_MGMT_WPA2_256=y
    # CONFIG_STA_KEY_MGMT_WPA3=y
    CONFIG_STA_SAMPLE_SSID=""
    CONFIG_STA_SAMPLE_PASSWORD=""
    CONFIG_NET_CONFIG_PEER_IPV4_ADDR=""
    CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0"
    
    # DUT zperf configuration
    CONFIG_WIFI_ZPERF_PROT_UDP=n
    CONFIG_WIFI_ZPERF_PKT_SIZE=1024
    CONFIG_WIFI_ZPERF_RATE=10000
    CONFIG_WIFI_ZPERF_SERVER=n
    
    CONFIG_BT_DEVICE_NAME="Nordic_Throughput"
    CONFIG_BT=y
    CONFIG_BT_DEBUG_LOG=y
    CONFIG_BT_SMP=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_MAX_CONN=2
    
    CONFIG_BT_SCAN=y
    CONFIG_BT_SCAN_FILTER_ENABLE=y
    CONFIG_BT_SCAN_UUID_CNT=1
    
    CONFIG_BT_GATT_CLIENT=y
    CONFIG_BT_GATT_DM=y
    CONFIG_BT_THROUGHPUT=y
    
    CONFIG_BT_USER_DATA_LEN_UPDATE=y
    CONFIG_BT_USER_PHY_UPDATE=y
    CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
    
    CONFIG_BT_BUF_ACL_RX_SIZE=502
    CONFIG_BT_ATT_PREPARE_COUNT=2
    CONFIG_BT_CONN_TX_MAX=10
    CONFIG_BT_L2CAP_TX_BUF_COUNT=10
    CONFIG_BT_L2CAP_TX_MTU=498
    CONFIG_BT_BUF_ACL_TX_SIZE=502
    CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
    
    CONFIG_DK_LIBRARY=y
    CONFIG_DK_LIBRARY_DYNAMIC_BUTTON_HANDLERS=y
    CONFIG_NRF700X_MAX_TX_PENDING_QLEN=8
    

  • Hi,

    It seems like the program is trying to allocate a packet that is too large.

    packet allocation failed, len=1460

    Increasing CONFIG_WIFI_ZPERF_PKT_SIZE should fix this, for example:

    CONFIG_WIFI_ZPERF_PKT_SIZE=1500

    Best regards,
    Marte

  • When I increased the packet size, i got the following warning message 

    <wrn> net_zperf: tcp_upload: Packet size too large! max size: 1024

    I did somehow get the throughput test to execute with no errors by modifying the iperf command to

    iperf -s -i 1 --len 1024 -w 24k -t 20

    Is it possible to change the prj.conf where I don't have to change the iperf server command?

Reply Children
Related