WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2016-Jul-20 08:24:01

alice_warp
Member
From: Italy
Registered: 2015-Sep-08
Posts: 53

Error: Unlock Tx Pkt Buf State Mismatch

Hi,

I made some changes in 802.11 Reference Design v1.3, but I don't understand the reason of this error.
The function lock_pkt_buf_tx(pkt_buf_sel) gives PKT_BUF_MUTEX_FAIL_ALREADY_LOCKED.
Could you explain me what kind of error is this?
Thank you in advance,

Alice

Offline

 

#2 2016-Jul-20 09:48:25

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Error: Unlock Tx Pkt Buf State Mismatch

The 802.11 ref design uses a simple mutex to manage control of the Tx and Rx packet buffers between CPU High and CPU Low. We use the Xilinx axi_mutex core for this. Each packet buffer must be unlocked before it can be re-locked by a CPU. Your new code must have resulted in a packet buffer that was owned by one CPU when the other CPU attempted to lock it.

I would strongly encourage you to upgrade to the latest 802.11 reference design release (v1.5.2). We have improved many things since v1.3, including a restructuring of the Tx/Rx packet buffer state handling between CPUs. The current scheme is documented in the user guide.

Offline

 

#3 2016-Dec-14 06:00:01

alice_warp
Member
From: Italy
Registered: 2015-Sep-08
Posts: 53

Re: Error: Unlock Tx Pkt Buf State Mismatch

I followed your advice upgrading to the latest release (v1.5.3), but it still happens:

***********************************************
     ***** WARP v3 Clock Config Core *****
      Program Assembly Date: 24 Jan 2015

No config data in EEPROM - Using Defaults
No Clock Module Detected
Clock Config Complete - Continuing Boot Process
*********************************
----- Mango 802.11 Reference Design -----
----- v1.5.3 ----------------------------
----- wlan_mac_sta ----------------------
Compiled Dec 14 2016 11:50:08

UNLOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
UNLOCK_PKT_BUF: 2
UNLOCK_PKT_BUF: 3
UNLOCK_PKT_BUF: 4
UNLOCK_PKT_BUF: 5
UNLOCK_PKT_BUF: 6
UNLOCK_PKT_BUF: 7
UNLOCK_PKT_BUF: 8
UNLOCK_PKT_BUF: 9
UNLOCK_PKT_BUF: 10
UNLOCK_PKT_BUF: 11
UNLOCK_PKT_BUF: 12
UNLOCK_PKT_BUF: 13
UNLOCK_PKT_BUF: 14
UNLOCK_PKT_BUF: 15
UNLOCK_PKT_BUF: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
LOCK_PKT_BUF: 1
UNLOCK_PKT_BUF: 2
LOCK_PKT_BUF: 2
UNLOCK_PKT_BUF: 6
UNLOCK_PKT_BUF: 14
UNLOCK_PKT_BUF: 15
------------------------
DRAM SODIMM Detected
Tx Queue of 3413 placed in DRAM: using 13652 kB
Initializing Event log (1048061952 bytes) at 0xC187D800
BSS Info list (len 384) placed in DRAM: using 27 kB
Station Info list (len 384) placed in DRAM: using 27 kB
  1 Eth Tx BDs placed in BRAM: using 64 B
239 Eth Rx BDs placed in BRAM: using 14 kB
------------------------
WLAN EXP v1.5.3 (compiled Nov 21 2016 12:49:15)
Configuring transport ...
  ETH B MAC Address: 40:D8:55:04:25:7F
  ETH B IP  Address: 10.0.0.0
  Configuring ETH B with 9024 byte buffers (3 receive, 2 send)
  ETH B speed 1000 Mbps (default)
  Listening on UDP ports 9500 (unicast) and 9750 (broadcast)
  Not waiting for Ethernet link.  Current status:
      ETH B not ready
  !!! Make sure link is ready before using WLAN Exp. !!!
WLAN EXP Initialization complete

------------------------
WLAN MAC Station boot complete:
  Serial Number : W3-a-00725
  Default SSID  : alix-ap
  MAC Addr      : 40:D8:55:04:25:7E


Press the Esc key in your terminal to access the UART menu
CPU_LOW is now running XFSM at slot 1
UNLOCK_PKT_BUF: 0
IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 0
IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
************************ Station Information *************************
0: [1] 00-1A-73-03-73-5E
    Last update:   8 msec ago
BSS Details:
  BSSID           : 00-1A-73-03-73-5E
   SSID           : alix-ap
   Channel        : 6
   Beacon Interval: 100 TU (102400 us)
UNLOCK_PKT_BUF: 0
IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1

IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
IPC_MBOX_TX_MPDU_DONE: 0
LOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 0
UNLOCK_PKT_BUF: 1
Error: unable to unlock tx pkt_buf 1
UNLOCK_PKT_BUF: 1

...

pkt_buf 1 was locked at the beginning and then CPU fails to unlock. I don't understand the reason...

Last edited by alice_warp (2016-Dec-15 04:31:34)

Offline

 

#4 2016-Dec-15 09:48:21

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Error: Unlock Tx Pkt Buf State Mismatch

unlock_tx_pkt_buf() returns a status code indicating if the unlock succeeds or why it fails. Unlock failure can be either PKT_BUF_MUTEX_FAIL_NOT_LOCK_OWNER or PKT_BUF_MUTEX_ALREADY_UNLOCKED. You will need to examine your code changes in CPU High and CPU Low to figure out why the packet buffer mutex is not in the expected state.

Offline

 

#5 2016-Dec-15 14:37:57

alice_warp
Member
From: Italy
Registered: 2015-Sep-08
Posts: 53

Re: Error: Unlock Tx Pkt Buf State Mismatch

murphpo wrote:

unlock_tx_pkt_buf() returns a status code indicating if the unlock succeeds or why it fails. Unlock failure can be either PKT_BUF_MUTEX_FAIL_NOT_LOCK_OWNER or PKT_BUF_MUTEX_ALREADY_UNLOCKED. You will need to examine your code changes in CPU High and CPU Low to figure out why the packet buffer mutex is not in the expected state.

In this case unlock failure is PKT_BUF_MUTEX_FAIL_NOT_LOCK_OWNER and CPU Low didn't lock the buffer before. I don't understand the reason of this behavior... However, I'll check and examine my code anyway. Thank you!

Alice

Offline

 

Board footer