  An effective packet processing abstraction that leverages software or
hardware acceleration techniques can simplify the implementation of
high-performance virtual network functions. In this paper, we explore the
suitability of SDN switches' stateful forwarding abstractions to model
accelerated functions in both software and hardware accelerators, such as
optimized software switches and FPGA-based NICs. In particular, we select an
Extended Finite State Machine abstraction and demonstrate its suitability by
implementing the Linux's iptables interface. By doing so, we provide the
acceleration of functions such as stateful firewalls, load balancers and
dynamic NATs. We find that supporting a flow-level programming consistency
model is an important feature of a programming abstraction in this context.
Furthermore, we demonstrate that such a model simplifies the scaling of the
system when implemented in software, enabling efficient multi-core processing
without harming state consistency.
