|
Bugzilla – Full Text Bug Listing |
| Summary: | Duplicate packets when using two level aggregation | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Hany <hany.assasa> |
| Component: | wifi | Assignee: | sebastien.deronne |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Bug Files
new fix |
||
|
Description
Hany
2015-07-11 09:43:11 UTC
Created attachment 2093 [details]
Bug Files
I actually do not see any duplicates in the traces. Checking back the code, it seems ok, we correctly call the remove function once a packet has been successfully added to the A-MSDU. Furthermore, your fix may result in removed packets because we reached maximum allowed size for the current transmission, which is not correct. Hi Sebastien, Check my attached trace. You can see the duplication in Packet No. 2 in the first A-MSDU Subframe and second subframe. The payload is exactly the same. This is because we were not removing the packets once they were added to A-MSDU. The problem appears in two level aggregation only. The first packet in the two level aggregation does not have this problem. The problem appears in the second packet i.e. A-MPDU Subframe to the last one. They all have the first and the seconds packets duplicated. Without my patch. The receiver always receive duplicate packets. Try to run the two level aggregation example using high PHY data rate e.g. OFDM 150 Mbps with channel bonding. Right, I see now indeed that it does not occur in the first MPDU, but only from MPDU 2 till the last one. Issue is thus related to MacLow::PerformMsduAggregation. But I do not think your changes are ok, they may still remove packets just because we reached the maximum size for the A-MPDU. I will have a deeper look at what is going wrong in the coming days. I found the root cause of the bug in the code, and I confirm the fix is not correct: it dequeues the packet without having any clue whether aggregation will be successful or not. I am investigating how to properly fix it. Created attachment 2099 [details]
new fix
I made a fix for this bug.
It indeeds relies on the dequeue function (before the first MSDU aggregation is performed, it can thus be done in the PerformMsduAggregation itself).
If the MSDU aggregation failed, then the packet needs to be restored in front of the queue.
Since the fix is quite obvious and the issue is an important one, I will not wait too long before delivering it.
Hany confirmed by mail that the patch is successfully working. fixed in changeset 11535:e9812cb35cef |