Green networking with packet processing engines: Modeling and optimization