摘要 |
An embodiment of the present invention provides a code loading method, including: obtaining, by a control plane of a network apparatus, a process to be executed by a forwarding plane of the network apparatus and code that executes the process, where the code is described by using a high-level programming language; determining, by the control plane of the network apparatus, that service configuration information of the network apparatus corresponds to the code; compiling, by the control plane of the network apparatus, the code to generate compiled code; and loading, by the control plane of the network apparatus, the compiled code to the forwarding plane of the network apparatus. In addition, an embodiment of the present invention further provides a corresponding network apparatus. A new service may be deployed by using the foregoing technical solutions, which helps meet a requirement for a new service. |