A switch processing method, wherein the method is executed by a controller and a logical switch, the logical Switch comprises at least two physical Switches, and the method comprises: allocating (S110, S210), by the controller, a flow table in multiple flow tables of the logical Switch to each physical Switch, wherein the multiple flow tables are a pipeline of the logical Switch; sending (S120, S220), by the controller, mapping information, so that each physical Switch obtains the mapping information, wherein the mapping information comprises a mapping relationship between the physical Switch and each flow table in the multiple flow tables; and sending (S130, S230), by the controller, flow entries to the logical Switch, so that each physical Switch obtains flow entries corresponding to each physical switch and processes a received data packet according to the flow entries or according to the flow entries and the mapping information, wherein the flow entries are content information of each flow table in a flow table set allocated by the controller to each physical Switch, characterized in that the at least two physical Switches comprise a primary Switch and a first extended Switch, wherein the controller is connected to at least the primary Switch, and the first extended Switch is connected to at least the primary Switch; the sending (S120, S220), by the controller, mapping information, comprises: sending, by the controller, the mapping information to at least the primary Switch, so that the primary Switch receives the mapping information and the mapping information received by the first extended Switch comprises the mapping information sent by the controller and/or the primary Switch; and the sending (S130, S230), by the controller, flow entries to the logical Switch, comprises: sending, by the controller, the flow entries of the logical Switch to at least the primary Switch, so that the flow entries received by the primary Switch comprise flow entries corresponding to the primary Switch or the flow entries corresponding to each physical Switch and flow entries received by the first extended Switch comprise flow entries sent by the controller and/or the primary Switch. allocating (S110, S210), by the controller, a flow table in multiple flow tables of the logical Switch to each physical Switch, wherein the multiple flow tables are a pipeline of the logical Switch; sending (S120, S220), by the controller, mapping information, so that each physical Switch obtains the mapping information, wherein the mapping information comprises a mapping relationship between the physical Switch and each flow table in the multiple flow tables; and sending (S130, S230), by the controller, flow entries to the logical Switch, so that each physical Switch obtains flow entries corresponding to each physical switch and processes a received data packet according to the flow entries or according to the flow entries and the mapping information, wherein the flow entries are content information of each flow table in a flow table set allocated by the controller to each physical Switch, characterized in that the at least two physical Switches comprise a primary Switch and a first extended Switch, wherein the controller is connected to at least the primary Switch, and the first extended Switch is connected to at least the primary Switch; the sending (S120, S220), by the controller, mapping information, comprises: sending, by the controller, the mapping information to at least the primary Switch, so that the primary Switch receives the mapping information and the mapping information received by the first extended Switch comprises the mapping information sent by the controller and/or the primary Switch; and the sending (S130, S230), by the controller, flow entries to the logical Switch, comprises: sending, by the controller, the flow entries of the logical Switch to at least the primary Switch, so that the flow entries received by the primary Switch comprise flow entries corresponding to the primary Switch or the flow entries corresponding to each physical Switch and flow entries received by the first extended Switch comprise flow entries sent by the controller and/or the primary Switch. sending, by the controller, the mapping information to at least the primary Switch, so that the primary Switch receives the mapping information and the mapping information received by the first extended Switch comprises the mapping information sent by the controller and/or the primary Switch; and the sending (S130, S230), by the controller, flow entries to the logical Switch, comprises: sending, by the controller, the flow entries of the logical Switch to at least the primary Switch, so that the flow entries received by the primary Switch comprise flow entries corresponding to the primary Switch or the flow entries corresponding to each physical Switch and flow entries received by the first extended Switch comprise flow entries sent by the controller and/or the primary Switch.