WO2019042372A1 - 报文转发 - Google Patents

报文转发 Download PDF

Info

Publication number
WO2019042372A1
WO2019042372A1 PCT/CN2018/103321 CN2018103321W WO2019042372A1 WO 2019042372 A1 WO2019042372 A1 WO 2019042372A1 CN 2018103321 W CN2018103321 W CN 2018103321W WO 2019042372 A1 WO2019042372 A1 WO 2019042372A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
outbound
outbound interface
numa node
aggregation group
Prior art date
Application number
PCT/CN2018/103321
Other languages
English (en)
French (fr)
Inventor
刘文玉
柳佳佳
Original Assignee
新华三技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 新华三技术有限公司 filed Critical 新华三技术有限公司
Priority to EP18852037.3A priority Critical patent/EP3657740B1/en
Priority to US16/643,175 priority patent/US11343175B2/en
Priority to JP2020511448A priority patent/JP7053798B2/ja
Publication of WO2019042372A1 publication Critical patent/WO2019042372A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • NUMA Non Uniform Memory Access Architecture
  • the memory access time depends on the memory location of the processor. Through the NUMA architecture, dozens or even hundreds of CPUs (Central Processing Units) can be combined in one device.
  • the NUMA architecture can have multiple NUMA nodes, each having multiple CPUs, local memory, I/O interfaces, and network cards.
  • Link aggregation is to aggregate multiple physical Ethernet interfaces to form a logical aggregation group.
  • the upper layer entity in the same aggregation group uses multiple physical links in the same aggregation group as one logical link. Increase the link bandwidth by bundling multiple physical Ethernet ports to form an Ethernet logical link.
  • Link aggregation is generally used to connect one or more devices with high bandwidth requirements, such as servers or server groups connected to the backbone network.
  • FIG. 1 is a schematic structural diagram of a device after link aggregation is performed in the related art.
  • FIG. 2 illustrates a flow chart of a message forwarding method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic structural diagram of a device after link aggregation according to an embodiment of the present disclosure.
  • FIG. 4 shows a schematic flowchart of step S22 in the message forwarding method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart of step S22 in a packet forwarding method according to an embodiment of the present disclosure.
  • FIG. 6 shows a schematic flowchart of step S22 in the packet forwarding method according to an embodiment of the present disclosure.
  • FIG. 7 shows a schematic flowchart of a message forwarding method according to an embodiment of the present disclosure.
  • FIG. 8 shows a block diagram of a message forwarding device in accordance with an embodiment of the present disclosure.
  • FIG. 9 shows a schematic block diagram of a message forwarding device according to an embodiment of the present disclosure.
  • FIG. 10 is a block diagram of a message forwarding device 900, according to an exemplary embodiment.
  • the interfaces of the various physical links may be distributed on different NUMA nodes.
  • the interfaces of the physical links are distributed on different NUMA nodes, if the outbound interface that does not belong to the same NUMA node is selected, the packets are forwarded across the NUMA node, which will increase the computational overhead of the device. The forwarding efficiency is reduced, resulting in a decrease in the throughput of the device.
  • FIG. 1 is a schematic structural diagram of a device after link aggregation is performed in the related art.
  • device A has NUMA node 1, NUMA node 2, and NUMA node 3.
  • Device A also has interface 1 to interface 8.
  • Interface 1 to interface 8 are physical Ethernet interfaces.
  • Interface 1, interface 5, and interface 8 serve as ingress interfaces for receiving messages.
  • Interface 2, interface 3, interface 4, interface 6, and interface 7 serve as the outbound interface for sending packets.
  • Interface 2 and interface 3 are aggregated to form the interface aggregation group 1.
  • Interface 4, interface 6, and interface 7 are aggregated to form the interface aggregation group 2.
  • Interface 1, interface 2, interface 3 and interface 4 belong to NUMA node 1
  • interface 5, interface 6 and interface 7 belong to NUMA node 2
  • interface 8 belongs to NUMA node 3.
  • the device A searches for the outbound interface aggregation group corresponding to the forwarding interface 5 as the outbound interface aggregation group 2 .
  • the device A can select an outbound interface for sending the packet from the outbound interfaces (interface 4, interface 6, and interface 7) included in the outbound interface aggregation group 2. For example, if device A selects interface 4 for transmitting the packet, device A sends the packet through interface 4.
  • interface 5 receives the packet and interface 4 sends the packet.
  • Interface 5 and interface 4 belong to different NUMA nodes, thereby generating messages that are forwarded across NUMA nodes.
  • the NUMA node 2 needs to access the memory of the NUMA node 1, which will increase the computational overhead of the device A and reduce the forwarding efficiency, thereby causing the throughput of the device A to be reduced.
  • FIG. 2 illustrates a flow chart of a message forwarding method according to an embodiment of the present disclosure.
  • the method can be applied to a NUMA architecture device, such as a NUMA server, etc., which is not limited in this disclosure.
  • the method includes steps S21 to S23.
  • the outbound interface aggregation group corresponding to the inbound interface of the received packet is determined according to the forwarding table, where the forwarding table indicates the relationship between the inbound interface and the outbound interface aggregation group.
  • the inbound interface can be a physical Ethernet interface for receiving packets
  • the outbound interface can be a physical Ethernet interface for sending packets.
  • the forwarding table may refer to a data structure for causing the device to forward the received message from the appropriate interface of the device.
  • the forwarding table can include the mapping between the inbound interface and the outbound interface.
  • When the packet is received from the inbound interface the packet is forwarded from the corresponding outbound interface according to the forwarding table.
  • How to determine the forwarding table may adopt the manner in the prior art, and the disclosure is not limited.
  • An outbound interface aggregation group can be a logical aggregation group formed by aggregating multiple outbound interfaces. The outbound interfaces included in the outbound interface aggregation group have the same packet forwarding effect.
  • the outbound interface or the outbound interface aggregation group corresponding to the inbound interface may be determined according to the identifier information and the forwarding table of the inbound interface. In other words, if the inbound interface corresponds to an outbound interface, the packet can be sent through the outbound interface corresponding to the inbound interface. If the inbound interface is an outbound interface aggregation group, you can select an outbound interface from the outbound interface aggregation group to send the packet.
  • the information of the inbound interface may be the information that can be used to uniquely identify the inbound interface, such as the interface number of the inbound interface.
  • the first outbound interface for sending the packet is selected from the at least one outbound interface.
  • the outbound interface after determining the outbound interface aggregation group corresponding to the inbound interface of the received packet according to the forwarding table, if only one outbound interface exists in the outbound interface included in the outbound interface aggregation group, If the inbound interface belongs to the same NUMA node, the outbound interface can be used as the first outbound interface for sending the packet.
  • an outbound interface may be selected as the first outbound interface for sending the packet. It should be noted that the present disclosure does not limit the specific manner of selecting the first outbound interface from the multiple outbound interfaces. For example, the interface may be arbitrarily selected, and the corresponding outbound interface may be determined according to the packet characteristics.
  • the method further includes: establishing a correspondence between the interface and the NUMA node.
  • the relationship between the interface and the NUMA node may include the correspondence between each interface of the device and the NUMA node.
  • the interface number is used as the index keyword.
  • the NUMA node to which the interface belongs can be obtained through the interface number index interface and the NUMA node relationship table.
  • the NUMA node number is used as an index key, and the NUMA node and the interface relationship table are indexed by the NUMA node number to obtain the interface included in the NUMA node.
  • the foregoing two relationship tables may be simultaneously stored.
  • the above two relationship tables can also be recorded by two entries, or by one entry.
  • the above two relationship tables may be stored in a storage medium such as a disk of the device, and the disclosure does not limit this.
  • step S23 the message is sent through the first outbound interface.
  • FIG. 3 is a schematic structural diagram of a device after link aggregation according to an embodiment of the present disclosure.
  • device A has a NUMA structure, and device A has a NUMA node 1, a NUMA node 2, and a NUMA node 3.
  • Each NUMA node has multiple CPUs, local memory, I/O interfaces, and network cards.
  • Device A also has interface 1 to interface 8.
  • Interface 1 to interface 8 are physical Ethernet interfaces.
  • Interface 1, interface 5, and interface 8 are inbound interfaces.
  • Interface 2, interface 3, interface 4, interface 6, and interface 7 are outgoing interfaces.
  • Interface 2 and interface 3 are aggregated to form the interface aggregation group 1.
  • Interface 4, interface 6, and interface 7 are aggregated to form the interface aggregation group 2.
  • Interface 1, interface 2, interface 3 and interface 4 belong to NUMA node 1
  • interface 5, interface 6 and interface 7 belong to NUMA node 2
  • interface 8 belongs to NUMA node 3.
  • the device A searches the forwarding table to obtain the outbound interface aggregation group corresponding to the interface 1 as the outbound interface aggregation group 2.
  • the device A can select an outbound interface for sending packet 1 from multiple outbound interfaces (interface 4, interface 6, and interface 7) included in the outbound interface aggregation group 2.
  • the interface 4 serves as the outbound interface for sending the packet 1, that is, the interface 1 sends the packet 1 through the interface 4, because the interface 4 and the interface 1 belong to the same NUMA node.
  • interface 1 receives message 1, and interface 4 sends message 1.
  • Interface 1 and interface 4 belong to the same NUMA node, so that no packet is forwarded across the NUMA node, so that only the local memory of the NUMA node needs to be accessed during the packet forwarding process, which reduces the computational overhead of the device and improves the forwarding efficiency of the device. And throughput.
  • the device A searches the forwarding table to obtain the outbound interface aggregation group corresponding to the interface 5 as the outbound interface aggregation group 2.
  • the device A can select an outbound interface for sending packet 2 from multiple outbound interfaces (interface 4, interface 6, and interface 7) included in the outbound interface aggregation group 2.
  • the interface 6 and the interface 7 are the same NUMA nodes.
  • the interface 6 or the interface 7 can be used as the outbound interface for sending the packet 2.
  • interface 6 can be selected to send message 2.
  • the interface 5 receives the packet 2, and the interface 6 transmits the packet 2.
  • the method further includes: performing a hash operation according to the packet feature to obtain a hash operation result.
  • the first outbound interface is determined from the outbound interface of the outbound interface aggregation group that belongs to the same NUMA node as the inbound interface.
  • the interface received from the interface 5 determines that the outbound interface of the same NUMA node as the interface 5 is the interface 6 and the interface 7, and the packet can be obtained according to the characteristics of the received packet.
  • the first outbound interface is determined to perform packet forwarding from the interface 6 and the interface 7.
  • the packet forwarding method of the present disclosure can select the outbound interface that belongs to the same NUMA node as the inbound interface of the inbound interface corresponding to the inbound interface of the packet, and does not need to forward the packet across the NUMA node. In the process of packet forwarding, you only need to access the local memory of the NUMA node to reduce the computing overhead of the device and improve the forwarding efficiency and throughput of the device.
  • the packet feature may include one or more of a source IP address, a destination IP address, a source MAC address, a destination MAC address, a source port number, and a destination port number of the packet.
  • the message is characterized by the destination MAC address of the message.
  • the device performs a hash operation on the destination MAC address of the packet, obtains a hash operation result of the destination MAC address, and searches for a preset hash table according to the hash operation result of the destination MAC address, from the outbound interface aggregation group and the The first outbound interface is determined among the multiple outbound interfaces of the same NUMA node.
  • the message is characterized by the destination port number of the message.
  • the device performs a hash operation on the destination port number of the packet to obtain a hash operation result of the destination port number, and searches for a preset hash table according to the hash operation result of the destination port number, from the outbound interface aggregation group and the The first outbound interface is determined among the multiple outbound interfaces of the same NUMA node.
  • a hash table (also called a hash table) is a data structure that directly accesses a memory storage location according to a key value.
  • the data to be queried (Value) is mapped to a location in the table to access the record, thereby speeding up the search.
  • This mapping function is called a hash function
  • the array holding the records is called a hash table.
  • the creation of the hash table is to generate a key value through the hash function and the conflict processing function, and the key value is the search mapping of the data to be queried, and the data to be queried is accessed through the key value.
  • FIG. 4 shows a schematic flowchart of step S22 in the message forwarding method according to an embodiment of the present disclosure.
  • the first egress interface for sending the packet from the egress interface aggregation group and the at least one outbound interface that is the same NUMA node as the inbound interface may include:
  • step S41 the outbound interface included in the outbound interface aggregation group is determined.
  • step S42 the NUMA node to which the inbound interface belongs is determined according to the correspondence between the interface and the NUMA node.
  • the NUMA node to which the inbound interface belongs can be determined by looking up the interface and the NUMA node relationship table. For example, the inbound interface number is used as the index keyword, and the NUMA node to which the inbound interface belongs is obtained through the inbound interface number index interface and the NUMA node relationship table.
  • Table 1 shows a table of interface and NUMA node relationships in device A, in accordance with an embodiment of the present disclosure.
  • the device A can obtain the NUMA node to which the interface 1 belongs as the NUMA node 1 through the lookup table 1.
  • the interface 5 receives the packet 2
  • the device A can obtain the NUMA node to which the interface 5 belongs as the NUMA node 2 through the lookup table 1.
  • step S43 the outbound interface that belongs to the NUMA node is selected as the first outbound interface from the outbound interface included in the outbound interface aggregation group.
  • the device A searches the forwarding table to obtain the outbound interface aggregation group corresponding to the interface 1 as the outbound interface aggregation group 2.
  • the device A determines that the multiple outbound interfaces included in the interface aggregation group 2 are interface 4, interface 6, and interface 7.
  • the device A determines that the NUMA node to which the interface 1 belongs is the NUMA node 1 according to the correspondence between the interface and the NUMA node.
  • the device A can determine whether the interface 4, the interface 6 and the interface 7 belong to the NUMA node 1 one by one, and select the interface 4 belonging to the NUMA node 1 as the first outgoing interface from the outbound interfaces included in the outbound interface aggregation group 2.
  • Interface number NUMA node number Interface 1 NUMA node 1 Interface 2 NUMA node 1 Interface 3 NUMA node 1 Interface 4 NUMA node 1 Interface 5 NUMA node 2 Interface 6 NUMA node 2 Interface 7 NUMA node 2 Interface 8 NUMA node 3
  • FIG. 5 is a schematic flowchart of step S22 in a packet forwarding method according to an embodiment of the present disclosure.
  • the first egress interface for sending the packet from the egress interface aggregation group and the at least one outbound interface that belongs to the same NUMA node as the inbound interface may include:
  • step S51 the NUMA node to which the inbound interface belongs is determined according to the correspondence between the interface and the NUMA node.
  • Step S51 can refer to the description of step S42, and the disclosure is not described again.
  • step S52 the outbound interface included in the NUMA node is determined.
  • the outbound interface included in the NUMA node may be determined by looking up the NUMA node and the interface relationship table. For example, the NUMA node number is used as the index key, and the NUMA node and the interface relationship table are indexed by the NUMA node number to obtain the interface included in the NUMA node. Then use the outbound interface as an index keyword to get the outbound interface included in the NUMA node.
  • Table 2 shows a NUMA node and interface relationship table in device A, in accordance with an embodiment of the present disclosure.
  • the device A can obtain the NUMA node to which the interface 1 belongs as the NUMA node 1 through the lookup table 1.
  • the device A can obtain the outbound interface included in the NUMA node 1 as the interface 2 through the lookup table 2. , interface 3 and interface 4.
  • the interface 5 receives the packet 2
  • the device A can obtain the NUMA node to which the interface 5 belongs as the NUMA node 2 through the lookup table 1.
  • the device A can obtain the outbound interface included in the NUMA node 2 as the interface 6 through the lookup table 2.
  • interface 7. As such, the disclosure will not be described again.
  • the outbound interface that belongs to the outbound interface aggregation group is selected as the first outbound interface from the outbound interface included in the NUMA node.
  • the device A determines that the NUMA node to which the interface 1 belongs is the NUMA node 1 according to the correspondence between the interface and the NUMA node. .
  • Device A determines that the outbound interfaces included in NUMA node 1 are interface 2, interface 3, and interface 4.
  • the device A looks up the forwarding table and obtains the outbound interface aggregation group corresponding to interface 1 as the outbound interface aggregation group 2.
  • the device A can determine whether the interface 2, the interface 3, and the interface 4 belong to the outbound interface aggregation group 2, and select the interface 4 that belongs to the outbound interface aggregation group 2 as the first outbound interface from the outbound interface included in the NUMA node 1.
  • NUMA node number Incoming interface number Outbound interface number NUMA node 1 Interface 1 Interface 2, interface 3, interface 4 NUMA node 2 Interface 5 Interface 6, interface 7 NUMA node 3 Interface 8 does not exist
  • FIG. 6 shows a schematic flowchart of step S22 in the message forwarding method according to an embodiment of the present disclosure.
  • the first egress interface for sending the packet from the egress interface aggregation group and the at least one outbound interface that is the same NUMA node as the inbound interface may include:
  • step S61 the outbound interface included in the outbound interface aggregation group is determined.
  • step S62 the NUMA node to which the inbound interface belongs is determined according to the correspondence between the interface and the NUMA node.
  • Step S62 can refer to the description of step S42, and the disclosure is not described again.
  • step S63 the outbound interface included in the NUMA node is determined.
  • Step S63 can refer to the description of step S52, and the disclosure is not described again.
  • the outbound interface that belongs to the outbound interface aggregation group and the NUMA node is determined according to the outbound interface included in the outbound interface aggregation group and the outbound interface included in the outbound interface aggregation group.
  • the outbound interface is selected as the first outbound interface from the outbound interface that belongs to the outbound interface aggregation group and the NUMA node.
  • the device A searches the forwarding table to obtain the outbound interface aggregation group corresponding to the interface 1 as the outbound interface aggregation group 2.
  • the device A determines that the multiple outbound interfaces included in the interface aggregation group 2 are interface 4, interface 6, and interface 7.
  • the device A determines that the NUMA node to which the interface 1 belongs is the NUMA node 1 according to the correspondence between the interface and the NUMA node.
  • Device A determines that the outbound interfaces included in NUMA node 1 are interface 2, interface 3, and interface 4.
  • the device A determines that the outbound interface that belongs to both the outbound interface aggregation group 2 and the NUMA node 1 is interface 4.
  • the device A uses the interface 4 that belongs to both the outbound interface aggregation group 2 and the NUMA node 1 as the first outbound interface.
  • the device A searches the forwarding table to obtain the outbound interface aggregation group corresponding to the interface 5 as the outbound interface aggregation group 2.
  • the device A determines that the multiple outbound interfaces included in the interface aggregation group 2 are interface 4, interface 6, and interface 7.
  • the device A determines that the NUMA node to which the interface 5 belongs is the NUMA node 2 according to the correspondence between the interface and the NUMA node.
  • Device A determines that the outbound interfaces included in NUMA node 2 are interface 6 and interface 7.
  • the device A determines that the outbound interfaces that belong to both the outbound interface aggregation group 2 and the NUMA node 2 are interface 6 and interface 7.
  • the device A selects the outbound interface as the first outbound interface from the interface 6 and the interface 7 that belong to both the outbound interface aggregation group 2 and the NUMA node 1.
  • the packet feature of the packet 2 is the source MAC address
  • the device A hashes the source MAC address of the packet 2 to obtain a hash operation result of the source MAC address, and searches according to the hash operation result of the source MAC address.
  • a pre-set hash table is used to determine the interface 6 as the outgoing interface for transmitting the message 2 from the interface 6 and the interface 7.
  • FIG. 7 shows a schematic flowchart of a message forwarding method according to an embodiment of the present disclosure. As shown in FIG. 7, the method includes steps S21 to S25.
  • step S21 the outbound interface aggregation group corresponding to the inbound interface of the received packet is determined according to the forwarding table.
  • the first outbound interface for sending the packet is selected from the at least one outbound interface.
  • step S23 the message is sent through the first outbound interface.
  • step S24 when there is no outbound interface of the same NUMA node as the inbound interface in the outbound interface aggregation group, the outbound interface belonging to the other NUMA node in the outbound interface aggregation group is determined to be used for sending the packet.
  • the second output interface when there is no outbound interface of the same NUMA node as the inbound interface in the outbound interface aggregation group, the outbound interface belonging to the other NUMA node in the outbound interface aggregation group is determined to be used for sending the packet.
  • the second output interface when there is no outbound interface of the same NUMA node as the inbound interface in the outbound interface aggregation group, the outbound interface belonging to the other NUMA node in the outbound interface aggregation group is determined to be used for sending the packet. The second output interface.
  • step S25 the message is sent through the second outbound interface.
  • the device A searches the forwarding interface to obtain the outbound interface aggregation group corresponding to the interface 8 as the outbound interface aggregation group 2.
  • the device A determines that the multiple outbound interfaces included in the interface aggregation group 2 are interface 4, interface 6, and interface 7.
  • the device A determines that the NUMA node to which the interface 8 belongs is the NUMA node 3 according to the correspondence between the interface and the NUMA node.
  • the outbound interface determined by the forwarding table does not belong to the NUMA node to which the inbound interface belongs. That is, interface 4, interface 6, and interface 7 do not belong to NUMA node 3.
  • the outbound interface of the outbound interface aggregation group 2 is the outbound interface of the same NUMA node as the interface 8, and the outbound interface for sending the packet 3 is determined from the interface 4, interface 6, and interface 7 included in the outbound interface aggregation group 2.
  • the packet feature of the packet 3 is the source MAC address
  • the device A hashes the source MAC address of the packet 3 to obtain a hash operation result of the source MAC address, and searches according to the hash operation result of the source MAC address.
  • a preset hash table is used to determine the interface 7 as the outgoing interface for transmitting the packet 3 from the interface 4, the interface 6, and the interface 7.
  • FIG. 8 shows a block diagram of a message forwarding device in accordance with an embodiment of the present disclosure.
  • the device can be used for a NUMA-based device, such as a NUMA server, etc., which is not limited in this disclosure.
  • the device includes:
  • the outbound interface aggregation group determining module 81 is configured to determine, according to the forwarding table, an outbound interface aggregation group corresponding to the inbound interface that receives the packet, and the first outbound interface selection module 82 is configured to exist in the outbound interface aggregation group.
  • the inbound interface belongs to the outbound interface of the NUMA node of the same non-uniform memory access architecture
  • the first outbound interface for sending the packet is selected from the outbound interface of the outbound interface aggregation group and the inbound interface that belongs to the same NUMA node.
  • the message sending module 83 is configured to send the message by using the first outbound interface.
  • the first outbound interface selection module 82 includes: a first determining module, configured to determine an outbound interface included in the outbound interface aggregation group; and a NUMA node determining module, configured to Determining a relationship between the NUMA nodes to determine the NUMA node to which the inbound interface belongs; the first selecting module, configured to select an outbound interface that belongs to the NUMA node from the outbound interface included in the outbound interface aggregation group as the The first out interface.
  • the first outbound interface selection module 82 includes: a NUMA node determining module, configured to determine a NUMA node to which the inbound interface belongs according to a correspondence between the interface and the NUMA node; a determining module, configured to determine an outbound interface included in the NUMA node, and a second selecting module, configured to select an outbound interface that belongs to the outbound interface aggregation group from the outbound interface included in the NUMA node as the first Outlet interface.
  • the first outbound interface selection module 82 includes: a first determining module, configured to determine an outbound interface included in the outbound interface aggregation group; and a NUMA node determining module, configured to Corresponding relationship between the NUMA nodes, determining the NUMA node to which the inbound interface belongs; a second determining module, configured to determine an outbound interface included in the NUMA node; and a third determining module, configured to be included according to the NUMA node
  • the outbound interface and the outbound interface included in the outbound interface aggregation group determine the outbound interface that belongs to both the outbound interface aggregation group and the NUMA node.
  • the third selection module is used to aggregate from the outbound interface.
  • the outbound interface that belongs to the NUMA node is selected as the first outbound interface.
  • FIG. 9 shows a schematic block diagram of a message forwarding device according to an embodiment of the present disclosure. As shown in Figure 9:
  • the device further includes: a hash operation module 84, configured to use the packet according to the packet The feature performs a hash operation to obtain a hash operation result.
  • the first outbound interface determining module 85 is configured to: from the outbound interface aggregation group, the outbound interface that belongs to the same NUMA node as the inbound interface according to the hash operation result. Determining the first outgoing interface.
  • the device further includes: a second outbound interface selection module 86, configured to: when the outbound interface aggregation group does not have an outbound interface that belongs to the same NUMA node as the inbound interface, A second outbound interface for sending the packet is determined in the outbound interface of the outbound interface aggregation group that belongs to the other NUMA node.
  • a second outbound interface selection module 86 configured to: when the outbound interface aggregation group does not have an outbound interface that belongs to the same NUMA node as the inbound interface, A second outbound interface for sending the packet is determined in the outbound interface of the outbound interface aggregation group that belongs to the other NUMA node.
  • the packet forwarding device of the present disclosure can select the outbound interface that belongs to the same NUMA node as the inbound interface to forward the packet, and does not need to forward the packet across the NUMA node. In the process of packet forwarding, you only need to access the local memory of the NUMA node to reduce the computing overhead of the device and improve the forwarding efficiency and throughput of the device.
  • FIG. 10 is a block diagram of a message forwarding device 900, according to an exemplary embodiment.
  • the apparatus 900 can include a processor 901, a machine readable storage medium 902 that stores machine executable instructions.
  • Processor 901 and machine readable storage medium 902 can communicate via system bus 903.
  • the processor 901 executes the message forwarding method described above by reading machine executable instructions in the machine readable storage medium 902 corresponding to the message forwarding logic.
  • the specific forwarding method refer to the method shown in FIG. 2, FIG. 3 to FIG. 7, and the foregoing specific embodiments, which are not described in this embodiment.
  • the machine-readable storage medium 902 referred to herein can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like.
  • the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, dvd, etc.), or a similar storage medium, or a combination thereof.
  • FIG. 10 is a schematic diagram of a NUMA node in the NUMA framework.
  • the NUMA framework may be a structure including a plurality of devices 900, and the disclosure will not be described again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Multi Processors (AREA)

Abstract

本公开涉及的报文转发包括:根据转发表确定接收到报文的入接口对应的出接口聚合组,其中,所述转发表表示所述入接口和所述出接口聚合组的关系;当所述出接口聚合组中存在与所述入接口属于相同非统一内存访问架构NUMA节点的至少一个出接口时,从所述至少一个出接口中选取用于发送所述报文的第一出接口;以及通过所述第一出接口发送所述报文。

Description

报文转发
相关申请的交叉引用
本公开基于并要求2017年8月30日递交的中国专利申请201710763296.6的优先权,其所有内容通过引用包含于此。
背景技术
NUMA(Non Uniform Memory Access Architecture,非统一内存访问架构)是一种用于多处理器的计算机存储器设计,内存访问时间取决于处理器的内存位置。通过NUMA架构可以将几十个甚至上百个CPU(Central Processing Unit,中央处理器)组合在一个设备中。NUMA架构可以具有多个NUMA节点,每个NUMA节点分别具有多个CPU、本地内存、I/O接口以及网卡等。
链路聚合是将多个物理以太网接口聚合在一起形成一个逻辑上的聚合组,使用链路聚合服务的上层实体把同一聚合组内的多条物理链路视为一条逻辑链路。通过将多个以太网物理端口捆绑在一起进而形成一条以太网逻辑链路,从而实现增加链路带宽的目的。链路聚合一般用来连接一个或者多个带宽需求大的设备,例如,连接骨干网络的服务器或者服务器群。
附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本公开的示例性实施例、特征和方面,并且用于解释本公开的原理。
图1示出相关技术中设备进行链路聚合后的结构示意图。
图2示出根据本公开一实施例的报文转发方法的流程图。
图3示出本公开一实施例中设备进行链路聚合后的结构示意图。
图4示出根据本公开一实施例的报文转发方法中步骤S22的一示意性的流程图。
图5示出根据本公开一实施例的报文转发方法中步骤S22的一示意性的流程图。
图6示出根据本公开一实施例的报文转发方法中步骤S22的一示意性的流程图。
图7示出根据本公开一实施例的报文转发方法的一示意性的流程图。
图8示出根据本公开一实施例的报文转发装置的框图。
图9示出根据本公开一实施例的报文转发装置的一示意性的框图。
图10是根据一示例性实施例示出的一种用于报文转发装置900的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
在采用NUMA框架的设备之间进行链路聚合之后,各个物理链路的接口可能分布在不同NUMA节点上。当各个物理链路的接口分布在不同NUMA节点上时,如果选取了和入接口不属于相同NUMA节点的出接口,则产生了跨NUMA节点转发报文,将会造成设备的运算开销增大,转发效率降低,从而造成设备的吞吐能力降低。
图1示出相关技术中设备进行链路聚合后的结构示意图。如图1所示,设备A具有NUMA节点1、NUMA节点2和NUMA节点3。设备A还具有接口1至接口8。其中,接口1至接口8均为物理以太网接口。接口1、接口5和接口8作为用于接收报文的入接口。接口2、接口3、接口4、接口6和接口7作为用于发送报文的出接口。接口2和接口3聚合形成出接口聚合组1,接口4、接口6和接口7聚合形成出接口聚合组2。接口1、接口2、接口3和接口4属于NUMA节点1,接口5、接口6和接口7属于NUMA节点2,接口8属于NUMA节点3。
相关技术中,如图1所示,在接口5接收到报文的情况下,设备A查找转 发表获取接口5对应的出接口聚合组为出接口聚合组2。设备A可以从出接口聚合组2所包括的多个出接口(接口4、接口6和接口7)中选取用于发送该报文的出接口。例如,设备A选取接口4用于发送该报文,则设备A通过接口4将该报文发出。在报文的转发过程中,接口5接收报文,接口4发送报文。接口5和接口4属于不同NUMA节点,由此产生了跨NUMA节点转发报文。NUMA节点2需要访问NUMA节点1的内存,将会造成设备A的运算开销增大,转发效率降低,从而造成设备A的吞吐能力降低。
图2示出根据本公开一实施例的报文转发方法的流程图。该方法可以用于NUMA架构设备,例如NUMA服务器等,本公开对此不做限制。如图2所示,该方法包括步骤S21至步骤S23。
在步骤S21中,根据转发表确定接收到报文的入接口对应的出接口聚合组,其中,所述转发表表示所述入接口和所述出接口聚合组的关系。
其中,入接口可以指用于接收报文的物理以太网接口,出接口可以指用于发送报文的物理以太网接口。转发表可以指用于使设备把接收到的报文从设备合适的接口转发出去的数据结构。转发表中可以包括入接口和出接口之间的对应关系,从而在报文从入接口接收时,根据转发表指导报文从对应的出接口转发出去。具体的,如何确定转发表可以采用现有技术中的方式,本公开并不加以限定。出接口聚合组可以指聚合了多个出接口形成的逻辑上的聚合组。出接口聚合组所包括的多个出接口具有相同的报文转发效果。
在一种可能的实现方式中,在入接口接收到报文的情况下,可以根据该入接口的标识信息和转发表,确定该入接口对应的出接口或出接口聚合组。换言之,在该入接口对应的为一个出接口的情况下,即可以通过该入接口对应的出接口发送该报文。在该入接口对应的为一个出接口聚合组的情况下,即可以从该出接口聚合组中选取一个出接口发送该报文。其中,入接口的标识信息可以为入接口的接口编号等能够唯一标识入接口的信息,本公开对此不做限制。
在步骤S22中,当该出接口聚合组中存在与该入接口属于相同NUMA节点的至少一个出接口时,从该至少一个出接口中选取用于发送该报文的第一出接口。
在一种可能的实现方式中,在根据转发表确定接收到报文的入接口对应 的出接口聚合组之后,若该出接口聚合组所包括的多个出接口中仅存在一个出接口与该入接口属于相同NUMA节点,则可以将该仅存在的出接口作为用于发送该报文的第一出接口。
在一种可能的实现方式中,在根据转发表确定接收到报文的入接口对应的出接口聚合组之后,若该出接口聚合组中存在多个出接口与该入接口属于相同NUMA节点,则可以从该存在的多个出接口中选取一个出接口作为用于发送该报文的第一出接口。需要说明的是,本公开不限制从该存在的多个出接口中选取第一出接口的具体方式,例如可以任意选取,再例如可以根据报文特征进行负载分担确定相应的出接口。
在一种可能的实现方式中,该方法还包括:建立接口与NUMA节点之间的对应关系。
例如,建立接口与NUMA节点关系表。其中,接口与NUMA节点关系表可以包括设备的各个接口与NUMA节点之间的对应关系。将接口编号作为索引关键词,通过接口编号索引接口与NUMA节点关系表,可以得到接口所属的NUMA节点。或者,将NUMA节点编号作为索引关键词,通过NUMA节点编号索引NUMA节点与接口关系表,可以得到NUMA节点所包括的接口。在一种可能的实施方式中,为了便于确定接口对应的NUMA节点,以及NUMA节点所包含的出接口,可以同时存储有上述两种关系表。当然,上述两种关系表也可以分别通过两个表项进行记录,也可以通过一个表项进行记录。上述两种关系表可以存储在设备的磁盘等存储介质中,本公开对此不做限制。
在步骤S23中,通过第一出接口发送该报文。
图3示出本公开一实施例中设备进行链路聚合后的结构示意图。如图3所示,设备A为NUMA结构,设备A具有NUMA节点1、NUMA节点2和NUMA节点3。每个NUMA节点分别具有多个CPU、本地内存、I/O接口以及网卡等。设备A还具有接口1至接口8。其中,接口1至接口8均为物理以太网接口。接口1、接口5和接口8为入接口。接口2、接口3、接口4、接口6和接口7为出接口。接口2和接口3聚合形成出接口聚合组1,接口4、接口6和接口7聚合形成出接口聚合组2。接口1、接口2、接口3和接口4属于NUMA节点1,接口5、接口6和接口7属于NUMA节点2,接口8属于NUMA节点3。
作为本实施例的一个示例,如图3所示,在接口1接收到报文1的情况下, 设备A查找转发表获取接口1对应的出接口聚合组为出接口聚合组2。设备A可以从出接口聚合组2所包括的多个出接口(接口4、接口6和接口7)中选取用于发送报文1的出接口。由于出接口聚合组2所包括的多个出接口中,接口4与接口1属于相同NUMA节点,则可以将接口4作为用于发送报文1的出接口,即通过接口4发送报文1。在报文1的转发过程中,接口1接收报文1,接口4发送报文1。接口1和接口4属于相同NUMA节点,由此不产生跨NUMA节点转发报文,从而实现在报文转发的过程中仅需要访问NUMA节点的本地内存,降低设备的运算开销,提高设备的转发效率和吞吐能力。
作为本实施例的一个示例,如图3所示,在接口5接收到报文2的情况下,设备A查找转发表获取接口5对应的出接口聚合组为出接口聚合组2。设备A可以从出接口聚合组2所包括的多个出接口(接口4、接口6和接口7)中选取用于发送报文2的出接口。由于出接口聚合组2所包括的多个出接口中,接口6、接口7与接口5属于相同NUMA节点,则可以将接口6或接口7作为用于发送报文2的出接口。例如,可以选取接口6发送报文2。在报文2的转发过程中,接口5接收报文2,接口6发送报文2。
在一种可能的实现方式中,若该出接口聚合组中与该入接口属于相同NUMA节点的出接口有多个,该方法还包括:根据报文特征进行哈希运算,得到哈希运算结果;根据该哈希运算结果,从该出接口聚合组中与该入接口属于相同NUMA节点的出接口中确定第一出接口。举例来说,上述具体实例中,从接口5接收到的报文,确定出与接口5属于相同NUMA节点的出接口为接口6和接口7,此时可以根据收到的报文的特征进行哈希运算,根据哈希运算结果,从接口6和接口7中确定第一出接口进行报文转发。
本公开的报文转发方法能够在接收到报文的入接口对应的出接口聚合组中选择与该入接口属于相同NUMA节点的出接口转发报文,而无需跨NUMA节点转发报文,从而实现在报文转发的过程中仅需要访问NUMA节点的本地内存,降低设备的运算开销,提高设备的转发效率和吞吐能力。
在上述通过哈希运算进行负载分担时,报文特征可以包括报文的源IP地址、目的IP地址、源MAC地址、目的MAC地址、源端口号和目的端口号中的一项或多项。
作为该实现方式的一个示例,报文特征为报文的目的MAC地址。设备 对报文的目的MAC地址进行哈希运算,得到目的MAC地址的哈希运算结果,并根据目的MAC地址的哈希运算结果查找预先设置的哈希表,从该出接口聚合组中与该入接口属于相同NUMA节点的多个出接口中确定第一出接口。
作为该实现方式的另一个示例,报文特征为报文的目的端口号。设备对报文的目的端口号进行哈希运算,得到目的端口号的哈希运算结果,并根据目的端口号的哈希运算结果查找预先设置的哈希表,从该出接口聚合组中与该入接口属于相同NUMA节点的多个出接口中确定第一出接口。
其中,哈希表(Hash Table,也称散列表),是根据键值(Key)而直接访问内存存储位置的数据结构。换言之,通过计算一个关于键值的函数,将待查询数据(Value)映射到表中一个位置来访问记录,从而加快查找速度。这个映射函数称为哈希函数,存放记录的数组称为哈希表。哈希表的创建就是将待查询数据通过哈希函数和冲突处理函数来生成一个键值,这个键值就是待查询数据的查找映射,通过键值来访问待查询数据。
需要说明的是,本领域技术人员能够理解,进行哈希运算的哈希函数不同,或进行哈希运算的参数不同,则可能得到不同的哈希运算后的结果,本公开对此不做限制。此外,尽管以报文的源IP地址、目的IP地址、源MAC地址、目的MAC地址、源端口号和目的端口号作为示例介绍了报文特征如上,但本领域技术人员能够理解,本公开应不限于此。本领域技术人员可以根据实际应用场景灵活设定报文特征。
图4示出根据本公开一实施例的报文转发方法中步骤S22的一示意性的流程图。如图4所示,从该出接口聚合组中与该入接口属于相同NUMA节点的至少一个出接口中选取用于发送该报文的第一出接口(步骤S22)可以包括:
在步骤S41中,确定该出接口聚合组所包括的出接口。
在步骤S42中,根据接口与NUMA节点之间的对应关系,确定该入接口所属的NUMA节点。
在一种可能的实现方式中,可以通过查找接口与NUMA节点关系表,确定入接口所属的NUMA节点。例如,将入接口编号作为索引关键词,通过入接口编号索引接口与NUMA节点关系表,得到入接口所属的NUMA节点。
作为该实现方式的一个示例,表1示出根据本公开一实施例的设备A中接 口与NUMA节点关系表。在接口1接收到报文1的情况下,设备A可以通过查找表1得到接口1所属的NUMA节点为NUMA节点1。在接口5接收到报文2的情况下,设备A可以通过查找表1得到接口5所属的NUMA节点为NUMA节点2。如此类推,本公开不再赘述。
在步骤S43中,从该出接口聚合组所包括的出接口中选取属于该NUMA节点的出接口作为第一出接口。
作为本实施例的一个示例,如图3所示,在接口1接收到报文1的情况下,设备A查找转发表获取接口1对应的出接口聚合组为出接口聚合组2。设备A确定出接口聚合组2所包括的多个出接口为接口4、接口6和接口7。设备A根据接口与NUMA节点之间的对应关系,确定接口1所属的NUMA节点为NUMA节点1。设备A可以逐一判断接口4、接口6和接口7是否属于NUMA节点1,从而从出接口聚合组2所包括的出接口中选取属于NUMA节点1的接口4作为第一出接口。
表1
接口编号 NUMA节点编号
接口1 NUMA节点1
接口2 NUMA节点1
接口3 NUMA节点1
接口4 NUMA节点1
接口5 NUMA节点2
接口6 NUMA节点2
接口7 NUMA节点2
接口8 NUMA节点3
图5示出根据本公开一实施例的报文转发方法中步骤S22的一示意性的流程图。如图5所示,从该出接口聚合组中与该入接口属于相同NUMA节点的至少一个出接口中选取用于发送该报文的第一出接口(步骤S22)可以包括:
在步骤S51中,根据接口与NUMA节点之间的对应关系,确定该入接口 所属的NUMA节点。
步骤S51可以参见步骤S42的描述,本公开不再赘述。
在步骤S52中,确定该NUMA节点所包括的出接口。
在一种可能的实现方式中,可以通过查找NUMA节点与接口关系表,确定NUMA节点所包括的出接口。例如,先将NUMA节点编号作为索引关键词,通过NUMA节点编号索引NUMA节点与接口关系表,得到NUMA节点所包括的接口。再将出接口作为索引关键词,得到NUMA节点所包括的出接口。
作为该实现方式的一个示例,表2示出根据本公开一实施例的设备A中NUMA节点与接口关系表。在接口1接收到报文1的情况下,设备A可以通过查找表1得到接口1所属的NUMA节点为NUMA节点1,设备A可以通过查找表2得到NUMA节点1所包括的出接口为接口2、接口3和接口4。在接口5接收到报文2的情况下,设备A可以通过查找表1得到接口5所属的NUMA节点为NUMA节点2,设备A可以通过查找表2得到NUMA节点2所包括的出接口为接口6和接口7。如此类推,本公开不再赘述。
在步骤S53中,从该NUMA节点所包括的出接口中选取属于该出接口聚合组的出接口作为第一出接口。
作为本实施例的一个示例,如图3所示,在接口1接收到报文1的情况下,设备A根据接口与NUMA节点之间的对应关系,确定接口1所属的NUMA节点为NUMA节点1。设备A确定NUMA节点1所包括的出接口为接口2、接口3和接口4。设备A查找转发表获取接口1对应的出接口聚合组为出接口聚合组2。设备A可以逐一判断接口2、接口3和接口4是否属于出接口聚合组2,从而从NUMA节点1所包括的出接口中选取属于出接口聚合组2的接口4作为第一出接口。
表2
NUMA节点编号 入接口编号 出接口编号
NUMA节点1 接口1 接口2、接口3、接口4
NUMA节点2 接口5 接口6、接口7
NUMA节点3 接口8 不存在
图6示出根据本公开一实施例的报文转发方法中步骤S22的一示意性的 流程图。如图6所示,从该出接口聚合组中与该入接口属于相同NUMA节点的至少一个出接口中选取用于发送该报文的第一出接口(步骤S22)可以包括:
在步骤S61中,确定该出接口聚合组所包括的出接口。
在步骤S62中,根据接口与NUMA节点之间的对应关系,确定该入接口所属的NUMA节点。
步骤S62可以参见步骤S42的描述,本公开不再赘述。
在步骤S63中,确定该NUMA节点所包括的出接口。
步骤S63可以参见步骤S52的描述,本公开不再赘述。
在步骤S64中,根据该NUMA节点所包括的出接口和该出接口聚合组所包括的出接口,确定既属于该出接口聚合组又属于该NUMA节点的出接口。
在步骤S65中,从既属于该出接口聚合组又属于该NUMA节点的出接口中选取出接口作为第一出接口。
作为本实施例的一个示例,如图3所示,在接口1接收到报文1的情况下,设备A查找转发表获取接口1对应的出接口聚合组为出接口聚合组2。设备A确定出接口聚合组2所包括的多个出接口为接口4、接口6和接口7。设备A根据接口与NUMA节点之间的对应关系,确定接口1所属的NUMA节点为NUMA节点1。设备A确定NUMA节点1所包括的出接口为接口2、接口3和接口4。设备A确定既属于出接口聚合组2又属于NUMA节点1的出接口为接口4。设备A将既属于出接口聚合组2又属于NUMA节点1的接口4作为第一出接口。
作为本实施例的一个示例,如图3所示,在接口5接收到报文2的情况下,设备A查找转发表获取接口5对应的出接口聚合组为出接口聚合组2。设备A确定出接口聚合组2所包括的多个出接口为接口4、接口6和接口7。设备A根据接口与NUMA节点之间的对应关系,确定接口5所属的NUMA节点为NUMA节点2。设备A确定NUMA节点2所包括的出接口为接口6和接口7。设备A确定既属于出接口聚合组2又属于NUMA节点2的出接口为接口6和接口7。设备A从既属于出接口聚合组2又属于NUMA节点1的接口6和接口7中选取出接口作为第一出接口。例如,报文2的报文特征为源MAC地址,设备A对报文2的源MAC地址进行哈希运算,得到源MAC地址的哈希运算结果,并根据源MAC地址的哈希运算结果查找预先设置的哈希表,从接口6和接口7中确定 接口6作为发送报文2的出接口。
图7示出根据本公开一实施例的报文转发方法的一示意性的流程图。如图7所示,该方法包括步骤S21至步骤S25。
在步骤S21中,根据转发表确定接收到报文的入接口对应的出接口聚合组。
在步骤S22中,当该出接口聚合组中存在与该入接口属于相同NUMA节点的至少一个出接口时,从该至少一个出接口中选取用于发送该报文的第一出接口。
在步骤S23中,通过第一出接口发送该报文。
在步骤S24中,当该出接口聚合组中不存在与该入接口属于相同NUMA节点的出接口时,从该出接口聚合组中属于其他NUMA节点的出接口中确定用于发送该报文的第二出接口。
在步骤S25中,通过第二出接口发送该报文。
作为本实施例的一个示例,如图3所示,在接口8接收到报文3的情况下,设备A查找转发表获取接口8对应的出接口聚合组为出接口聚合组2。设备A确定出接口聚合组2所包括的多个出接口为接口4、接口6和接口7。设备A根据接口与NUMA节点之间的对应关系,确定接口8所属的NUMA节点为NUMA节点3。则根据转发表确定出的出接口均不属于入接口所属的NUMA节点,即接口4、接口6和接口7均不属于NUMA节点3。由此出接口聚合组2中不存在与接口8属于相同NUMA节点的出接口,则从出接口聚合组2所包括的接口4、接口6和接口7中确定用于发送报文3的出接口。例如,报文3的报文特征为源MAC地址,设备A对报文3的源MAC地址进行哈希运算,得到源MAC地址的哈希运算结果,并根据源MAC地址的哈希运算结果查找预先设置的哈希表,从接口4、接口6和接口7中确定接口7作为发送报文3的出接口。
图8示出根据本公开一实施例的报文转发装置的框图。该装置可以用于NUMA架构的设备,例如NUMA服务器等,本公开对此不做限制。如图8所示,所述装置包括:
出接口聚合组确定模块81,用于根据转发表确定接收到报文的入接口对应的出接口聚合组;第一出接口选取模块82,用于当所述出接口聚合组中存在与所述入接口属于相同非统一内存访问架构NUMA节点的出接口时,从所 述出接口聚合组中与所述入接口属于相同NUMA节点的出接口中选取用于发送所述报文的第一出接口;报文发送模块83,用于通过所述第一出接口发送所述报文。
在一种可能的实现方式中,所述第一出接口选取模块82包括:第一确定模块,用于确定所述出接口聚合组所包括的出接口;NUMA节点确定模块,用于根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;第一选取模块,用于从所述出接口聚合组所包括的出接口中选取属于所述NUMA节点的出接口作为所述第一出接口。
在一种可能的实现方式中,所述第一出接口选取模块82包括:NUMA节点确定模块,用于根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;第二确定模块,用于确定所述NUMA节点所包括的出接口;第二选取模块,用于从所述NUMA节点所包括的出接口中选取属于所述出接口聚合组的出接口作为所述第一出接口。
在一种可能的实现方式中,所述第一出接口选取模块82包括:第一确定模块,用于确定所述出接口聚合组所包括的出接口;NUMA节点确定模块,用于根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;第二确定模块,用于确定所述NUMA节点所包括的出接口;第三确定模块,用于根据所述NUMA节点所包括的出接口和所述出接口聚合组所包括的出接口,确定既属于所述出接口聚合组又属于所述NUMA节点的出接口;第三选取模块,用于从既属于所述出接口聚合组又属于所述NUMA节点的出接口中选取出接口作为所述第一出接口。
图9示出根据本公开一实施例的报文转发装置的一示意性的框图。如图9所示:
在一种可能的实现方式中,若所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口有多个,所述装置还包括:哈希运算模块84,用于根据报文特征进行哈希运算,得到哈希运算结果;第一出接口确定模块85,用于根据所述哈希运算结果,从所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口中确定所述第一出接口。
在一种可能的实现方式中,所述装置还包括:第二出接口选取模块86,用于当所述出接口聚合组中不存在与所述入接口属于相同NUMA节点的出 接口时,从所述出接口聚合组中属于其他NUMA节点的出接口中确定用于发送所述报文的第二出接口。
本公开的报文转发装置能够在接收到报文的入接口对应的出接口聚合组中选择与该入接口属于相同NUMA节点的出接口转发报文,而无需跨NUMA节点转发报文,从而实现在报文转发的过程中仅需要访问NUMA节点的本地内存,降低设备的运算开销,提高设备的转发效率和吞吐能力。
图10是根据一示例性实施例示出的一种用于报文转发装置900的框图。参照图10,该装置900可包括处理器901、存储有机器可执行指令的机器可读存储介质902。处理器901与机器可读存储介质902可经由系统总线903通信。并且,处理器901通过读取机器可读存储介质902中与报文转发逻辑对应的机器可执行指令以执行上文所述的报文转发方法。具体的转发方法可以参见图2、图3至图7所示的方法以及上述具体实施例,本实施例对此不再赘述。
本文中提到的机器可读存储介质902可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。
需要说明的是,本领域技术人员能够理解,图10所示的装置900为NUMA框架中的NUMA节点的示意图。NUMA框架可以为包括多个装置900的结构,本公开不再赘述。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (16)

  1. 一种报文转发方法,包括:
    根据转发表确定接收到报文的入接口对应的出接口聚合组,其中,所述转发表表示所述入接口和所述出接口聚合组的关系;
    当所述出接口聚合组中存在与所述入接口属于相同非统一内存访问架构NUMA节点的至少一个出接口时,从所述至少一个出接口中选取用于发送所述报文的第一出接口;以及
    通过所述第一出接口发送所述报文。
  2. 根据权利要求1所述的方法,从所述至少一个出接口中选取用于发送所述报文的第一出接口,包括:
    确定所述出接口聚合组所包括的出接口;
    根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;以及
    从所述出接口聚合组所包括的出接口中选取属于所述NUMA节点的出接口作为所述第一出接口。
  3. 根据权利要求1所述的方法,从所述至少一个出接口中选取用于发送所述报文的第一出接口,包括:
    根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;
    确定所述NUMA节点所包括的出接口;以及
    从所述NUMA节点所包括的出接口中选取属于所述出接口聚合组的出接口作为所述第一出接口。
  4. 根据权利要求1所述的方法,若所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口有多个,所述方法还包括:
    根据报文特征进行哈希运算,得到哈希运算结果;以及
    根据所述哈希运算结果,从所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口中确定所述第一出接口。
  5. 根据权利要求1所述的方法,所述方法还包括:
    当所述出接口聚合组中不存在与所述入接口属于相同NUMA节点的出接口时,从所述出接口聚合组中属于其他NUMA节点的出接口中确定用于发送所述报文的第二出接口。
  6. 一种报文转发装置,包括:
    处理器;以及
    存储有机器可执行指令的机器可读存储介质,
    其中,所述机器可执行指令在被读取并执行时,使得所述处理器:
    根据转发表确定接收到报文的入接口对应的出接口聚合组,其中,所述转发表表示所述入接口和所述出接口聚合组的关系;
    当所述出接口聚合组中存在与所述入接口属于相同非统一内存访问架构NUMA节点的至少一个出接口时,从所述至少一个出接口中选取用于发送所述报文的第一出接口;以及
    通过所述第一出接口发送所述报文。
  7. 根据权利要求6所述的装置,为了从所述至少一个出接口中选取用于发送所述报文的第一出接口,使得所述处理器:
    确定所述出接口聚合组所包括的出接口;
    根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;以及
    从所述出接口聚合组所包括的出接口中选取属于所述NUMA节点的出接口作为所述第一出接口。
  8. 根据权利要求6所述的装置,为了从所述至少一个出接口中选取用于发送所述报文的第一出接口,使得所述处理器:
    根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;
    确定所述NUMA节点所包括的出接口;以及
    从所述NUMA节点所包括的出接口中选取属于所述出接口聚合组的出接口作为所述第一出接口。
  9. 根据权利要求6所述的装置,若所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口有多个,还使得所述处理器:
    根据报文特征进行哈希运算,得到哈希运算结果;以及
    根据所述哈希运算结果,从所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口中确定所述第一出接口。
  10. 根据权利要求6所述的装置,其特征在于,还使得所述处理器:
    当所述出接口聚合组中不存在与所述入接口属于相同NUMA节点的出接口时,从所述出接口聚合组中属于其他NUMA节点的出接口中确定用于发送所述报文的第二出接口。
  11. 一种报文转发装置,包括:
    出接口聚合组确定模块,用于根据转发表确定接收到报文的入接口对应的出接口聚合组,其中,所述转发表表示所述入接口和所述出接口聚合组的关系;
    第一出接口选取模块,用于当所述出接口聚合组中存在与所述入接口属于相同非统一内存访问架构NUMA节点的至少一个出接口时,从所述至少一个出接口中选取用于发送所述报文的第一出接口;以及
    报文发送模块,用于通过所述第一出接口发送所述报文。
  12. 根据权利要求11所述的装置,所述第一出接口选取模块包括:
    第一确定模块,用于确定所述出接口聚合组所包括的出接口;
    NUMA节点确定模块,用于根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;以及
    第一选取模块,用于从所述出接口聚合组所包括的出接口中选取属于所述NUMA节点的出接口作为所述第一出接口。
  13. 根据权利要求11所述的装置,所述第一出接口选取模块包括:
    NUMA节点确定模块,用于根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;
    第二确定模块,用于确定所述NUMA节点所包括的出接口;以及
    第二选取模块,用于从所述NUMA节点所包括的出接口中选取属于所述出接口聚合组的出接口作为所述第一出接口。
  14. 根据权利要求11所述的装置,所述第一出接口选取模块包括:
    第一确定模块,用于确定所述出接口聚合组所包括的出接口;
    NUMA节点确定模块,用于根据接口与NUMA节点之间的对应关系,确定所述入接口所属的NUMA节点;
    第二确定模块,用于确定所述NUMA节点所包括的出接口;
    第三确定模块,用于根据所述NUMA节点所包括的出接口和所述出接口聚合组所包括的出接口,确定既属于所述出接口聚合组又属于所述NUMA节 点的出接口;以及
    第三选取模块,用于从既属于所述出接口聚合组又属于所述NUMA节点的出接口中选取出接口作为所述第一出接口。
  15. 根据权利要求11所述的装置,所述装置还包括:
    哈希运算模块,用于在所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口有多个的情况下,根据报文特征进行哈希运算,得到哈希运算结果;以及
    第一出接口确定模块,用于根据所述哈希运算结果,从所述出接口聚合组中与所述入接口属于相同NUMA节点的出接口中确定所述第一出接口。
  16. 根据权利要求11所述的装置,所述装置还包括:
    第二出接口选取模块,用于当所述出接口聚合组中不存在与所述入接口属于相同NUMA节点的出接口时,从所述出接口聚合组中属于其他NUMA节点的出接口中确定用于发送所述报文的第二出接口。
PCT/CN2018/103321 2017-08-30 2018-08-30 报文转发 WO2019042372A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP18852037.3A EP3657740B1 (en) 2017-08-30 2018-08-30 Message forwarding
US16/643,175 US11343175B2 (en) 2017-08-30 2018-08-30 Packet forwarding
JP2020511448A JP7053798B2 (ja) 2017-08-30 2018-08-30 パケット転送方法及び装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710763296.6A CN108259328B (zh) 2017-08-30 2017-08-30 报文转发方法及装置
CN201710763296.6 2017-08-30

Publications (1)

Publication Number Publication Date
WO2019042372A1 true WO2019042372A1 (zh) 2019-03-07

Family

ID=62721946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103321 WO2019042372A1 (zh) 2017-08-30 2018-08-30 报文转发

Country Status (5)

Country Link
US (1) US11343175B2 (zh)
EP (1) EP3657740B1 (zh)
JP (1) JP7053798B2 (zh)
CN (1) CN108259328B (zh)
WO (1) WO2019042372A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021145939A1 (en) * 2020-01-14 2021-07-22 Vmware, Inc. Transparent demilitarized zone providing stateful service between physical and logical networks
US11411777B2 (en) 2020-01-14 2022-08-09 Vmware, Inc. Port mapping for bonded interfaces of ECMP group
US11588682B2 (en) 2020-01-14 2023-02-21 Vmware, Inc. Common connection tracker across multiple logical switches

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259328B (zh) * 2017-08-30 2020-06-05 新华三技术有限公司 报文转发方法及装置
CN109873776B (zh) * 2019-01-30 2021-06-29 新华三技术有限公司 一种组播报文负载分担的均衡方法及装置
CN110365586B (zh) * 2019-07-16 2022-05-17 迈普通信技术股份有限公司 报文传输的方法及装置
CN111884945B (zh) * 2020-06-10 2022-09-02 中国电信股份有限公司重庆分公司 一种网络报文的处理方法和网络接入设备
CN112019432B (zh) * 2020-07-31 2022-02-01 深圳市风云实业有限公司 一种基于多端口捆绑的上行输入报文转发系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404619A (zh) * 2008-11-17 2009-04-08 杭州华三通信技术有限公司 一种实现服务器负载均衡的方法和一种三层交换机
US20140223442A1 (en) * 2010-03-30 2014-08-07 Red Hat Israel, Ltd. Tracking Memory Accesses to Optimize Processor Task Placement
CN106936739A (zh) * 2015-12-30 2017-07-07 新华三技术有限公司 一种报文转发方法及装置
CN108259328A (zh) * 2017-08-30 2018-07-06 新华三技术有限公司 报文转发方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7912091B1 (en) * 2009-03-18 2011-03-22 Extreme Networks, Inc. Traffic forwarding in a traffic-engineered link aggregation group
EP2641360B1 (en) * 2010-11-19 2018-03-21 Extreme Networks, Inc. Methods, systems, and computer readable media for next hop scaling with link aggregation
CN102148768B (zh) * 2011-05-26 2014-11-26 杭州华三通信技术有限公司 报文转发方法和报文转发设备
US9686137B2 (en) * 2015-02-10 2017-06-20 Alcatel Lucent Method and system for identifying an outgoing interface using openflow protocol
CN104901898B (zh) * 2015-06-08 2018-08-03 东软集团股份有限公司 一种负载均衡方法及装置
US10673744B2 (en) * 2015-09-23 2020-06-02 Extreme Networks, Inc. Methods, systems, and computer readable media for advanced distribution in a link aggregation group
US10243838B1 (en) * 2017-01-31 2019-03-26 Juniper Networks, Inc. Interleaving members for proportionate network traffic distribution

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404619A (zh) * 2008-11-17 2009-04-08 杭州华三通信技术有限公司 一种实现服务器负载均衡的方法和一种三层交换机
US20140223442A1 (en) * 2010-03-30 2014-08-07 Red Hat Israel, Ltd. Tracking Memory Accesses to Optimize Processor Task Placement
CN106936739A (zh) * 2015-12-30 2017-07-07 新华三技术有限公司 一种报文转发方法及装置
CN108259328A (zh) * 2017-08-30 2018-07-06 新华三技术有限公司 报文转发方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3657740A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021145939A1 (en) * 2020-01-14 2021-07-22 Vmware, Inc. Transparent demilitarized zone providing stateful service between physical and logical networks
US11411777B2 (en) 2020-01-14 2022-08-09 Vmware, Inc. Port mapping for bonded interfaces of ECMP group
US11588682B2 (en) 2020-01-14 2023-02-21 Vmware, Inc. Common connection tracker across multiple logical switches
US11909558B2 (en) 2020-01-14 2024-02-20 VMware LLC Port mapping for bonded interfaces of ECMP group

Also Published As

Publication number Publication date
US11343175B2 (en) 2022-05-24
JP2020532230A (ja) 2020-11-05
CN108259328A (zh) 2018-07-06
US20200389388A1 (en) 2020-12-10
JP7053798B2 (ja) 2022-04-12
EP3657740B1 (en) 2023-12-20
EP3657740A4 (en) 2020-06-24
CN108259328B (zh) 2020-06-05
EP3657740A1 (en) 2020-05-27

Similar Documents

Publication Publication Date Title
WO2019042372A1 (zh) 报文转发
US8578049B2 (en) Content router forwarding plane architecture
US20160241474A1 (en) Technologies for modular forwarding table scalability
US20180019943A1 (en) Technologies for distributed routing table lookup
WO2018099394A1 (zh) 报文传输
US20090282167A1 (en) Method and apparatus for bridging
US20140064282A1 (en) Cached routing table management
CN109743414B (zh) 利用冗余连接提高地址翻译可用性的方法及计算机可读存储介质
CN104811392A (zh) 用于处理网络中的资源访问请求的方法和系统
JP2017519433A (ja) パケット処理のためのマルチテーブルハッシュベースのルックアップ
CN109639589B (zh) 一种负载均衡方法及装置
US10684960B2 (en) Managing cache memory in a network element based on costs associated with fetching missing cache entries
US10447585B2 (en) Programmable and low latency switch fabric for scale-out router
US10833990B2 (en) Transmitting packet
US11469915B2 (en) Technologies for sharing packet replication resources in a switching system
CN107566302B (zh) 报文转发方法和装置
CN114827079B (zh) 网络地址转换网关的扩容方法、设备及存储介质
CN114911728A (zh) 一种数据查找方法、装置及集成电路
CN106572501B (zh) 基于双重阈值判决的内容中心移动自组织网络缓存方法
CN111506658B (zh) 数据处理方法、装置、第一设备及存储介质
WO2023130953A1 (zh) 数据查找方法及装置、网络设备
CN117041135A (zh) 路由方法、装置、通信设备、存储介质和计算机程序产品
CN116647508A (zh) 一种数据中心无损网络的实现方法及装置
WO2012092835A1 (zh) 一种交换表的维护方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18852037

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020511448

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018852037

Country of ref document: EP

Effective date: 20200221