CN1879385A - 预取用于网络分组处理的协议控制块的方法和系统 - Google Patents

预取用于网络分组处理的协议控制块的方法和系统 Download PDF

Info

Publication number
CN1879385A
CN1879385A CNA2004800331259A CN200480033125A CN1879385A CN 1879385 A CN1879385 A CN 1879385A CN A2004800331259 A CNA2004800331259 A CN A2004800331259A CN 200480033125 A CN200480033125 A CN 200480033125A CN 1879385 A CN1879385 A CN 1879385A
Authority
CN
China
Prior art keywords
grouping
processing unit
buffer memory
handle
pcb
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
CNA2004800331259A
Other languages
English (en)
Other versions
CN1879385B (zh
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.)
Intel Corp
Original Assignee
Intel 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 Intel Corp filed Critical Intel Corp
Publication of CN1879385A publication Critical patent/CN1879385A/zh
Application granted granted Critical
Publication of CN1879385B publication Critical patent/CN1879385B/zh
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/12Protocol engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5601Transfer mode dependent, e.g. ATM
    • H04L2012/5603Access techniques

Abstract

描述了用来为网络分组处理预取协议控制块的方法和系统。所述方法包括接收分组,把与所述分组相关联的协议控制块(PCB)预取到缓存中,排队分组以进行处理,以及当处理单元准备好处理所述分组时,从所述缓存取回所述PCB。

Description

预取用于网络分组处理的协议控制块的方法和系统
背景
1.技术领域
本发明的实施方案涉及网络分组处理领域,更具体地说,涉及预取用于网络分组处理的协议控制块。
2.背景信息和相关技术的描述
当分组(packet)到达网络设备时,网络接口卡(NIC)接受(take)所述分组并将其存储在主存储器中。接着NIC可以发送中断以向中央处理器(CPU)通知该分组。然后,中断单元可以检查中断的目的地(destination),禁止(disable)来自NIC的后续中断,发起(initiate)软件中断,并且排队所述分组以进行处理。当处理单元准备好处理分组的时候,识别分组所属的连接。这可以包括取(fetch)与分组相关联的协议控制块(PCB)。取了PCB后,CPU可以开始处理分组。当处理单元准备好处理分组时,取PCB所发生的存储器延迟(latency)会降低网络设备的性能。随着网络速度的增加,对于性能和吞吐量,此存储器延迟成为越来越大的问题。
附图说明
可以通过参考以下描述和附图来最好地理解本发明,所述附图用来图示说明本发明的
实施方案。在附图中:
图1是图示结合本发明的系统的一个一般性实施方案的框图。
图2是根据本发明的一个实施方案,示出结合本发明的示例性系统的框图。
图3是根据本发明的一个实施方案,示出方法的流程图。
图4是可以实践被图示说明的发明的某些方面的合适计算环境的框图。
具体实施方式
描述了预取协议控制块用于网络分组处理的系统和方法的实施方案。在下面的描述中,阐述了很多具体的细节。然而,可以理解,无需这些具体的细节可以实现本发明。此外,公知的电路、结构和技术没有详细示出,以免模糊对本发明的理解。
在整篇说明书中提及“一个实施方案”或“实施方案”意味着关于该实施方案描述的具体特征、结构或特性被包括在本发明的至少一个实施方案中。因此,“在一个实施方案中”或“在实施方案中”在整篇说明书中不同地方的出现不一定全是指同一实施方案。此外,所述具体特征、结构或特性可以以任何适当的方式结合在一个或更多个实施方案中。
参考图1,根据本发明的一个实施方案,框图示出了系统100。本领域的普通技术人员会理解,系统100可以包括比图1示出的那些组件更多的组件。但是,对于实践本发明,不需要为了公开说明性的实施方案而示出所有这些一般性的常规组件。
系统100包括接收单元102,以接收来自网络的分组。在一个实施方案中,分组可以根据传输控制协议(TCP/IP)规范进行传送。特定的一连串分组可以被称为“连接”或“分组流(flow)”。连接的上下文(context)可以存储在被称作协议控制块(PCB)的结构中。此上下文可以由连接的源IP地址、目的IP地址、源端口、目的端口和/或协议类型唯一地确定。对于每个在接收单元102接收到的分组,与所述分组相关联的PCB可能需要从存储器中取回(retrieved)。
针对每个被发送和接收的分组而从存储器访问PCB的操作具有相关联的存储器延迟和带宽问题。为了减少这些问题,预取单元104把与被接收的分组相关联的PCB取入处理单元106的缓存(cache)108中。然后,排队所述分组以进行处理。当处理单元106准备好处理分组时,PCB可以从其缓存108中被取回。因此,当处理单元准备好处理分组时,取PCB的存储器延迟被减少。
在一个实施方案中,预取单元104还将分组头(header)信息预取到缓存108中。当处理单元106准备好处理分组时,分组的头信息可以从缓存108取回,然后分组可以被处理。
图2根据本发明的一个实施方案,示出了结合本发明的示例性系统。在此实施方案中,网络接口卡(NIC)202接收来自网络的分组。分组通过存储器控制器212存储在主存储器214中。NIC 202发送中断,以向处理单元(例如206、208或210)通知该分组。例如中断服务循环(rotate)(ISR)单元的中断单元204检查中断的目的地,禁止来自NIC的后续中断,发起软件中断,并且排队分组以进行处理。在一个实施方案中,通过排队延期过程调用(deferred procedure call,DPC)来排队分组,以进行处理。这时,可以发起与分组相关联的PCB预取。还可以发起分组头的预取。PCB和分组头可以被预取到缓存(例如216、218、或220)中。预取可以在硬件或软件中完成。当处理单元(例如206、208、或210)准备好处理分组时,处理单元可以从其缓存中取出PCB和分组头。然后,分组可以被处理。接着,处理单元可以使能(enable)来自NIC的中断。
在一个实施方案中,预取也可以用在发送侧,以减少存储器延迟。当分组被排队以传输到网络外时,PCB可以被预取。用户空间中的套接字(socket)接口与内核(kernel)空间中的协议栈处理间经常有延迟。所以,为分组发起发送请求时,与分组相关联的PCB可以被预取。当内核准备好处理用于传输的分组时,PCB已经被预取并且准备好进行处理。这减少了发送侧的存储器延迟。
图3根据本发明的一个实施方案示出了一种方法。在300,接收到分组。在302,与所述分组相关联的PCB被预取到缓存中。在一个实施方案中,分组头也被预取到缓存中。在304,排队所述分组用于处理。在306,当处理单元准备好处理所述分组时,从缓存中取回PCB。在一个实施方案中,分组的头也从缓存中取回。然后,分组可以被处理。
图4是可以实践所说明的发明的某些方面的合适计算环境的框图。在一个实施方案中,上述方法可以在具有组件402-412的计算机系统400上实现,所述组件包括处理器402、存储器404、输入/输出器件406、数据存储设备412和网络接口410,这些组件通过总线408互相耦合。这些组件执行它们在技术领域中公知的常规功能,并且提供实现系统100的装置。这些组件一起代表硬件系统的一个宽泛的类别,包括但不限于通用计算机系统和专用的分组转发设备。应该理解,计算机系统400的各种组件可以重新安排,并且本发明的某些实现可能并不需要也并不包括上面所有的组件。此外,额外的组件可以被包括在系统400中,例如额外的处理器(例如数字信号处理器)、存储设备、存储器以及网络或通信接口。
正如本领域技术人员将会理解的那样,用于实现本发明的方法的实施方案的内容,例如计算机程序指令,可以由任何能够存储系统100可访问的数据的机器可读介质来提供,所述机器可读介质可以作为存储器的一部分或是存储器的附加,包括但不限于磁带(cartridge)、磁性盒带(magnetic cassette)、闪存存储卡、数字视频卡、随机访问存储器(RAM)、只读存储器(ROM)等等。在此方面,系统100被装配为以本领域公知的方式与这些机器可读介质进行通信。
本领域技术人员还将理解,用于实现本发明的方法的实施方案的内容可以从任何能够存储所述内容并向系统100传送这些内容的外部设备提供给系统100。例如,在本发明的一个实施方案中,系统100可以连接到网络,并且所述内容可以存储在网络中的任何设备上。
尽管关于几个实施方案描述了本发明,但是本领域的技术人员将认识到本发明并不限于所描述的实施方案,而是可以在所附权利要求书的精神和范围内以修改和改变来实现本发明。因此说明书应该被认为是示例性而非限制性的。

Claims (25)

1.一种方法,包括:
在网络设备上接收分组;
将与所述分组相关联的协议控制块(PCB)预取到缓存中;
排队所述分组以进行处理;以及
当处理单元准备好处理所述分组时,从所述缓存中取回所述PCB。
2.如权利要求1所述的方法,还包括将与所述分组相关联的头预取到所述缓存中。
3.如权利要求2所述的方法,还包括,当处理单元准备好处理所述分组时,从所述缓存中取回所述分组头。
4.如权利要求1所述的方法,还包括发送中断以向所述处理单元通知接收到所述分组。
5.如权利要求1所述的方法,其中把与所述分组相关联的PCB预取到缓存中的操作包括把与所述分组相关联的PCB预取到所述处理单元的缓存中。
6.如权利要求5所述的方法,还包括把所述分组存储到耦合到所述处理单元的存储器中。
7.如权利要求1所述的方法,还包括处理所述分组。
8.一种装置,包括:
接收单元,所述接收单元用来接收分组;
耦合到所述接收单元的预取单元,所述预取单元把与所述分组相关联的协议控制块(PCB)预取到缓存中,并且排队所述分组以进行处理;以及
耦合到所述预取单元的处理单元,所述处理单元用来从所述缓存取回所述PCB,并处理所述分组。
9.如权利要求8所述的装置,其中所述接收单元是网络接口卡。
10.如权利要求8所述的装置,其中所述预取单元还把与所述分组相关联的头预取到所述缓存中。
11.如权利要求10所述的装置,其中所述处理单元还从所述缓存中取回所述分组头。
12.如权利要求8所述的装置,其中所述预取单元把与所述分组相关联的PCB预取到缓存中的操作包括,所述预取单元把与所述分组相关联的PCB预取到所述处理单元的缓存中。
13.如权利要求8所述的装置,还包括耦合到所述接收单元和所述处理单元的中断单元,所述中断单元从所述接收单元接收中断,并向所述处理单元通知所述分组。
14.一种制品,包括:
包括这样的内容的机器可访问介质,当机器访问所述内容时,导致所述机器:
接收分组;
将与所述分组相关联的协议控制块(PCB)预取到缓存中;
排队所述分组以进行处理;以及
当处理单元准备好处理所述分组时,从所述缓存中取回所述PCB。
15.如权利要求14所述的制品,其中所述机器可访问介质还包括这样的内容,所述内容导致所述机器把与所述分组相关联的头预取到所述缓存中。
16.如权利要求15所述的制品,其中所述机器可访问介质还包括这样的内容,所述内容导致所述机器在所述处理单元准备好处理所述分组时从所述缓存中取回所述分组头。
17.如权利要求14所述的制品,其中所述机器可访问介质还包括这样的内容,所述内容导致所述机器处理所述分组。
18.如权利要求14所述的制品,其中所述机器可访问介质还包括这样的内容,所述内容导致所述机器发送中断,以向所述处理单元通知接收到所述分组。
19.如权利要求14所述的制品,其中,包含被所述机器访问时导致所述机器把与所述分组相关联的PCB预取到缓存中的内容的所述机器可访问介质包括:包含当所述内容被所述机器访问时导致所述机器把与所述分组相关联的PCB预取到所述处理单元的缓存中的内容的所述机器可访问介质。
20.如权利要求14所述的制品,其中所述机器可访问介质还包括这样的内容,所述内容导致所述机器把所述分组存储在耦合到所述处理单元的存储器中。
21.一种系统,包括:
接收单元,所述接收单元用来接收分组;
耦合到所述接收单元的存储器,所述存储器用来存储所述接收到的分组;
耦合到所述存储器的存储器控制器,所述存储器控制器用来管理所述存储器;
耦合到所述接收单元的预取单元,所述预取单元把与所述分组相关联的协议控制块(PCB)预取到缓存中,并且排队所述分组以进行处理;以及
处理单元,所述处理单元用来从所述缓存取回所述PCB,并处理所述分组。
22.如权利要求21所述的系统,其中所述接收单元是网络接口卡。
23.如权利要求21所述的系统,其中所述预取单元还把与所述分组相关联的头预取到缓存中。
24.如权利要求23所述的系统,其中所述处理单元还从所述缓存中取回所述分组头。
25.如权利要求21所述的系统,还包括耦合到所述接收单元和所述处理单元的中断单元,所述中断单元从所述接收单元接收中断,并向所述处理单元通知所述分组。
CN2004800331259A 2003-11-12 2004-10-29 预取用于网络分组处理的协议控制块的方法和系统 Expired - Fee Related CN1879385B (zh)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US10/712,640 2003-11-12
US10/712,640 US20050100042A1 (en) 2003-11-12 2003-11-12 Method and system to pre-fetch a protocol control block for network packet processing
PCT/US2004/036095 WO2005050949A1 (en) 2003-11-12 2004-10-29 Method and system to protect a protocol control block for network packet processing

Publications (2)

Publication Number Publication Date
CN1879385A true CN1879385A (zh) 2006-12-13
CN1879385B CN1879385B (zh) 2012-03-21

Family

ID=34552689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2004800331259A Expired - Fee Related CN1879385B (zh) 2003-11-12 2004-10-29 预取用于网络分组处理的协议控制块的方法和系统

Country Status (8)

Country Link
US (1) US20050100042A1 (zh)
EP (1) EP1683321B1 (zh)
KR (1) KR100816938B1 (zh)
CN (1) CN1879385B (zh)
AT (1) ATE379917T1 (zh)
DE (1) DE602004010424T2 (zh)
TW (1) TWI269559B (zh)
WO (1) WO2005050949A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103946803B (zh) * 2011-10-17 2017-09-29 凯为公司 具有高效工作排队的处理器

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050286526A1 (en) * 2004-06-25 2005-12-29 Sood Sanjeev H Optimized algorithm for stream re-assembly
US7461173B2 (en) * 2004-06-30 2008-12-02 Intel Corporation Distributing timers across processors
US7761529B2 (en) * 2004-06-30 2010-07-20 Intel Corporation Method, system, and program for managing memory requests by devices
US20060004933A1 (en) * 2004-06-30 2006-01-05 Sujoy Sen Network interface controller signaling of connection event
US20060031474A1 (en) * 2004-07-19 2006-02-09 Linden Cornett Maintaining reachability measures
ES2340866T3 (es) * 2006-05-02 2010-06-10 Research In Motion Limited Metodo y sistema para optimizar el paso de metadatos.
KR100801004B1 (ko) * 2006-08-25 2008-02-05 삼성전자주식회사 임베디드 aⅴ 컨텐츠의 프로토콜 매칭 장치 및 방법
JP5028339B2 (ja) * 2008-06-09 2012-09-19 キヤノン株式会社 通信装置及び制御方法
US20110228674A1 (en) * 2010-03-18 2011-09-22 Alon Pais Packet processing optimization
US8327047B2 (en) 2010-03-18 2012-12-04 Marvell World Trade Ltd. Buffer manager and methods for managing memory
US10951525B2 (en) 2019-01-04 2021-03-16 Intel Corporation Availability of context information for packet processing

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2986802B2 (ja) * 1989-03-13 1999-12-06 株式会社日立製作所 プロトコル高速処理方法
US5819112A (en) * 1995-09-08 1998-10-06 Microsoft Corporation Apparatus for controlling an I/O port by queuing requests and in response to a predefined condition, enabling the I/O port to receive the interrupt requests
US5881296A (en) * 1996-10-02 1999-03-09 Intel Corporation Method for improved interrupt processing in a computer system
US6021446A (en) * 1997-07-11 2000-02-01 Sun Microsystems, Inc. Network device driver performing initial packet processing within high priority hardware interrupt service routine and then finishing processing within low priority software interrupt service routine
US6434620B1 (en) * 1998-08-27 2002-08-13 Alacritech, Inc. TCP/IP offload network interface device
AU3599899A (en) * 1998-03-26 1999-10-18 Gemplus Versatile interface smart card
JP4294142B2 (ja) * 1999-02-02 2009-07-08 株式会社日立製作所 ディスクサブシステム
US6453360B1 (en) * 1999-03-01 2002-09-17 Sun Microsystems, Inc. High performance network interface
US6625149B1 (en) * 1999-11-29 2003-09-23 Lucent Technologies Inc. Signaled receiver processing methods and apparatus for improved protocol processing
US6990669B1 (en) * 2000-03-21 2006-01-24 Microsoft Corporation Real-time scheduler
US20020144004A1 (en) * 2001-03-29 2002-10-03 Gaur Daniel R. Driver having multiple deferred procedure calls for interrupt processing and method for interrupt processing
US6820127B2 (en) * 2001-05-03 2004-11-16 International Business Machines Corporation Method, system, and product for improving performance of network connections
US6993613B2 (en) * 2001-09-17 2006-01-31 Intel Corporation Methods and apparatus for reducing receive interrupts via paced ingress indication
US7269663B2 (en) * 2001-09-28 2007-09-11 Intel Corporation Tagging packets with a lookup key to facilitate usage of a unified packet forwarding cache
US7219121B2 (en) * 2002-03-29 2007-05-15 Microsoft Corporation Symmetrical multiprocessing in multiprocessor systems
US7631106B2 (en) * 2002-08-15 2009-12-08 Mellanox Technologies Ltd. Prefetching of receive queue descriptors
US7240166B2 (en) * 2003-05-01 2007-07-03 International Business Machines Corporation Method and apparatus for implementing packet work area accesses and buffer sharing
US6981074B2 (en) * 2003-10-14 2005-12-27 Broadcom Corporation Descriptor-based load balancing
US7552232B2 (en) * 2003-10-24 2009-06-23 International Business Machines Corporation Speculative method and system for rapid data communications

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103946803B (zh) * 2011-10-17 2017-09-29 凯为公司 具有高效工作排队的处理器

Also Published As

Publication number Publication date
ATE379917T1 (de) 2007-12-15
KR100816938B1 (ko) 2008-03-25
EP1683321B1 (en) 2007-11-28
US20050100042A1 (en) 2005-05-12
DE602004010424D1 (de) 2008-01-10
CN1879385B (zh) 2012-03-21
KR20060116203A (ko) 2006-11-14
TW200518529A (en) 2005-06-01
EP1683321A1 (en) 2006-07-26
TWI269559B (en) 2006-12-21
DE602004010424T2 (de) 2008-11-27
WO2005050949A1 (en) 2005-06-02

Similar Documents

Publication Publication Date Title
US6658480B2 (en) Intelligent network interface system and method for accelerated protocol processing
US7472205B2 (en) Communication control apparatus which has descriptor cache controller that builds list of descriptors
US8805948B2 (en) Intelligent network interface system and method for protocol processing
US7447230B2 (en) System for protocol processing engine
CA2341211C (en) Intelligent network interface device and system for accelerating communication
CN1879385B (zh) 预取用于网络分组处理的协议控制块的方法和系统
US7126952B2 (en) Multiprotocol decapsulation/encapsulation control structure and packet protocol conversion method
US8161197B2 (en) Method and system for efficient buffer management for layer 2 (L2) through layer 5 (L5) network interface controller applications
US9367460B2 (en) Implicit I/O send on cache operations
US6742075B1 (en) Arrangement for instigating work in a channel adapter based on received address information and stored context information
US8990422B1 (en) TCP segmentation offload (TSO) using a hybrid approach of manipulating memory pointers and actual packet data
US11563830B2 (en) Method and system for processing network packets
US20060274742A1 (en) Adaptive cache for caching context and for adapting to collisions in a session lookup table
US7720930B2 (en) Systems and methods using NIC-based prefetching for host TCP context lookup
US20140160954A1 (en) Host ethernet adapter frame forwarding
CN117834570A (zh) 传输系统的数据包处理方法、装置、电子设备及存储介质

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: 20120321

Termination date: 20201029