The P4 language has emerged in the last years as a way to flexibly develop the data plane of network devices. However, P4 strictly separates the data plane from the control plane. Therefore, managing the rules stored in the match tables directly from the data plane is not supported. This bachelor thesis deals with the development of a Local Flow Updates (LFU) feature in P4, that aims to address this shortcoming: the work thus falls within the discussion about the creation of smart data planes. The feature has been implemented in a software switch and evaluated in a MAC address learning scenario. Furthermore, it has been compared with a realization in traditional P4 and with other solutions for smart data planes.