## 4 Proposed Scheme
If there is no matched flow entry, the switch sends the PacketIn message to the SDN controller (line 11). When the controller gets PacketIn message from the switch, it computes paths and sends FlowModify message to the switch to insert the flow entry to the flow table. When the switch gets the FlowMod message of adding a flow, it starts the process to insert the flow into the table (line 13-21). If the flow table is full, the switch updates the flow types (line 14-15), then selects and deletes a target flow entry to be replaced with it (line 16-19). First, the switch attempts to select and delete the target entry that has the maximum value of the matching period dividing by the MWT among short flows (line 16-17). If there is no short flow entry, it selects and deletes an entry among long flows (line 18-19). After deleting the target entry, the switch sends the FlowRemoved message to the controller (line 20). Lastly, the switch adds the newly inserted flow in the flow table (line 21). Figure 4: Flow identification in Short Flow First (SFF) scheme. Figure 6 demonstrates an example of updating the flow table when the LRU scheme is applied. In the figure, the flow table is full after Flow 1 and 2 initially reach the switch followed by Flow 3, 4 and 5 in sequence. Flow 1 and 2 that arrive at \(t_{3}\) match the existing entries. As there is no space left in the flow table for Flow 6, 7 and 8 arriving at \(t_{4}\), Flow 3, 4 and 5 are deleted and Flow 6, 7 and 8 are inserted by the LRU scheme. When Flow 9 and 10 reach \(t_{5}\), Flow 1 and 2 are deleted by the LRU scheme from the flow table though they are to be matched again because they are the long flows. Instead, Flow 9 and 10 are inserted. Once Flow 1 and 2 arrive at \(t_{6}\), the existing Flow 6 and 7 are deleted and Flow 1 and 2 are inserted. Flow 1 is deleted by Flow 14 at \(t_{8}\) and regenerated at \(t_{9}\). As suggested, Flow 1 and 2 are repeatedly matching flow entries. However, the process of deletion and regeneration by other flows was found to be inefficient. Figure 7 shows an example of updating the flow table using the SFF scheme. In the figure, the flags, S and L represent the short and long flow types, respectively. The flags of Flow 1 and 2 are assigned as S after they arrive. The flags are also assigned as S when Flow 3, 4 and 5 reach \(t_{2}\). Flow 1 and 2 are identified as repeatedly matching flows with a period when they arrive at \(t_{3}\), changing the flags into L. The period of these flows is \(t_{3}\)-\(t_{0}\). When Flow 6, 7 and 8 reach \(t_{4}\) with the flow table full, the flows to be deleted are determined among the short flows whose flags are assigned as S. Thus, Flow 3, 4 and 5 of the short flows are deleted and Flow 6, 7 and 8 are inserted. Flow 6 and 7 are deleted and Flow 9 and 10 are inserted at \(t_{5}\) as well. Flow 1 and 2 arriving at \(t_{6}\) match the existing flow entries. The flow entries assigned as S at \(t_{7}\) and \(t_{8}\) are deleted and new flows are inserted. Lastly, Flow 1 and 2 match the  
Figure 5: Pseudo code of the SFF scheme. Figure 6: An example of updating the flow table using the Least Recently Used (LRU) scheme. existing flow entries again upon reaching \(t_{9}\). The LRU scheme in this example replaced the flow entries 13 times while the SFF scheme replacing them 9 times. This indicates that unnecessary insertion and deletion may decrease when the flow entry replacement considers the flow characteristics.