主权项 |
1. A security device, comprising:
a controller configured to receive incoming data packets and to determine a flow identifier associated with a received data packet, the controller further determining an event counter associated with the flow and providing a counter identifier to a memory controller; and a counter memory comprising a plurality of memory banks, each memory bank storing a partial counter value for one or more event counters, the counter memory being in communication with the memory controller and indexed by the counter identifier, wherein the memory controller marks the memory bank last selected and, in response to the memory controller receiving the counter identifier from the controller, the memory controller selects for access a single memory bank in the counter memory that was not marked as the memory bank last selected, the memory controller accessing the plurality of memory banks in the counter memory in any order with the same memory bank not being selected for access in consecutive counter updates, and the memory controller retrieves the partial counter value associated with only one counter identifier in the selected memory bank and the memory controller updates the partial counter value, the updated partial counter value being written back to the selected memory bank; and wherein the memory controller selects a first memory bank to update the partial counter value for a first counter identifier and marks the first memory bank, and the memory controller next selects a second memory bank not marked to update a partial counter value, the memory controller is configured to select a second counter identifier different from the first counter identifier to update the partial counter value in the second memory bank during the latency window of the update of the partial counter value of the first counter identifier. |