The Static Packet Filter has one interrupt that is used to inform the host about excessive number of logged packet drops. The addresses of the instructions (or drop codes) in the instruction memory that cause packet to be dropped are associated with a threshold. When the threshold is met, the packet drop is logged. Each time a packet drop is logged, it is counted. When the number of logged records reaches the value specified by the SPF_INTCNT register, the host is interrupted. The threshold settings can be controlled by host software to limit the frequency of interrupts. Writing a zero to SPF_INTCNT disables the interrupt in this scenario. Whenever interrupt is enabled and is triggered, it can be cleared by writing one to either Raw register or Masked register.
Interrupts are controlled by the following registers:
- Raw register SPF_INT_RAW: Holds the Raw state of interrupt, that is, without mask. The hardware interrupt is latched in this register and is only cleared when a one is written to either Raw register or Masked register. Writing a zero has no effect on this register.
- Masked register SPF_INT_MASKED: This is the actual interrupt given to the system. It is the result of bitwise AND operation of Raw and Mask registers. Once the interrupt is sensed by the system, this register should be cleared by writing one to this register or to Raw register during ISR execution. Writing zero has no effect on this register
- Mask set register SPF_MASK_SET: Writing one to this register enables the interrupt. By default, the interrupt is disabled and needs to be enabled by writing a one to this register. Writing a zero has no effect on this register. Writing to this register also set clear register.
- Mask clear register SPF_MASK_CLR: Writing one to this register disables interrupt. Writing a zero has no effect on this register.