## 2 Methods
### Reliable Transmission Design Mechanism
#### 2.1.2 NACK Dynamic Adjustment Transmission Mechanism
To address this issue, we have implemented a mechanism during the processing of data packets that reduces the impact of reordering. The core idea of this mechanism can be summarized as dynamically setting the transmission time for a NACK based on the average arrival time of out-of-order packets. This approach aims to minimize excessive waiting while tolerating a certain degree of reordering. Figure 2 illustrates the internal data packet processing. In particular, this system includes a process for handling out-of-order packets. The method employed in this paper effectively reduces the occurrence of spurious retransmissions to some extent. The gray boxes in the flowchart provide further clarification of Algorithms 4 and 5 that we implemented. ```
1:Input: L, dupthresh
2:if L > avg then
3: avg \(\leftarrow\) (1 - \(\alpha\)) \(\cdot\) avg + \(\alpha\) \(\cdot\) L
4:else
5: avg \(\leftarrow\) (1 - \(\alpha\cdot x\)) \(\cdot\) avg + (\(\alpha\cdot x\)) \(\cdot\) L
6:endif
7:dupthresh \(\leftarrow\) avg
```  
**Algorithm 5** Update dupthresh  
In our scenario, packet reordering caused by link aggregation often leads to spurious retransmissions, which can result in significant bandwidth consumption, especially when the packet loss rate is high. To address this issue, we have implemented a mechanism during the processing of data packets that reduces the impact of reordering. The core idea of this mechanism can be summarized as dynamically setting the transmission time for a NACK based on the average arrival time of out-of-order packets. This approach aims to minimize excessive waiting while tolerating a certain degree of reordering. Figure 2 illustrates the internal data packet processing. In particular, this system includes a process for handling out-of-order packets. The method employed in this paper effectively reduces the occurrence of spurious retransmissions to some extent. The gray boxes in the flowchart provide further clarification of Algorithms 4 and 5 that we implemented. ```
1



When the receiving end detects a missing packet, it starts recording the time L of the out-of-order packet until the missing packet arrives. When the received packet sequence number is greater than the expected sequence number, a new retransmission request task is created, and a timestamp is recorded. If out-of-order packets occur at this time, the arriving packet will have a sequence number smaller than the current retransmission request task identifier. This will update the previous retransmission request task and record the current time of the last update before the retransmission request task. Each task will record a timestamp when it is created and a last updated timestamp when out-of-order packets occur. The time difference between these timestamps can be used as the retransmission request packet's sending time. Setting this to the average of ten measurements can avoid the impact of a single measurement being too large or too small. If no out-of-order packets occur, the current time is not recorded, and the sending time is set to a default value. We use (current time--timestamp) as L in the algorithm shown below Algorithm 4. The core of this algorithm relies on two key timings: one is the transmission time, dupthresh, which is established when the NACK timer is created, and the other is the actual waiting time, L, that the task needs to endure due to link reordering. The value of dupthresh is determined by the previously established L. Once the NACK timer is set with this dupthresh, it remains unchanged. Any modifications to L will only affect the dupthresh assigned to the next newly created NACK timer. The specific algorithm is shown in Algorithm 5. In addition, we employ a clever Exponentially Weighted Moving Average (EWMA) method to calculate the averages for this model, thereby enhancing its robustness [23]. Among them, \(\alpha\) is the EWMA factor, usually 1/3, and x is the multiplicative factor, usually 4. Subsequently, the dupthresh is set to the average out-of-order packet length, avg.