SDN Controller Design for Dynamic Chaining of Virtual Network Functions