US 12,445,393 B2
Hardware-triggered traffic mirroring
Giuseppe Scaglione, Granite Bay, CA (US)
Assigned to Hewlett Packard Enterprise Development LP, Spring, TX (US)
Filed by Hewlett Packard Enterprise Development LP, Houston, TX (US)
Filed on Jul. 29, 2022, as Appl. No. 17/877,449.
Prior Publication US 2024/0039868 A1, Feb. 1, 2024
Int. Cl. H04L 49/20 (2022.01); H04L 43/10 (2022.01); H04L 43/12 (2022.01); H04L 49/351 (2022.01)
CPC H04L 49/208 (2013.01) [H04L 43/10 (2013.01); H04L 43/12 (2013.01); H04L 49/351 (2013.01)] 18 Claims
OG exemplary drawing
 
1. A method comprising:
processing a received packet by forwarding hardware of a network device;
determining whether the processing of the received packet changes a state of the forwarding hardware, wherein the changed state corresponds to a performed operation at the forwarding hardware;
in response to determining a change to the state, determining, by the forwarding hardware, whether the change of the state of the forwarding hardware satisfies a trigger condition in the forwarding hardware for initiating packet mirroring;
in response to determining that the trigger condition is satisfied, issuing, by the forwarding hardware, a hardware interrupt to be intercepted by a processor of the network device for initiating traffic mirroring at the network device, wherein issuing the hardware interrupt to be intercepted by the processor comprises updating an interrupt register to include an interrupt configured to cause a mirroring process to initiate a mirroring event;
identifying, after the hardware interrupt is issued and by the mirroring process executing on the processor, a set of packets that are to be mirrored based on one or more mirroring parameters indicated by the trigger condition, wherein the set of packets are subsequent to the packet and to be processed by the forwarding hardware;
mirroring the set of packets to a target by sending a copy of a respective packet in the set of packets to the target; and
in response to determining expiration of the trigger condition, terminating the mirroring of the set of packets, wherein:
the expiration of the trigger condition comprises a passage of an amount of time indicated by a predefined duration of the mirroring event, and
the predefined duration is one of the mirroring parameters indicated by the trigger condition.