Advances in software-defined networking (SDN) enable a wave of innovation in a wide selection of networks ranging from data center networks to WAN. While existing standard bodies for mobile networks define stringent requirements, they too are embracing the flexibility of SDN in defining the specifications of the next generation of mobile networks. Mobile edge computing (MEC), in particular, is an emerging architecture to bring virtualized network functions and programmable network devices closer to the user. For instance, delay-sensitive or bandwidth-hungry computing resources are moved to the edge of the radio access network (RAN) to provide low latency computation and/or content for users while alleviating the backhaul pressure for network operators. In this paper, we propose an edge gateway (EGW) in the MEC that enables offloading of computation and storage resources to the edge of mobile networks. The EGW is backward compatible with components and protocols of LTE networks and does not require any modification in the user equipment, LTE software, or offloaded resources. We have designed and implemented the EGW using P4 language and verified its operation on a small testbed using a low-end P4 target and a reference LTE protocol stack.