CN1545274A - A method for implementing memory space occupation reduction during multicast data packet forwarding - Google Patents

A method for implementing memory space occupation reduction during multicast data packet forwarding Download PDF

Info

Publication number
CN1545274A
CN1545274A CNA2003101038775A CN200310103877A CN1545274A CN 1545274 A CN1545274 A CN 1545274A CN A2003101038775 A CNA2003101038775 A CN A2003101038775A CN 200310103877 A CN200310103877 A CN 200310103877A CN 1545274 A CN1545274 A CN 1545274A
Authority
CN
China
Prior art keywords
formation
packet
bag
describing word
transmission
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.)
Granted
Application number
CNA2003101038775A
Other languages
Chinese (zh)
Other versions
CN1298147C (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.)
ZTE Corp
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 CNB2003101038775A priority Critical patent/CN1298147C/en
Publication of CN1545274A publication Critical patent/CN1545274A/en
Application granted granted Critical
Publication of CN1298147C publication Critical patent/CN1298147C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The invention is an implementing method for reducing occupied memory space when multicast data package is transmitted, especially an implementing method for reducing occupied memory space by improving list queue when multicast data package is transmitted. Its character: there is only a copy of the data package needed to be transmitted in the memory; there is only a list linked of package description words, queue description word of each transmission queue is connected to the list by a head pointer; after completing transmitting the final queue connected with the list, give the space occupied by the data package back to the buffer. It can implement zero-copy data package transmission, and the relativity of all the queue transmission threads is very little and it enhances multicast transmitting efficiency.

Description

A kind of method that when multicast packet is transmitted, realizes reducing the EMS memory occupation space
Technical field
The present invention relates to a kind of method that when multicast packet is transmitted, realizes reducing the EMS memory occupation space, particularly when multicast packet is transmitted, realize reducing the method in EMS memory occupation space by the improvement of chained list formation.The present invention is applicable to computer software technical field, especially network communication field.
Background technology
Along with the development in broadband, multimedia service such as Streaming Media, video conference and video request program etc. are becoming the important component part that information transmits.Multimedia related service demand growing stimulated popularizing of IP multicasting technology and development, becomes the indispensable key technology of new generation network.
From technical standpoint, multicasting technology can be divided into control aspect and data plane.The control aspect is meant the variety of protocol of supporting multicasting technology, as IGMP, and PIM-DM, PIM-SM, DVMRP etc. finish management and control to multicast group by these agreements.Data plane is meant the forwarding of multicast packet.The present invention relates generally to the forwarding of multicast packet.
In the system based on the software forwarding, the forwarding of multicast packets is each multicast packets to be duplicated send to corresponding veneer or port.During each the transmission, all copy a packet in the internal memory.The efficient of this sending method is low-down.
A common system block diagram as shown in Figure 1.
When packet sends, must relate to the setting up procedure of transmit queue.With the inventive method relevant especially be the improvement that the chained list formation is carried out.
In order better to describe the transmission of multicast packets, need introduce earlier the process of using chained list to send unicast packet.
When using chained list to send unicast packet, be fully independently between each transmit queue of forming by chained list, the describing word Packet link of each bag in the describing word Queue Descriptor of the formation that each formation use is privately owned separately and the formation.
The describing word of formation comprises Queue count, Head pointer, and Tail pointer territory, implication is following listed:
Queue count: be meant the number of the bag to be sent in the current queue, that is to say the number of Packetlink, be called counter.
Head pointer: be meant the address of first packet link in the formation, be called head pointer.
Tail pointer: be meant the address of last packet link in the corresponding formation, be called tail pointer.
The describing word of each bag in the formation comprises next address, packet info territory, and implication is following listed:
Next address: the address that is meant next Packet link.
Packet info: be meant the information of packet, generally be used to describe the length of bag, information such as the initial address of bag.
The institutional framework of chained list as shown in Figure 2.
In clean culture is transmitted, receive a packet, find the dequeue of bag after, will add corresponding formation to packet, we are called into formation.Sending thread then is the descriptor that reads bag in formation, sends in order, and we are called dequeue.
The handling process of going into formation is as follows:
The first step: program finds the queue number of the dequeue that needs placement;
Second step: the formation describing word Queue Descriptor that reads formation;
The 3rd step: the describing word Packet link of the bag that needs are added adds the last of formation to, and the next one bag describing word pointer next address that promptly revises among the tail of the queue bag describing word packet link is the address of the packet link that need join the team;
The 4th step: the describing word Queue Descriptor that revises formation revises the packet link address of tail pointer tail pointer for joining the team in the formation describing word to react new variation;
The 5th step: the counter Queue Count in the formation describing word is added 1.Flow process finishes.
The handling process of going into formation as shown in Figure 3.
The handling process of dequeue is as follows:
The first step: read the formation describing word Queue Descriptor that formulates formation;
Second step: judge whether the counter Queue Count in the formation describing word is 0,,, counter Queue Count is subtracted 1 back continue to carry out for the 3rd step if be not 0 if be that 0 dequeue flow process directly finishes;
The 3rd step: the bag describing word packet link that reads the needs dequeue according to the head pointer head pointer in the formation describing word;
The 4th step: the head pointer head pointer that revises in the formation describing word is the next one bag describing word that needs the bag describing word packet link of dequeue, promptly needs the next address of the bag describing word paeket link of dequeue.Flow process finishes.
The handling process of dequeue as shown in Figure 4.
Introduced the flow process of going into formation and dequeue of clean culture above, sent for the multicast with copy mode, found a plurality of queue number exactly, the copies data bag joins a plurality of formations.And the send mode of dequeue is identical with unicast packet, just repeats to send.
Use the formation flow process of going into of the multicast transmission of copy mode to be like this:
The first step: search a dequeue number,, then finish transmission flow,, then enter the operation of second step if find if do not find;
Second step: the packet that copy will send;
The 3rd step: the mode according to clean culture is gone into formation, goes into and returns the first step after the formation operation is finished.
Multicast packets go into the formation flow process as shown in Figure 5.
The subject matter of this mode is:
Because each formation sends behind the packet all the bag describing word Packet link dequeue with this bag in this formation, and discharge the memory headroom of corresponding store data bag.So a plurality of formations just need repeatedly copy packet, and generate new packet describing word to add in each formation.So just take a lot of unnecessary spaces, also reduced the efficient of program simultaneously.
Summary of the invention
The objective of the invention is on the basis of existing code and data structure, to improve, a kind of method that realizes reducing the EMS memory occupation space when multicast packet is transmitted is provided, particularly when multicast packet is transmitted, realize reducing the method in EMS memory occupation space by the improvement of chained list formation, solve the problem that the multicast sender formula that realizes with copy mode exists space waste and inefficiency.
The present invention is achieved in that
A kind of method that realizes reducing the EMS memory occupation space when multicast packet is transmitted is characterized in that:
In internal memory, only there is a copy that needs to transmit packet;
Only have a chained list that is formed by connecting by the bag describing word in internal memory, the formation describing word of each transmit queue is connected to this chained list by head pointer;
After in the end a formation that links to each other with this chained list sends and finishes, this packet occupation space is returned to buffer memory (buffer).
Described is that the bag describing word that needs are gone into the multicast packets of formation is joined in all formations by the chained list that is formed by connecting of bag describing word, and increases the flag bit that each formation sends the notebook data end-of-packet in the bag describing word.
Described each formation is judged all flag bits after sending and finishing, if this transmission is not last transmission, just puts this formation and send end mark, but do not give back the buffer memory of packet, if this transmission is last transmission, just give back the buffer memory of packet.
Increase the flag bit that each formation sends the notebook data end-of-packet in the described bag describing word, send packet end mark bitmap (Tx OK Bitmap territory) realization by in the structure of bag describing word, increasing, after each formation sends end, need to judge and revise this territory.
A kind of method that realize to reduce the EMS memory occupation space when multicast packet is transmitted comprises that multicast packets goes into formation, multicast packets dequeue:
Multicast packets is gone into formation and is further comprised the steps:
The first step: the queue number that obtains next dequeue;
Second step: the mode according to clean culture is gone into formation, and copies data bag and the new packet describing word of generation do not need to judge whether this packet need send in this formation;
The 3rd step: judge whether it is last dequeue, if not then returning the first step, if then finish to go into formation,
The multicast packets dequeue further comprises the steps:
The first step: according to the mode dequeue of clean culture, revise the structure of pointer in the formation, revise the head pointer in the formation describing word, do not discharge the space of the packet describing word of formation, do not give back the space of packet;
Second step: judge whether this bag need send in this formation, if then carried out for the 3rd step, if not, then carried out for the 4th step;
The 3rd step: send the notebook data bag;
The 4th step: read the transmission packet end mark bitmap in this bag describing word, judge whether last the transmission, send the end mark position if not then in sending packet end mark bitmap, this formation being set, if last the transmission, then need to give back packet shared space, discharge the space of this bag describing word.
After using the present invention, packet realizes that zero-copy sends, and the relevance of each formation transmission thread is very little, does not need mutual wait during transmission, has improved the efficient that multicast sends greatly.
Description of drawings
Fig. 1 is based on the multicast forwarding system block diagram of CPU;
Fig. 2 is the transmission chained list formation schematic diagram that sends unicast packet;
Fig. 3 is that clean culture transmission chained list is gone into the formation flow chart;
Fig. 4 is that clean culture sends chained list dequeue flow chart;
Fig. 5 is that multicast sends under the copy mode goes into chained list formation flow chart;
Fig. 6 is the multicast queue packet describing word structure chart after improving;
Fig. 7 is that the multicast after improving sends chained list formation schematic diagram;
Fig. 8 is that the multicast transmission chained list after improving is gone into the formation flow chart;
Fig. 9 is that the multicast after improving sends chained list dequeue flow chart;
Figure 10 is a system block diagram of using a concrete embodiment of the inventive method.
Embodiment
The present invention improves the method that multicast is gone into formation, the copy that in internal memory, has only portion (or several parts) packet, the chained list that also only exists simultaneously a bag describing word to be formed by connecting in internal memory, the formation describing word of each transmit queue is connected to this chained list by head pointer bead pointer.When sending packet, have only the formation transmission end that in the end links to each other with this chained list after, just this packet occupation space is returned to buffer memory (buffer).Can save the copy time of packet like this, improve the forward efficiency of multicast.
Particularly, the bag describing word packet link that needs are gone into the multicast packets of formation joins in all formations exactly, and no matter finally whether need send, and in bag describing word packet link, increase the flag bit that each formation sends the notebook data end-of-packet, each formation is judged all flag bits after sending and finishing, if this transmission is not last transmission, just put this formation and send end mark, but do not give back the buffer memory of packet, if this transmission is last transmission, just give back the buffer memory of packet.
Formation describing word Queue Descriptor structure for Fig. 2 is not made change substantially, just change the structure of bag describing word packet link, wherein, the definition that next bag is described font size address nextaddress and package informatin packet info territory does not change, increased transmission packet end mark bitmap tx OK bitmap territory newly, this territory does not need to fill in when going into formation.Only after each formation sends end, need to judge and revise this territory.As shown in Figure 6.
Variation has taken place through the institutional framework of revising later multicast chained list.
The transmit queue of being made up of chained list no longer is fully independently, the describing word Queue Descriptor of privately owned separately formation is still used in each formation, but by the chained list that the describing word Packetlink of each bag forms then is public, counter QueueCount in the describing word of each formation, head pointer Head Pointer, tail pointer Tail Pointer field all is identical, because their public same formations.
The institutional framework of the chained list of multicast as shown in Figure 7.
After concrete the enforcement, multicast packets goes into formation and the dequeue flow process all needs to carry out concrete change:
Multicast packets is gone into the formation flow process:
The first step: the queue number that obtains next dequeue;
Second step: formation is gone in the granting according to clean culture, does not need the generation of the copy and the new packet describing word packet link of packet.Here do not need to judge whether this bag need send in this formation;
The 3rd step: judge whether it is last dequeue, if not then returning the first step, if then finish to go into the formation flow process.
The flow process that multicast packets is gone into formation as shown in Figure 8.
Multicast packets dequeue flow process:
The first step: according to the mode dequeue of clean culture, revise the structure of pointer in the formation, revise the Head pointer head pointer among the formation describing word Queue Descriptor, but do not discharge the space of the packet describing word packet link of formation, also do not give back the space of packet;
Second step: judge whether this bag need send in this formation, if then carried out for the 3rd step, if not, then carried out for the 4th step;
The 3rd step: send the notebook data bag;
The 4th step: read the transmission packet end mark bitmap Tx OK Bitmap among this bag describing word packet link, judge whether last the transmission, send the end mark position if not then in sending packet end mark bitmap Tx OK Bitmap, this formation being set.If last the transmission then needs to give back packet shared space, discharge the space of this bag describing word packet link.
The 5th step: flow process finishes.
The flow process of the multicast packets dequeue after the improvement as shown in Figure 9.
In the DSLAM of our company's model product, need on network processing unit, finish multicast and send, mainly be to send multicast packet from up ethernet port to flow to ADSL user, owing to be that microcode is transmitted, need repeat to send.Before use the present invention, the packets need copy sends, and the efficient of transmission is lower.After using the present invention, packet realizes that zero-copy sends, and the relevance of each formation transmission thread is very little, does not need mutual wait during transmission, has improved the efficient that multicast sends greatly.
The concrete system block diagram of implementing as shown in figure 10.
After packet receives network processing unit from PHY/MAC chip or exchange chip, packet is kept at gives network protocol processing engine in the buffer memory and handle by receiving engine, carrying out necessary protocol processes, after the route querying, if multicast packets, just packet is joined the transmit queue of all of the port, send by sending engine then, and send the engine that finishes by last and give back buffer memory according to the present invention.

Claims (5)

1, a kind of method that realizes reducing the EMS memory occupation space when multicast packet is transmitted is characterized in that:
In internal memory, only there is a copy that needs to transmit packet;
Only have a chained list that is formed by connecting by the bag describing word in internal memory, the formation describing word of each transmit queue is connected to this chained list by head pointer;
After in the end a formation that links to each other with this chained list sends and finishes, this packet occupation space is returned to buffer memory.
2, when multicast packet is transmitted, realize reducing the method in EMS memory occupation space according to claim 1, it is characterized in that:
Described is that the bag describing word that needs are gone into the multicast packets of formation is joined in all formations by the chained list that is formed by connecting of bag describing word, and increases the flag bit that each formation sends the notebook data end-of-packet in the bag describing word.
3, when multicast packet is transmitted, realize reducing the method in EMS memory occupation space according to claim 1, it is characterized in that:
Described each formation is judged all flag bits after sending and finishing, if this transmission is not last transmission, just puts this formation and send end mark, but do not give back the buffer memory of packet, if this transmission is last transmission, just give back the buffer memory of packet.
4, when multicast packet is transmitted, realize reducing the method in EMS memory occupation space as claimed in claim 1 or 2, it is characterized in that:
Increase the flag bit that each formation sends the notebook data end-of-packet in the described bag describing word, send the realization of packet end mark bitmap by in the structure of bag describing word, increasing, after each formation sends end, need to judge and revise this transmission packet end mark bitmap.
5, a kind of method that realize to reduce the EMS memory occupation space when multicast packet is transmitted comprises that multicast packets goes into formation, multicast packets dequeue:
Multicast packets is gone into formation and is further comprised the steps:
The first step: the queue number that obtains next dequeue;
Second step: the mode according to clean culture is gone into formation, and copies data bag and the new packet describing word of generation do not need to judge whether this packet need send in this formation;
The 3rd step: judge whether it is last dequeue, if not then returning the first step, if then finish to go into formation,
The multicast packets dequeue further comprises the steps:
The first step: according to the mode dequeue of clean culture, revise the structure of pointer in the formation, revise the head pointer in the formation describing word, do not discharge the space of the packet describing word of formation, do not give back the space of packet;
Second step: judge whether this bag need send in this formation, if then carried out for the 3rd step, if not, then carried out for the 4th step;
The 3rd step: send the notebook data bag;
The 4th step: read the transmission packet end mark bitmap in this bag describing word, judge whether last the transmission, send the end mark position if not then in sending packet end mark bitmap, this formation being set, if last the transmission, then need to give back packet shared space, discharge the space of this bag describing word.
CNB2003101038775A 2003-11-18 2003-11-18 A method for implementing memory space occupation reduction during multicast data packet forwarding Expired - Fee Related CN1298147C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101038775A CN1298147C (en) 2003-11-18 2003-11-18 A method for implementing memory space occupation reduction during multicast data packet forwarding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101038775A CN1298147C (en) 2003-11-18 2003-11-18 A method for implementing memory space occupation reduction during multicast data packet forwarding

Publications (2)

Publication Number Publication Date
CN1545274A true CN1545274A (en) 2004-11-10
CN1298147C CN1298147C (en) 2007-01-31

Family

ID=34333359

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101038775A Expired - Fee Related CN1298147C (en) 2003-11-18 2003-11-18 A method for implementing memory space occupation reduction during multicast data packet forwarding

Country Status (1)

Country Link
CN (1) CN1298147C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426792C (en) * 2005-07-27 2008-10-15 华为技术有限公司 Method for processing buffer storage weight in muticast scheduling
CN100459502C (en) * 2006-01-16 2009-02-04 北京速能数码网络技术有限公司 Dynamic copying and sending device of asymmetric cross net section multiple path data stream
CN102821045A (en) * 2012-08-03 2012-12-12 中兴通讯股份有限公司 Method and device for copying multicast message
CN104063452A (en) * 2014-06-24 2014-09-24 武汉烽火众智数字技术有限责任公司 Read-write method and read-write device for shared queue
CN106375240A (en) * 2016-09-18 2017-02-01 深圳震有科技股份有限公司 Ethernet packet forwarding method and system among multiple Ethernet ports

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IL125515A (en) * 1998-07-26 2004-01-04 Galileo Technology Ltd Burst descriptors
US7418523B2 (en) * 2001-01-25 2008-08-26 Ericsson Ab Operation of a multiplicity of time sorted queues with reduced memory
WO2002084959A1 (en) * 2001-04-11 2002-10-24 Chelsio Communications, Inc. Non-blocking scalable switching fabric
CN1129281C (en) * 2001-10-17 2003-11-26 华为技术有限公司 Method of raising IP message forwarding speed utilizing slow storage technology

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426792C (en) * 2005-07-27 2008-10-15 华为技术有限公司 Method for processing buffer storage weight in muticast scheduling
CN100459502C (en) * 2006-01-16 2009-02-04 北京速能数码网络技术有限公司 Dynamic copying and sending device of asymmetric cross net section multiple path data stream
CN102821045A (en) * 2012-08-03 2012-12-12 中兴通讯股份有限公司 Method and device for copying multicast message
CN102821045B (en) * 2012-08-03 2015-07-22 中兴通讯股份有限公司 Method and device for copying multicast message
CN104063452A (en) * 2014-06-24 2014-09-24 武汉烽火众智数字技术有限责任公司 Read-write method and read-write device for shared queue
CN106375240A (en) * 2016-09-18 2017-02-01 深圳震有科技股份有限公司 Ethernet packet forwarding method and system among multiple Ethernet ports
CN106375240B (en) * 2016-09-18 2019-09-20 深圳震有科技股份有限公司 Ethernet message forwarding method and system between a kind of Multi-netmouth

Also Published As

Publication number Publication date
CN1298147C (en) 2007-01-31

Similar Documents

Publication Publication Date Title
CN1232081C (en) Repeating method for multi-broadcast message in network communication
CN101030943A (en) Method for transmitting message and route
CN1791054A (en) Virtual special network multicast method by virtual router mode
CN1921457A (en) Network equipment and message transferring method based on multiple-core processor
CN1697354A (en) Method for reliable transmitting data through multicast and unicast protocol, and host of receiving data
CN1777149A (en) Method for realizing multicast translation in three-layer switching unit
CN1946054A (en) Transmission method and device for high speed data flow and data exchange device
CN1620010A (en) VLAN server
CN1866845A (en) Virtual identifying method for multicast forwarding table output port
CN1716905A (en) Multicast packet relay device adapted for virtual router
CN1716904A (en) Group broadcast realizing method based on multiple service transmission platform
CN1863142A (en) Method for providing different service quality tactics to data stream
CN101047633A (en) Method, device and system for implementing multi-route transmission
CN1744574A (en) Method for multicasting message to traverse non multicasting network and its applied network system
CN1848807A (en) Group broadcasting business realizing method
CN101047614A (en) Flow transmission route set-up method and data transmission system in IPv6 network environment
CN1809032A (en) Method of dynamically learning address on MAC layer
CN101043387A (en) Remote mirror-image realization process, remote monitoring aids and system for realizing remote mirror-image
CN101051920A (en) Method for realizing multicast business and network equipment
CN101079728A (en) A method, server and system fro optimizing group management protocol
CN1298147C (en) A method for implementing memory space occupation reduction during multicast data packet forwarding
CN101052004A (en) Multicast transmission method based on virtual distribution net in network
CN1889448A (en) Method and system for crossing virtual local network group broadcasting under assigned source group broadcasting protocol extraneous group broadcasting mode
CN1741499A (en) Virtual circuit exchanging method based on MAC studying
CN1592250A (en) Flow medium data multi-point transmission method

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070131

Termination date: 20171118