[Block ACK]ADDBA+BA

Block ACK流程

在这里插入图片描述

ADDBA

会话属性:强调Block ACK Policy
Number of Buffers:一般是64,然后在11ax上面,可以支持到256(MSDU个数)

ADDBA req

action帧
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

ADDBA resp

action帧
在这里插入图片描述

Delete Block Ack

action帧
在这里插入图片描述
删除建立的TID=0的BA<

Full state block ack operation Under full state block ack, the recipient maintains an ack state scoreboard for each block ack session. The scoreboard records the ack state of up to 64 MSDUs. When fragmenta tion is used each MSDUmaybefragmentedinupto16 fragments, thus the scoreboard is an up to 64 entry by 16-bit array. A recipient implementation with limited memory may constrain the extent of the array by setting the BufferSize parameter in the ADDBA Response. The MSDU sequence number is a 12-bit value, thus the scoreboard represents a windowinthesequencenumberspaceof4096values.Thescoreboardwindowisdefined by a beginning sequence number WinStart, an ending sequence number WinEnd, and an extent WinSize. With the establishment of the block ack session the scoreboard is initialized with WinStart set to the starting sequence number provided in the ADDBA request. When a QoS Data frame arrives, if the sequence number falls within the space represented by the scoreboard then the recipient will index the scoreboard using the data frame’s sequence number (SN) and record its correct receipt. If the SN is outside the space represented by the scoreboard but within the range WinEnd to WinStart + 211 (half the sequence number space) then the recipient will shift the scoreboard to the right until it includes the new sequence number on the rightmost edge of its window. WhenaBARarrives, the scoreboard window is shifted to the right so that WinStart is equal to the SSN provided in the BAR frame and a BA response is returned with the contents of the scoreboard. Motivation for partial state block ack Withthe original block ack mechanisms, it is required that the scoreboard state persist for the duration of the block ack session. This burdens the recipient implementation with the need to maintain state for all active block ack sessions and, in practice, with the low latency required to produce a BA in response to a BAR, this means using expensive on chip memory. Withthe 802.11n amendment the rules are relaxed so that on-chip memory reserved for block ack state may be reused by different block ack sessions. The state memory effectively serves as a cache, storing the state of the most recently active block ack session. The newer rules are referred to as partial state block ack and are fully backward compatible with the original full state block ack rules. To understand the motivation for the change consider a typical implementation illustrated in Figure 9.16. Under immediate BA, when the recipient receives a BAR or an aggregate frame containing QoS Data frames with Normal Ack policy, the recipient must transmit a BAResponseframeSIFSafterreceiving the BARoraggregateQoSData frame. With decode latencies on the receive path and encode latencies on the transmit path, there is little time available to locate the appropriate state information and form the BAResponse. This largely necessitates on-chip storage of the block ack scoreboard that will be returned in the BA Response. The other major function in the block ack mechanism is the reassembly and reorder function, which reassembles complete MSDUs and forwards them in order to the higher Typical functional split for immediate block ack implementation in recipient station. layers. This function is not time critical and requires a large buffer for storing packets during the reorder and reassembly process and as such is typically implemented in the system hosting the network interface. Thenewpartial state rules do not affect the reorder and reassembly process, but reduce the resource requirements in the network interface for storing the block ack scoreboard. A reorder buffer is still required for each block ack session, but since this is typically stored in the host memory it is relatively cheap. Much less memory is required on-chip to store the block ack scoreboard since the same memory can be reused for multiple block ack sessions
08-19
**HT-Immediate Block Ack(高吞吐量即时块确认)** 是 IEEE 802.11n 标准中定义的一种确认机制,用于在高吞吐量(HT)无线局域网中更高效地确认多个 MPDU 的接收情况。它是 **BlockAck(块确认)机制的一种实现方式**,并且在接收端收到聚合帧(A-MPDU)后**立即返回 BlockAck 响应帧(BA)**,以提升无线通信的效率。 --- ## ✅ 一、HT-Immediate Block Ack 的定义 ### ✅ 1. **定义** HT-Immediate Block Ack 是指: - 发送端使用 **BlockAck No Ack Policy** 发送多个 MPDU; - 接收端在收到这些 MPDU 后,**立即发送 BlockAckBA)帧**,而不是对每个 MPDU 单独进行 ACK; - BA 帧中包含一个 bitmap,表示哪些 MPDU 已成功接收。 ### ✅ 2. **主要目的** - 减少每个 MPDU 的确认开销; - 支持 A-MPDU(聚合 MPDU)传输; - 提高无线网络的吞吐量和效率。 --- ## ✅ 二、HT-Immediate Block Ack 的工作流程 ### ✅ 1. **BlockAck 会话建立** - 通信双方通过 **ADDBA Request/Response** 帧协商 BlockAck 参数(如窗口大小、TID、起始序列号等); - 建立 BlockAck 会话。 ### ✅ 2. **发送端发送 A-MPDU** - 使用 BlockAck No Ack Policy; - 多个 MPDU 被聚合为一个 A-MPDU 发送; - 不要求每个 MPDU 都立即收到 ACK。 ### ✅ 3. **接收端处理 A-MPDU** - 将每个 MPDU 插入重排序缓冲区(Reorder Buffer); - 若收到 BAR 帧,则立即返回 BA 帧; - 若未收到 BAR,但 BlockAck Policy 是 Immediate,则在收到最后一个 MPDU(MoreFrag=0)后**立即返回 BA 帧**。 ### ✅ 4. **发送端接收 BA 帧** - 根据 BAbitmap 判断哪些 MPDU 成功接收; - 对未确认的 MPDU 进行重传。 --- ## ✅ 三、BlockAck Policy 类型 IEEE 802.11 支持以下几种 BlockAck 策略: | BlockAck Policy | 是否需要 BAR | 是否立即返回 BA | 说明 | |------------------|--------------|------------------|------| | Normal Ack Policy | ❌ 否 | ❌ 否 | 每个 MPDU 都需要单独确认(传统方式) | | BlockAck No Ack Policy | ✅ 是 | ❌ 否 | 需要 BAR 触发 BA 响应 | | HT-Immediate BlockAck | ❌ 否 | ✅ 是 | 接收端收到最后一个 MPDU 后立即返回 BA | --- ## ✅ 四、HT-Immediate BlockAck 的帧交互示例 ```text STA A (发送端) AP (接收端) | | |<----- A-MPDU (MPDU 1, 2, 3) ---->| | | |<----- BlockAck (BA) bitmap ----->| | | ``` - A-MPDU 中包含多个 MPDU; - 接收端在收到最后一个 MPDU 后,立即返回 BA; - BA 中的 bitmap 表示哪些 MPDU 已接收。 --- ## ✅ 五、C语言模拟 HT-Immediate BlockAck 的行为 以下是一个简化版的 BlockAck 机制模拟,展示 HT-Immediate BlockAck 的基本行为: ```c #include <stdio.h> #include <stdint.h> #include <string.h> #define MAX_SEQ 4096 #define WINDOW_SIZE 64 typedef struct { uint16_t seq; int received; } MPDU_STATUS; MPDU_STATUS scoreboard[MAX_SEQ]; // 用于记录接收状态 int start_seq = 0; // BlockAck 窗口起始序列号 // 初始化 scoreboard void init_scoreboard() { for (int i = 0; i < MAX_SEQ; i++) { scoreboard[i].received = 0; } } // 接收一个 MPDU,并记录其序列号 void receive_mpdu(uint16_t seq, int is_last_frag) { printf("Received MPDU: Seq %d\n", seq); scoreboard[seq].seq = seq; scoreboard[seq].received = 1; // 如果是最后一个分片,且是 HT-Immediate BlockAck Policy if (is_last_frag) { printf("Triggering HT-Immediate BlockAck...\n"); send_blockack(); } } // 发送 BlockAck 帧(包含 bitmap) void send_blockack() { printf("Sending BlockAck (BA) Frame:\n"); printf("Bitmap: "); for (int i = 0; i < WINDOW_SIZE; i++) { uint16_t seq = (start_seq + i) % MAX_SEQ; if (scoreboard[seq].received) { printf("1"); } else { printf("0"); } } printf("\n"); } int main() { init_scoreboard(); // 模拟接收 A-MPDU 中的多个 MPDU receive_mpdu(100, 0); // MoreFrag = 1 receive_mpdu(101, 0); receive_mpdu(102, 1); // MoreFrag = 0 -> 触发 BlockAck return 0; } ``` --- ## ✅ 六、总结 | 内容 | 说明 | |------|------| | ✅ HT-Immediate BlockAck 是什么? | IEEE 802.11n 中的块确认机制 | | ✅ 是否需要 BAR 帧? | 否 | | ✅ 是否立即返回 BA? | 是 | | ✅ 主要优点 | 减少确认开销,提高吞吐量 | | ✅ 适用场景 | A-MPDU 聚合传输 | --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值