A method for processing a packet at an OpenFlow switching device, wherein the switching device stores a flow table and a database and the flow table contains a first flow entry and a second flow entry, ∘ wherein the first flow entry comprises: a match field used for designating information that needs to be matched and used for instructing the switching device to perform a matching between information that is of the packet and needs to be matched and a first field of each record in the database, and the information that needs to be matched comprises one or more of a packet header field, an identity of an ingress port from which the switching device receives the packet, and OpenFlow metadata associated with the packet; a packet processing instruction; a first priority, ∘ wherein the second flow entry comprises a second priority being lower than the first priority and indicating that matching between a packet and the second flow entry is performed only after matching between the packet and the first flow entry fails, wherein the second flow entry comprises a record addition instruction, and wherein the second flow entry universally matches all packets, wherein the method comprises: • receiving the packet; • obtaining, according to the match field of the first flow entry in the flow table, a value of the information that is of the packet and needs to be matched; • performing, under an instruction of the match field, matching between the value of the information that is of the packet and needs to be matched and the first field of each record in the database, wherein the first field is used for denoting a designated value of the information that needs to be matched; and • when a first record matching the packet is found, processing the packet according to the packet processing instruction • when no first record matching the packet is found, performing a matching between the packet and the second flow entry and performing the matching successfully, and adding the value of the information that is of the packet to the database under an instruction of the record addition instruction. ∘ wherein the first flow entry comprises: a match field used for designating information that needs to be matched and used for instructing the switching device to perform a matching between information that is of the packet and needs to be matched and a first field of each record in the database, and the information that needs to be matched comprises one or more of a packet header field, an identity of an ingress port from which the switching device receives the packet, and OpenFlow metadata associated with the packet; a packet processing instruction; a first priority, a match field used for designating information that needs to be matched and used for instructing the switching device to perform a matching between information that is of the packet and needs to be matched and a first field of each record in the database, and the information that needs to be matched comprises one or more of a packet header field, an identity of an ingress port from which the switching device receives the packet, and OpenFlow metadata associated with the packet; a packet processing instruction; a first priority, ∘ wherein the second flow entry comprises a second priority being lower than the first priority and indicating that matching between a packet and the second flow entry is performed only after matching between the packet and the first flow entry fails, wherein the second flow entry comprises a record addition instruction, and wherein the second flow entry universally matches all packets, • receiving the packet; • obtaining, according to the match field of the first flow entry in the flow table, a value of the information that is of the packet and needs to be matched; • performing, under an instruction of the match field, matching between the value of the information that is of the packet and needs to be matched and the first field of each record in the database, wherein the first field is used for denoting a designated value of the information that needs to be matched; and • when a first record matching the packet is found, processing the packet according to the packet processing instruction • when no first record matching the packet is found, performing a matching between the packet and the second flow entry and performing the matching successfully, and adding the value of the information that is of the packet to the database under an instruction of the record addition instruction.