Visible to Intel only — GUID: ybz1701721605318
Ixiasoft
Visible to Intel only — GUID: ybz1701721605318
Ixiasoft
5.1.2. Responders
Responders are also stored in the host memory as an array. The IP writes to the responder array, when writeback mode is enabled. However, the link descriptors do not have a responder. Hence, the responder array is not “in sync” with the descriptor array.
sw_idx | Description | hw_idx |
---|---|---|
Block 1 | ||
0 |
Link Descriptor |
1 |
1 |
Data Descriptor 1 |
2 |
2 |
Data Descriptor 2 |
3 |
<n> |
Data Descriptor <n> |
<n+1> |
127 |
Data Descriptor 127 |
128 |
Block 2 | ||
128 |
Data Descriptor 128 |
129 |
129 |
Data Descriptor 129 |
130 |
<n> |
Data Descriptor <n> |
<n+1> |
255 |
Data Descriptor 255 |
256 |
sw_idx | Description | hw_idx |
---|---|---|
Block 1 | ||
0 |
Responder 1 |
2 |
1 |
Responder 2 | 3 |
2 |
Responder 3 | 4 |
<n> |
Responder <n+1> |
<n+2> |
125 | Responder 126 | 127 |
126 | Responder 127 | 128 |
127 |
Responder 128 | 130 |
Block 2 | ||
128 |
Responder 129 |
131 |
129 |
Responder 130 | 132 |
130 | Responder 131 | 133 |
<n> |
Responder <n+1> |
<n+2> |
252 | Responder 253 | 255 |
253 | Responder 254 | 256 |
254 | Responder 255 | 2 |
255 |
Responder 256 | 3 |
The driver also provides a responder tracking index (sw_extract_hw_idx). This index ensures that all responders are evaluated by the software.
Responder wrap around
The sw_idx cannot be derived from hw_idx when the responder wrap around occurs, because within the responder array, there is the same hardware index. To solve this, the driver must have a responder counter(resp_ptr_act_idx) to track the completed responder.
This counter counts each time a responder is completed and is equivalent to sw_idx.
Software IDX | 1st Round | 2nd Round | 3rd Round | |
---|---|---|---|---|
Hardware IDX | Hardware IDX | Hardware IDX | ||
0 | Responder 1 | 2 | 3 | 4 |
1 | Responder 2 | 3 | 4 | 5 |
2 | Responder 3 | 4 | 5 | 6 |
<n> | Responder <n+1> | <n+2> | <n+3> | <n+4> |
125 | Responder 126 | 127 | 128 | 2 |
126 | Responder 127 | 128 | 2 | 3 |
127 | Responder 128 | 2 | 3 | 4 |
The driver uses another counter(resp_ptr_tmp_idx) to back trace the responder.
To update this value, call intel_ssgdma_set_resp_ptr_tmp_idx. The input previous_n_resp represents the previously completed responder(resp_ptr_tmp). It can be retrieved from intel_ssgdma_complete_callback or intel_ssgdma_device_port_poll_for_completion. To move to the next resp_ptr_tmp, use intel_ssgdma_get_next_tmp_resp, as this function deals with the wrap around of the responder buffer.