CN101902398B - Method and system for receiving and transmitting data packet - Google Patents

Method and system for receiving and transmitting data packet Download PDF

Info

Publication number
CN101902398B
CN101902398B CN201010225797.7A CN201010225797A CN101902398B CN 101902398 B CN101902398 B CN 101902398B CN 201010225797 A CN201010225797 A CN 201010225797A CN 101902398 B CN101902398 B CN 101902398B
Authority
CN
China
Prior art keywords
network interface
processor
packet
limit value
transmission route
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201010225797.7A
Other languages
Chinese (zh)
Other versions
CN101902398A (en
Inventor
邓红平
苗军
谭笑
童超
姚爱娣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Tianzhihuiqi Technology Co ltd
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201010225797.7A priority Critical patent/CN101902398B/en
Publication of CN101902398A publication Critical patent/CN101902398A/en
Application granted granted Critical
Publication of CN101902398B publication Critical patent/CN101902398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the field of communication technology, in particular to a method and a system for receiving and transmitting a data packet. The method comprises the following steps that: a network interface transmits a data packet receiving request in a transmission queue of the network interface to a processor according to a network interface transmission authority value and predetermined mapping relation between the network interface and the processor, so that the processor acquires the data packet from an memory; and the network interface receives a data packet receiving response fed back by the processor after the processing of the data packet, caches the data packet receiving response in a receiving queue of the network interface, reads the data packet receiving response and then releases the resource occupied by the data packet at the network interface. Through the method and the system provided in the embodiment of the invention, the mapping relation between the network interface and the processor is established, so information interaction can be directly performed between the network interface and the processor and the time required when the processor acquires the data packet is shortened so as to improve the data packet processing efficiency.

Description

A kind of method and system of transceiving data bag
Technical field
The present invention relates to technical field of communication, particularly a kind of method and system of transceiving data bag.
Background technology
Along with the high speed development of Internet technology, bandwidth demand constantly increases, and processor is as the core component of the network equipment, and its disposal ability is by the height of direct decision device performance.Compared with traditional single core processor, polycaryon processor brings stronger parallel processing capability, higher bulk density and lower clock frequency, and greatly reduces heat radiation and power consumption.Therefore, multi-core parallel concurrent process will be the trend of processor development.
After processor technology enters the multinuclear epoch, how effectively to utilize the concurrent computing advantage of multinuclear, the network data processing ability of lifting means, meet user to high performance demand, become the focus that industry is paid close attention to.Current polycaryon processor, under the cooperation of software, can share data and dynamic migration task between different CPU (Central Processing Unit, central processing unit).As shown in Figure 1, for the system architecture schematic diagram of multi-network interface and multi-CPU, when carrying out receives data packets at present in the architecture and send, usually the kernel services device of system architecture is needed to coordinate each CPU, to determine by the allocation of packets of reception to which CPU process, and the packet after CPU process by which network interface is sent.Cause the efficiency of handle packet lower like this, when data packet flow is larger, packet loss phenomenon can be produced.
Summary of the invention
Embodiments provide a kind of method and system of transceiving data, by setting up mapping relations by between network interface and processor, make network interface and processor directly carry out information interaction, shorten the time that processor obtains packet, which thereby enhance the efficiency of handle packet.
Embodiments provide a kind of method receiving packet, the method comprises:
Network interface is according to network interface transmission route limit value, and the preset mapping relation between described network interface and processor, receives data packets request in network interface transmit queue is sent to described processor, from internal memory, obtains described packet for described processor;
Described network interface receives the receives data packets response returned after described processor is disposed to packet, by described receives data packets response buffer to network interface receiving queue, after reading the response of described receives data packets, discharge the resource that described packet takies at network interface.
Embodiments provide a kind of method sending packet, the method comprises:
Processor is according to processor transmission route limit value, and the preset mapping relation between network interface and described processor, Packet Generation request in processor transmit queue is sent to described network interface, from internal memory, obtains described packet for described network interface;
Described processor receives the Packet Generation response returned after described network interface sends packet, by described Packet Generation response buffer to processor receiving queue, after reading the response of described Packet Generation, discharges the resource that described packet takies at processor.
Embodiments provide a kind of system of transceiving data, comprising: network interface and processor;
Described network interface is according to network interface transmission route limit value, and the preset mapping relation between described network interface and described processor, receives data packets request in network interface transmit queue is sent to described processor, from internal memory, obtains described packet for described processor; Described network interface receives the receives data packets response returned after described processor is disposed to packet, by described receives data packets response buffer to network interface receiving queue, after reading the response of described receives data packets, discharge the resource that described packet takies at network interface;
Described processor is according to processor transmission route limit value, and the preset mapping relation between described network interface and described processor, Packet Generation request in processor transmit queue is sent to described network interface, from internal memory, obtains described packet for described network interface; Described processor receives the Packet Generation response returned after described network interface sends packet, by described Packet Generation response buffer to processor receiving queue, after reading the response of described Packet Generation, discharges the resource that described packet takies at processor.
The method and system of the transceiving data that the embodiment of the present invention provides, for network interface according to network interface transmission route limit value, and the preset mapping relation between network interface and processor, receives data packets request in network interface transmit queue is sent to processor, from internal memory, obtains described packet for processor; The receives data packets response that network interface receiving processor returns after being disposed to packet, by receives data packets response buffer to network interface receiving queue, after read data packet receives response, the resource that release packet takies at network interface; Processor is according to processor transmission route limit value, and the preset mapping relation between network interface and processor, the Packet Generation request in processor transmit queue is sent to network interface, obtains packet for network interface from internal memory; Processor receives the Packet Generation response returned after network interface sends packet, by Packet Generation response buffer to processor receiving queue, after read data packet sends response, and the resource that release packet takies at processor.The method and system of the transceiving data that the embodiment of the present invention provides, by setting up mapping relations by between network interface and processor, network interface and processor is made directly to carry out information interaction, shorten the time that processor obtains packet, authority credentials is arranged to network interface and processor simultaneously, make it in allowed band, carry out information interaction, avoid generation information to block, which thereby enhance the efficiency of handle packet.
Accompanying drawing explanation
Fig. 1 is the system architecture schematic diagram of multi-network interface and multi-CPU;
Fig. 2 is the system architecture schematic diagram of multi-network interface and multi-CPU in the embodiment of the present invention;
Fig. 3 is the method flow schematic diagram receiving packet in the embodiment of the present invention;
Fig. 4 is the method flow schematic diagram receiving packet in another embodiment of the present invention;
Fig. 5 is the method flow schematic diagram sending packet in the embodiment of the present invention;
Fig. 6 is the method flow schematic diagram sending packet in another embodiment of the present invention.
Embodiment
Below in conjunction with each accompanying drawing, the main of embodiment of the present invention technical scheme is realized principle, embodiment and set forth in detail the beneficial effect that should be able to reach.
In prior art, after network interface receives packet, need first notification architecture system kernel, determine which CPU this packet should be assigned to by it; After CPU is disposed packet, also need first notification architecture system kernel, determine packet by which network interface is sent by it.Cause packet longer in the network interface time of staying like this, when the comparatively large and reception limited space of network interface of data packet number, can data-bag lost be caused.As shown in Figure 2, be the system schematic of the transceiving data bag that the embodiment of the present invention provides, this system comprises: network interface 201 and processor 202; Between network interface 201 and processor 202, set up corresponding mapping relations in advance, and by these mapping relations, between network interface and processor 202, carry out information interaction.
Wherein, network interface 201 is according to network interface transmission route limit value, and the preset mapping relation between network interface 201 and processor 202, the receives data packets request in network interface transmit queue is sent to processor 202, from internal memory, obtains this packet for processor 202; The receives data packets response returned after network interface 201 receiving processor 202 pairs of packets are disposed, by this receives data packets response buffer to network interface receiving queue, after reading the response of this receives data packets, discharge the resource that this packet takies at network interface 201;
Processor 202 is according to processor transmission route limit value, and the preset mapping relation between network interface 201 and processor 202, Packet Generation request in processor transmit queue is sent to network interface 201, from internal memory, obtains this packet for network interface 201; Processor 202 receives the Packet Generation response returned after network interface 201 sends packet, by this Packet Generation response buffer to processor receiving queue, after reading the response of this Packet Generation, discharges the resource that this packet takies at processor 202.
Preferably, network interface transmit queue and network interface receiving queue are the space for buffered message set up in advance in the memory headroom of network interface 201 correspondence; Processor transmit queue and processor receiving queue are the space for buffered message set up in advance in the memory headroom of processor 202 correspondence.
And network interface 201 adopts the mode of poll or down trigger to read Packet Generation request in network interface receiving queue and/or receives data packets response; Processor 202 adopts the receives data packets request in the mode reading processor receiving queue of poll or down trigger and/or Packet Generation to respond.
Wherein, this preset mapping relation is the corresponding processor of a network interface or the corresponding processor of multiple network interface.Network interface transmission route limit value is used for marked network interface and sends the ability of information, its initial value be greater than one integer value, processor transmission route limit value is used for the ability that identification processor sends information, its initial value be greater than one integer value.This network interface transmission route limit value can set according to the performance parameter etc. of network interface; Processor transmission route limit value can set according to performance parameters etc. such as the disposal abilities of processor.
As shown in Figure 3, for receiving the method for packet in the system that provides in the embodiment of the present invention, the method comprises the following steps:
Step 301, network interface are according to network interface transmission route limit value, and the preset mapping relation between network interface and processor, the receives data packets request in network interface transmit queue is sent to processor, obtains packet for processor from internal memory;
Concrete, mapping relations are set up by between network interface and processor, these mapping relations are man-to-man mapping relations or many-to-one mapping relations, namely can be that a network interface can a corresponding processor, also can the corresponding processor of multiple network interface.This logical mappings relation can be the form of corresponding table, also can reach for other form setting up logical mappings relation effect.
Further, network interface transmission route limit value is set at network interface place, sends the ability of information for marked network interface, its initial value be greater than one integer value, and this network interface transmission route limit value can set according to the performance parameter etc. of network interface.When this network interface transmission route limit value is greater than predetermined threshold, the information such as can to send request.When network interface transmission route limit value is less than or equal to predetermined threshold, after waiting for certain hour, more whether Sampling network interface transmission route limit value is greater than predetermined threshold.This predetermined threshold can set according to the performance parameter etc. of network interface, is traditionally arranged to be 0, can certainly be set to other values according to actual needs.Certain hour is the time that user pre-sets herein, and its value can be the arbitrary value such as 30 seconds, 1 minute, can certainly be 0.
Meanwhile, the network interface receiving queue of information being used for network interface transmit queue that buffer memory sends information in advance and having received for buffer memory is set up in advance at the storage area place (as in internal memory) that network interface is corresponding.After network interface receives packet, packet is stored in internal memory, and the receives data packets request of generation is buffered in network interface transmit queue.Then Sampling network interface transmission route limit value, when it is greater than predetermined threshold, the receives data packets request in network interface transmit queue, according to the preset mapping relation between network interface and processor, is sent to processor by network interface.When sending receives data packets request, network interface authority credentials is subtracted one, or change authority credentials according to other predetermined rules, such as, be multiplied by certain number, divided by certain number etc.This receives data packets request is carried message identifier, error code, data packet addressed, network interface numbering, processor numbering, is returned response identification etc.
The receives data packets response that step 302, network interface receiving processor return after being disposed to packet, by receives data packets response buffer to network interface receiving queue, after read data packet receives response, the resource that release packet takies at network interface.
Concrete, after processor receives the receives data packets request of network interface, be cached to processor receiving queue, and adopted the information in the mode reading processor receiving queue of poll or down trigger.After this processor reads this receives data packets request, resolve this receives data packets request to get the memory address of packet, obtain packet according to this memory address and process accordingly.After this processor is disposed to packet, by receives data packets response buffer at processor transmit queue, then measurement processor transmission route limit value, when it is greater than predetermined threshold, receives data packets response in processor transmit queue, according to the preset mapping relation between network interface and processor, is sent to this network interface by processor.Wherein, the initial value of processor transmission route limit value be greater than one integer value, and can to set according to the performance parameter etc. of processor.This predetermined threshold can set according to the performance parameter etc. of processor, is traditionally arranged to be 0, can certainly be set to other values according to actual needs.
This receives data packets response buffer to network interface receiving queue, then adopts the mode of poll or down trigger to read information in network interface receiving queue by network interface.When reading the response of this receives data packets, the network interface authority credentials of self is added one, or changes authority credentials according to other predetermined rules, such as, be multiplied by certain number, divided by certain number etc., but should with when sending receives data packets request, the method changing authority credentials is corresponding.After reading the response of this receives data packets, network interface can confirm that processor is disposed to packet, so discharge the resource that this packet takies at network interface.
From above description, the method provided by the embodiment of the present invention can be provided, by setting up mapping relations by between network interface and processor, network interface and processor is made directly to carry out information interaction, shorten the time that processor obtains packet, authority credentials is arranged to network interface and processor simultaneously, make it in allowed band, carry out information interaction, avoid generation information to block, which thereby enhance the efficiency of handle packet.
Be described in detail using the method for reception packet provided by the invention below by another embodiment, as shown in Figure 4, the method comprises the following steps:
Step 401, network interface receive packet, and are saved in internal memory;
Receives data packets request is cached in network interface transmit queue by step 402, network interface; This network interface transmit queue is used for buffer network interface and needs the information such as the request sent, and is positioned at the storage area that network interface is corresponding;
Step 403, network interface Sampling network interface authority value; This network interface authority credentials is used for marked network interface and sends the ability of information, its initial value be greater than one integer value.When this network interface authority credentials is greater than predetermined threshold, illustrate that this network interface has the ability of transmission information, perform step 404; Otherwise, after waiting for certain hour, continue Sampling network interface authority value.This predetermined threshold can be 0, can be also other integer values, be set in advance by user according to the performance of network interface.Certain hour is the time that user pre-sets herein, and its value can be the arbitrary value such as 30 seconds, 1 minute, can certainly be 0.
Step 404, network interface, according to the preset mapping relation between network interface and processor, send this receives data packets request to processor, and authority credentials are subtracted one; Wherein, preset mapping relation is the mapping relations be configured in advance.
After step 405, processor receive receives data packets request, be cached to processor receiving queue; The information such as the request that this processor receiving queue receives for cache processor, are positioned at the storage area that this processor is corresponding;
Step 406, processor process this packet after reading this receives data packets request;
Processor adopts the information in the mode reading processor receiving queue of poll or down trigger, after reading this receives data packets request, resolves this acquisition request packet memory address, and processes accordingly this packet.
Step 407, processor by receives data packets response buffer to processor transmit queue; After being disposed to packet, processor is by receives data packets response buffer to processor transmit queue, and this processor transmit queue is used for the information such as the response of cache processor transmission, is positioned at the storage area that this processor is corresponding.
The processor authority credentials of step 408, processor detection self; This processor authority credentials is used for the ability of transmission information of identification processor, its initial value be greater than one integer value.When this processor authority credentials is greater than predetermined threshold, illustrate that this processor has the ability of transmission information, perform step 409; Otherwise, after waiting for certain hour, continue measurement processor authority credentials.This predetermined threshold can be 0, can be also other integer values, be set in advance by user according to the performance of processor.Certain hour is the time that user pre-sets herein, and its value can be the arbitrary value such as 30 seconds, 1 minute, can certainly be 0.
Receives data packets response, according to the preset mapping relation between network interface and processor, is sent to network interface by step 409, processor;
Step 410, network interface by this receives data packets response buffer to network interface receiving queue; The information such as the response that this network interface receiving queue arrives for buffer network interface, are positioned at the storage area that this network interface is corresponding.
Authority credentials is added one after reading the response of this receives data packets by step 411, network interface, and discharges the space that packet takies.The mode of poll or down trigger that adopts network interface reads the information in network interface receiving queue, after reading the response of this receives data packets, authority credentials is added one, and discharges the space that this packet takies at network interface.
From above description, the method provided by the embodiment of the present invention can be provided, by setting up mapping relations by between network interface and processor, network interface and processor is made directly to carry out information interaction, shorten the time that processor obtains packet, authority credentials is arranged to network interface and processor simultaneously, make it in allowed band, carry out information interaction, avoid generation information to block, which thereby enhance the efficiency of handle packet.
The detailed process sent packet in the system that the embodiment of the present invention provides, namely sends the method for packet within the system, as shown in Figure 5, comprises the following steps:
Step 501, processor are according to processor transmission route limit value, and the preset mapping relation between network interface and processor, Packet Generation request in processor transmit queue is sent to network interface, from internal memory, obtains described packet for network interface;
Concrete, logical mappings relation will be set up between network interface and processor, these mapping relations are the mapping relations of man-to-man mapping relations or one-to-many, namely can be that a processor can a corresponding network interface, also can a corresponding multiple network interface of processor.This logical mappings relation can be the form of corresponding table, also can reach for other form setting up logical mappings relation effect.
Further, to processor placement processor transmission route limit value, send the ability of the information such as response for identification processor, its initial value be greater than one integer value, and this network interface transmission route limit value can set according to the performance parameter etc. of network interface.When this processor transmission route limit value is greater than predetermined threshold, the information such as response can be sent; When processor transmission route limit value is less than or equal to predetermined threshold, after waiting for certain hour, more whether measurement processor transmission route limit value is greater than predetermined threshold.This predetermined threshold can set according to the performance parameter etc. of processor, is traditionally arranged to be 0, can certainly be set to other values according to actual needs.Certain hour is the time that user pre-sets herein, and its value can be the arbitrary value such as 30 seconds, 1 minute, can certainly be 0.Meanwhile, in the processor receiving queue of the pre-configured processor transmit queue sending information in advance for buffer memory of the storage area of processor and the information received for buffer memory.
When processor needs to send packet, this packet is stored in internal memory, and the Packet Generation request of generation is buffered in the processor transmit queue of self, then measurement processor transmission route limit value, when it is greater than predetermined threshold, Packet Generation request in processor transmit queue, according to the preset mapping relation between network interface and processor, is sent to corresponding network interface by processor.Wherein, during processor selection network interface, can select according to the transmission address of the performance parameter of each network interface and packet, also can in conjunction with Selecting parameter such as the priority of each network interface.
And, when sending Packet Generation request, processor authority credentials is subtracted one, or change authority credentials according to other predetermined rules, such as, be multiplied by certain number, divided by certain number etc.This Packet Generation request is carried message identifier, error code, data packet addressed, network interface numbering, processor numbering, is returned response identification etc.
Step 502, processor receive the Packet Generation response returned after network interface sends packet, by this Packet Generation response buffer to processor receiving queue, after reading the response of this Packet Generation, discharge the resource that this packet takies at processor.
Concrete, the Packet Generation request of reception is cached to network interface receiving queue by network interface, and adopts the mode of poll or down trigger to read information in receiving queue.After reading this Packet Generation request, resolve this request to get the memory address of packet, send according to this address acquisition packet.After network interface sends packet, by the network interface transmit queue of Packet Generation response buffer at self.Then Sampling network interface transmission route limit value, when it is greater than predetermined threshold, the Packet Generation response in network interface transmit queue, according to the preset mapping relation between network interface and processor, is sent to processor by network interface.Wherein, the initial value of network interface transmission route limit value be greater than one integer value, and can to set according to the performance parameter etc. of network interface.This predetermined threshold can set according to the performance parameter etc. of network interface, is traditionally arranged to be 0, can certainly be set to other values according to actual needs.
Processor is by this Packet Generation response buffer to processor receiving queue, and then the mode of employing poll or down trigger reads the information in receiving queue.When reading the response of this Packet Generation, the processor authority credentials of self is added one, or changes authority credentials according to other predetermined rules, such as, be multiplied by certain number, divided by certain number etc., but should with when sending receives data packets request, the method changing authority credentials is corresponding.After reading the response of this Packet Generation, can confirm that this packet sends, so discharge the resource that this packet takies at processor.
From above description, the method provided by the embodiment of the present invention can be provided, by setting up mapping relations by between network interface and processor, network interface and processor is made directly to carry out information interaction, shorten the time that processor obtains packet, authority credentials is arranged to network interface and processor simultaneously, make it in allowed band, carry out information interaction, avoid generation information to block the efficiency which thereby enhancing handle packet.
Be described in detail using the method for transmission packet provided by the invention below by another embodiment, as shown in Figure 6, the method comprises the following steps:
The packet sent in advance is saved in internal memory by step 601, processor;
Packet Generation request is cached to processor transmit queue by step 602, processor; The memory address of packet is carried in this Packet Generation request; This processor transmit queue is used for the information that cache processor needs to send, and is positioned at the storage area that processor is corresponding;
The processor authority credentials of step 603, processor detection self; This processor authority credentials is used for the ability of transmission information of identification processor, its initial value be greater than one integer value.When this processor authority credentials is greater than predetermined threshold, illustrate that this processor has the ability of transmission information, perform step 604; Otherwise, after waiting for a period of time, continue measurement processor authority credentials.This predetermined threshold can be 0, can be also other integer values, be set in advance by user according to the performance of network interface.
Step 604, processor, according to the preset mapping relation between network interface and processor, send this Packet Generation request to network interface, and authority credentials are subtracted one; Wherein, preset mapping relation is the mapping relations be configured in advance.
After step 605, network interface receive Packet Generation request, be cached to network interface receiving queue; This network interface receiving queue is used for the information that buffer network interface arrives, and is positioned at the storage area that this network interface is corresponding.
Step 606, network interface send this packet after reading this Packet Generation request; Network interface resolves this Packet Generation request, obtains the memory address of packet, and sends this packet.
Step 607, network interface by Packet Generation response buffer to network interface transmit queue; This network interface transmit queue is used for the information that buffer network interface sends, and is positioned at the storage area that this network interface is corresponding;
The network interface authority credentials of step 608, network interface detection self; This network interface authority credentials is used for the ability of transmission information of marked network interface, its initial value be greater than one integer value.When this network interface authority credentials is greater than predetermined threshold, illustrate that this network interface has the ability of transmission information, perform step 609; Otherwise, after waiting for certain hour, continue Sampling network interface authority value.This predetermined threshold can be 0, can be also other integer values, be set in advance by user according to the performance of network interface.Certain hour is the time that user pre-sets herein, and its value can be the arbitrary value such as 30 seconds, 1 minute, can certainly be 0.
Packet Generation response, according to the preset mapping relation between network interface and processor, is sent to processor by step 609, network interface;
Step 610, processor by this Packet Generation response buffer to processor receiving queue; This processor receiving queue is used for the information that cache processor receives, and is positioned at the storage area that this processor is corresponding.
Processor authority credentials is added one after reading the response of this Packet Generation by step 611, processor, and Free up Memory.The mode of poll or down trigger that adopts processor reads the information in receiving queue, when reading the response of this Packet Generation, confirms that packet sends, processor authority credentials is added one, and Free up Memory.
From above description, can find out, according to the method and system that the embodiment of the present invention proposes, by setting up mapping relations by between network interface and processor, making network interface and processor directly carry out information interaction, shortening the time that processor obtains packet, authority credentials is arranged to network interface and processor simultaneously, make it in allowed band, carry out information interaction, avoid generation information to block, which thereby enhance the efficiency of handle packet.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (7)

1. receive a method for packet, it is characterized in that, the method comprises:
Network interface is according to network interface transmission route limit value, and the preset mapping relation between described network interface and processor, receives data packets request in network interface transmit queue is sent to described processor, from internal memory, obtains described packet for described processor;
Described network interface receives the receives data packets response returned after described processor is disposed to packet, by described receives data packets response buffer to network interface receiving queue, after reading the response of described receives data packets, discharge the resource that described packet takies at network interface;
Wherein, when described network interface transmission route limit value is greater than predetermined threshold, the receives data packets request in network interface transmit queue, according to the preset mapping relation between network interface and processor, is sent to described processor by described network interface; When described network interface transmission route limit value is less than or equal to predetermined threshold, after waiting for certain hour, detects described network interface transmission route limit value and whether be greater than predetermined threshold.
2. the method for claim 1, is characterized in that, when the receives data packets request in network interface transmit queue is sent to described processor, described network interface transmission route limit value is subtracted one; When reading the response of described receives data packets, described network interface transmission route limit value is added one; Wherein network interface transmission route limit value is used for marked network interface and sends the ability of information, its initial value be greater than one integer value.
3. the method for claim 1, is characterized in that, described network interface transmit queue and network interface receiving queue are the space for buffered message set up in advance in the memory headroom that described network interface is corresponding.
4. send a method for packet, it is characterized in that, the method comprises:
Processor is according to processor transmission route limit value, and the preset mapping relation between network interface and described processor, Packet Generation request in processor transmit queue is sent to described network interface, from internal memory, obtains described packet for described network interface;
Described processor receives the Packet Generation response returned after described network interface sends packet, by described Packet Generation response buffer to processor receiving queue, after reading the response of described Packet Generation, discharges the resource that described packet takies at processor;
Wherein, when described processor transmission route limit value is greater than predetermined threshold, the Packet Generation request in processor transmit queue, according to the preset mapping relation between network interface and processor, is sent to described network interface by described processor; When described processor transmission route limit value is less than or equal to predetermined threshold, after waiting for certain hour, detects described processor transmission route limit value and whether be greater than predetermined threshold.
5. method as claimed in claim 4, is characterized in that, when the Packet Generation request in processor transmit queue is sent to described network interface, described processor transmission route limit value is subtracted one; When reading the response of described Packet Generation, described processor transmission route limit value is added one; Wherein processor transmission route limit value is used for identification processor and sends the ability of information, its initial value be greater than one integer value.
6. method as claimed in claim 4, it is characterized in that, described processor transmit queue and processor receiving queue are the space for buffered message set up in advance in the memory headroom that processor is corresponding.
7. a system for transceiving data bag, is characterized in that, comprising: network interface and processor;
Described network interface is according to network interface transmission route limit value, and the preset mapping relation between described network interface and described processor, receives data packets request in network interface transmit queue is sent to described processor, from internal memory, obtains described packet for described processor; Described network interface receives the receives data packets response returned after described processor is disposed to packet, by described receives data packets response buffer to network interface receiving queue, after reading the response of described receives data packets, discharge the resource that described packet takies at network interface;
Described processor is according to processor transmission route limit value, and the preset mapping relation between described network interface and described processor, Packet Generation request in processor transmit queue is sent to described network interface, from internal memory, obtains described packet for described network interface; Described processor receives the Packet Generation response returned after described network interface sends packet, by described Packet Generation response buffer to processor receiving queue, after reading the response of described Packet Generation, discharges the resource that described packet takies at processor;
Wherein, described network interface transmit queue and network interface receiving queue are the space for buffered message set up in advance in the memory headroom that described network interface is corresponding; Described processor transmit queue and processor receiving queue are the space for buffered message set up in advance in the memory headroom that processor is corresponding.
CN201010225797.7A 2010-07-12 2010-07-12 Method and system for receiving and transmitting data packet Active CN101902398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010225797.7A CN101902398B (en) 2010-07-12 2010-07-12 Method and system for receiving and transmitting data packet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010225797.7A CN101902398B (en) 2010-07-12 2010-07-12 Method and system for receiving and transmitting data packet

Publications (2)

Publication Number Publication Date
CN101902398A CN101902398A (en) 2010-12-01
CN101902398B true CN101902398B (en) 2014-12-17

Family

ID=43227613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010225797.7A Active CN101902398B (en) 2010-07-12 2010-07-12 Method and system for receiving and transmitting data packet

Country Status (1)

Country Link
CN (1) CN101902398B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752847B (en) * 2011-04-19 2015-09-02 腾讯科技(深圳)有限公司 A kind of processing method of working application and device
CN103490939A (en) * 2012-06-11 2014-01-01 中兴通讯股份有限公司 Data packet processing method and data packet processing device
CN109218119B (en) * 2017-06-30 2020-11-27 迈普通信技术股份有限公司 Network packet loss diagnosis method and network equipment
CN109271267B (en) * 2018-08-27 2022-11-22 北京达佳互联信息技术有限公司 Routing data processing method and device, electronic equipment and storage medium
CN111427814B (en) * 2020-03-05 2021-12-07 深圳震有科技股份有限公司 Inter-core communication method based on AMP system, terminal and storage medium
CN117857475B (en) * 2024-03-08 2024-05-14 中车南京浦镇车辆有限公司 Data transmission scheduling method and system for Ethernet train control network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567858A (en) * 2003-06-19 2005-01-19 联想(北京)有限公司 A dual network card based communication method
CN101674193A (en) * 2009-08-21 2010-03-17 曙光信息产业(北京)有限公司 Management method of transmission control protocol connection and device thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567858A (en) * 2003-06-19 2005-01-19 联想(北京)有限公司 A dual network card based communication method
CN101674193A (en) * 2009-08-21 2010-03-17 曙光信息产业(北京)有限公司 Management method of transmission control protocol connection and device thereof

Also Published As

Publication number Publication date
CN101902398A (en) 2010-12-01

Similar Documents

Publication Publication Date Title
CN101902398B (en) Method and system for receiving and transmitting data packet
CN111580995B (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
KR20150120526A (en) Multicast information transmission method and device
CN104796337A (en) Method and device for forwarding message
US9774651B2 (en) Method and apparatus for rapid data distribution
JP2013518454A (en) Radio resource scheduling method, access network element and terminal
JP7239599B2 (en) Communication method and communication device
CN109691179A (en) A kind of conversation shift method and apparatus
CN103441941A (en) High performance data message capture method and device based on Linux
CN111600812B (en) Message processing method, processing device, readable medium and system
US9898421B2 (en) Memory access processing method, memory chip, and system based on memory chip interconnection
CN113590512A (en) Self-starting DMA device capable of directly connecting peripheral equipment and application
CN104753814A (en) Packet dispersion method based on network adapter
CN110913505A (en) Downlink data caching method, network equipment and UPF entity
CN105099645A (en) Multi-user concurrent communication method and device based on half-duplex communication device
WO2013068925A2 (en) Method and apparatus for controlling wireless devices
CN109788047A (en) A kind of cache optimization method and a kind of storage medium
US20170303117A1 (en) Logical address assignment in a cloud cell
CN109600421B (en) Method for selecting distributed computing resources in wireless cloud computing system
CN102594708A (en) Flow control method and device, line cards and distributed network equipment
CN114792539A (en) Memory reservation for radio devices
CN104850517A (en) Method and apparatus for transmitting packet data using DMA
TW200809238A (en) A system of testing speed of universal serial bus and a method applies the same
CN113867940B (en) Memory management method and related device
WO2015070539A1 (en) Dma-based data compression chip structure and implementation method therefor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
CB03 Change of inventor or designer information

Inventor after: Xia Shaofei

Inventor before: Deng Hongping

Inventor before: Miao Jun

Inventor before: Tan Xiao

Inventor before: Tong Chao

COR Change of bibliographic data
TR01 Transfer of patent right

Effective date of registration: 20170112

Address after: 400021 Chongqing city Yubei District birch Road No. 39

Patentee after: CHONGQING JUNHUA ELECTRICAL AND MECHANICAL EQUIPMENT Co.,Ltd.

Address before: 100000 Beijing city Chaoyang District Albemarle Road No. 12 Chaowai room 801 8

Patentee before: Beijing Gao Hang United Technology Co.,Ltd.

Effective date of registration: 20170112

Address after: 100000 Beijing city Chaoyang District Albemarle Road No. 12 Chaowai room 801 8

Patentee after: Beijing Gao Hang United Technology Co.,Ltd.

Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Patentee before: ZTE Corp.

CP03 Change of name, title or address

Address after: 400000 Chongqing city Yubei District birch Road No. 39

Patentee after: Chongqing Jinling Intelligent Equipment Co.,Ltd.

Address before: 400021 Chongqing city Yubei District birch Road No. 39

Patentee before: CHONGQING JUNHUA ELECTRICAL AND MECHANICAL EQUIPMENT Co.,Ltd.

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20200509

Address after: 400700 no.5-347, Yunhan Avenue, Shuitu hi tech Industrial Park, Beibei District, Chongqing

Patentee after: CHONGQING TIANZHIHUIQI TECHNOLOGY CO.,LTD.

Address before: 400000 Chongqing city Yubei District birch Road No. 39

Patentee before: Chongqing Jinling Intelligent Equipment Co.,Ltd.

TR01 Transfer of patent right