200820009 九、發明說明: 【發明所屬之技術領域】 種貝料處理系統及其方法,特別係指一種利 =訊方式經由硬碟控制器實現雙控制器間内部通訊的其 【先前技術】 較高據資料服務上要求·完整性和服崎 Α衣見中,以區域儲存網路服務應用環境 控制器的電腦车銥缺A 4 ^ 具有售 m巾被細,雙控·的主要目的在於 控制器正在提供服務時, 田 份,於是對其作鏡像傾 1 士 ㈣產生運作異常甚至停機而無_續提供朋 矛力^,可以立即由第二控制哭接;< '、 ^ 了要能夠實現前述第_控制卿二控制器之間的交 兩個控制器之間就必須要建立起一條内部通訊管道,用^ =進订輯轉域,以確細健制_關鱗 : 悲。習知雙控制哭之門沾的版 ^之間的通訊方式,如「第M圖」所示 乙太網路介面或者專屬硬體介 h ^ 13〇 ’兩個控制器⑴〇請)中均各自轉二 核心(C〇崎㈣⑴1或⑵)、㈣制硬碟組伽^ 200820009 控制器(1H 122)及外接的乙太網卡(或專屬硬體)(113或η3) 其t控制器核心(川或训分別與硬碟控制器(112或122)及乙太 卡(或專屬硬體ΧΉ3或Ί23)輕接以執行整體控制器⑴〇或12〇) 的控制。當正在提供服務的第—控制器彳辦的控制馳心川(以 下稱主控繼核心彻ary,欲請求第二控制器 20中的控制盗核心切(以下稱從控制器核心, ,nt「o丨丨e「Core)執行某些程序時,便需要透過外接的乙太網卡(或 專屬蝴m將需要執行程序的請求發送給第二控制器㈣去執 订’洋細的運作流程步轉在之後再作說明。 此種透過乙太網路介面或者專屬硬體介面實現的雙控制器之 間的通訊方式,有下列的問題存在: =要在電腦祕上外接額外硬體,造成可用空間減少。 2.需要在電_統上外接額外硬體,增加購買硬體的成本支 a應科>1硬體進行通訊方式,僅能_送鮮的同步訊號, 亚热法提供大資料量的數據傳輸。 植性4上Ϊ1Γ硬體進行通訊方式,在適應不麵的相容性和移 因^匕,為7 了故Μ 、,、、 面實現雔* °則桃有透過乙太網路介面或者專屬硬體介 的内部梅刪,娜考如何在雙控制器 方式上提蚊_改善方案。 200820009 【發明内容】 為了改善f知透過乙太網路介面或者麵硬體介面實現雙控 制器之間通訊方式的問題,本發明提出—種基於硬碟控制器之雙 控制器通訊系統及其方法,其主要目的係希望能夠在電腦系統^ 透過权擬6太網路軌的方式’再結合彻電㈣統的控制器中 的㈣控制1,來實現電腦系統中兩控制器之間的内部通訊。 …為達上述目的,本發明所賊之基於硬碟控制器之雙控制器 通λ糸統,包括有:具有主控制雜心、網路協議層、虛擬網卡 驅動程序、硬碟控制驅動程序及硬碟控制器的第一控㈣;及具 驅 有從控制tin晴職層、虛_卡_鱗^域控制” 動程序及硬碟控制器的第二控制器。 工 •驟實現兩控制器之 第一控制器與第二控制器之間透過下列步 間的内部通訊·· 於弟-控制n執行τ列步H主控制器核心接 過網路協·生賴發送包含之乙太崎封包;執行中= 更碟控制凊求轉發給硬碟押制哭 連接方式傳缺侧《爆咖。〜過實體線路 方====2:輸㈣物體線路連接 &制益之硬碟控制請求進行轉發’ ·執行令的硬 200820009 碟=動程序接收硬碟控制請求回傳 仃中的虛擬網卡,驅動程序 τ驟序’執 求為乙太網路封包進行回傳;從==並轉換硬碟控制請 子攸&制為核心透過網路協議層對乙 太、稱封包的接收及_獲得請求域行對應程序。 本發明所能夠翻的功效在於: 幅即省對控制器空間使用,並 J大 功效。 私加可在控制器中開發其他功能的 2·透過運用控制器 幅節省購買額外硬體, 的功效。 上既有的硬碟控制器的實現技術,可達到大 如:乙太網路卡、專屬硬體...等成本支出 3.透過運糊器上既有的硬碟控·的實現技術,可達到大 幅提升内部軌傳輪效率及㈣通訊功能的功效。 4·透過模擬乙太網路通訊的實現技術,可達到高穩定 lx、相谷性及移植性佳的功效。 有關本發與實作,如合圖補最佳實施例詳細說 明如下。 【實施方式】 、本發明提出-種基於硬碟控制器之雙控制器通訊系統及其方 ,,其主要魏夠改善習知透過乙太網路介面或者制硬體^面 貫現雙控制器之間通訊方式的問題。 10 200820009 白知技街的錢示意如「第1A圖」所示,其方法 卜 =,相Γ㈣如下。在此以透似晴介面獅式‘ .二⑴w接運作中且增供服務的第一控制器110之主控制器 .U可勘转域用者所發出的指令 口 &、疋要求弟控制為彳10與第二控制器120執行同步 序“此%主控制器核心川會透過執行作業系統之軟體 ,^的财_層將輯求封包紅太鱗封㈣格式(步驟 …、'後將此乙太網路封包透過執行於軟體層中乙太網卡M3 專屬的乙太網卡驅動程序進行發送(步驟⑽),乙太網路卡驅動程 =處理後會將乙太網路封包傳送到硬體層的乙太網卡113進行實 虹傳輪的私序’將乙太網路封包傳送到所連接之第二控制器 上的乙太網卡123(步驟22〇),透過執行於第二控制器12〇賴層 上的專屬乙太網卡驅動程序接收乙太網路封包後,便轉交此乙太 肩路封包給軟體層中的網路協議層(步驟23〇),最後由第二控制哭 中的從控制器核心121自網路協議層中取回乙太網軸包= 的請求,並執行請求所對應的程序(步驟240),完成主控制器核心 川與仗控制器核心切之間透過乙太網路介面進行通訊的過 知。另外,制硬體實現雙控制H之間通軸流程也與此大 致=同。因此’可以發現任何轉透過乙太網路介面或者專屬硬 體』ι面只現雙控制益之間通訊的習知技術内容都必須要額夕卜安芽 硬體設備’如:乙太網路卡、專屬硬體裝置…,將造成成本和空 11 200820009 實現時更容易產生傳輸效 間上的浪費,並且使用專屬硬體介面 率、私植性、相谷性不佳的問題。 …、而我們也可以注意到在前面所提到「第ιΑ圖」 制器彻和第二控制器120上都存在有各自的硬碟控卿以 122),在電腦中,硬碟控制器⑴2及122 (110及120)中的控制器核心⑴ ^ ⑴1及121)連接,在控制器核心⑴] 及12D的控制下負責控管電腦系統1〇〇中的硬碟組伽,而硬碟 組幾乎在所有制環境下的電m 都是必要不可少的硬體 之-,換句話說,硬碟控制器⑴2及122)也已經成為現今電腦= 統100運作上必備的硬體部分。200820009 IX. Description of the invention: [Technical field to which the invention pertains] The beak material processing system and method thereof, in particular, a prior art technique for realizing internal communication between dual controllers via a hard disk controller. According to the requirements of the data service, the integrity and service of the clothing, see the computer storage environment controller for the regional storage network service, the lack of A 4 ^ has the sale of m towel is fine, dual control · the main purpose is that the controller is When providing the service, Tianfen, then mirrored it for 1 (4), causing abnormal operation or even stopping the machine without _ continuation of providing a spear force ^, can immediately be crying by the second control; < ', ^ to be able to achieve the foregoing _ Controlling the two controllers between the two controllers must establish an internal communication pipeline, use ^ = to enter the order transfer domain to ensure the fine system _ Guan scale: sad. The communication method between the version of the control system that controls the crying door is as shown in the "Mth picture", the Ethernet interface or the exclusive hardware device, the ^^ 13〇' two controllers (1) Each of the two cores (C〇崎(四)(1)1 or (2)), (4) hard disk group gamma ^ 200820009 controller (1H 122) and external Ethernet card (or proprietary hardware) (113 or η3) its t controller core ( Chuan or training is connected to the hard disk controller (112 or 122) and the Ethernet card (or dedicated hardware ΧΉ3 or Ί23) to perform the control of the overall controller (1) 〇 or 12 〇). When the first controller of the service is providing control, Chi Xinchuan (hereinafter referred to as the master control core core ary, wants to request the control thief core in the second controller 20 (hereinafter referred to as the controller core, nt" o丨丨e "Core" When you execute certain programs, you need to send an external Ethernet card (or a dedicated butterfly to send a request to execute the program to the second controller (4) to perform the process of the foreign fine. This will be explained later. The following communication problems exist between the two controllers implemented through the Ethernet interface or the dedicated hardware interface: = To add extra hardware to the computer, resulting in free space. Reduced. 2. Need to add extra hardware on the electricity system, increase the cost of purchasing hardware. A should use the hardware to communicate with each other. Only the synchronous signal can be sent, and the thermal method provides a large amount of data. The data transmission. Planting 4 upper Ϊ 1 Γ hardware communication mode, in adapt to the lack of compatibility and migration, 7 为 为 为 为 ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° 桃 桃 桃 桃 桃 桃Road interface or exclusive hardware introduction of internal Mei, Nakao How to raise mosquitoes in a dual controller mode _ improved scheme. 200820009 [Summary of the Invention] In order to improve the problem of communication between dual controllers through an Ethernet interface or a surface hard interface, the present invention proposes a hard-based The dual controller communication system and method of the disc controller, the main purpose of which is to realize the (four) control 1 in the controller of the computer system ^ by means of the right 6 network track Internal communication between two controllers in a computer system. ... For the above purpose, the dual controller of the thief based on the hard disk controller of the present invention includes: a main control miscellaneous, a network protocol layer , virtual network card driver, hard disk control driver and hard disk controller first control (four); and drive from the control tin clear layer, virtual _ card _ scale domain control program and hard disk controller The second controller realizes the internal communication between the first controller and the second controller of the two controllers through the following steps: · The younger-control n executes the τ column step H the main controller core receives the network Road Association Send the included Etasaki packet; Execution = More disc control request to forward to the hard disk, the crying connection method is passed on the side of the pass. "Broken coffee. ~ Over the physical line side ====2: Loss (four) Object line connection & The hard disk control request of the benefit is forwarded' · The hard disk of the implementation of the 200820009 disk = the program receives the virtual network card in the hard disk control request backhaul, the driver τ is in the order of 'requesting the Ethernet packet for backhaul From the == and convert the hard disk control, the sub-control system is the core through the network protocol layer to the Ethernet, the receiving of the packet and the _ obtaining request domain row corresponding program. The effect of the invention can be: The province uses the controller space and has a great effect. Privately can develop other functions in the controller. 2. Save the purchase of additional hardware by using the controller. The implementation technology of the existing hard disk controller can reach the cost of the Ethernet card, the dedicated hardware, etc. 3. The implementation technology of the existing hard disk control on the paste processor. It can achieve the effect of greatly improving the internal rail transmission efficiency and (4) communication function. 4. Through the implementation technology of analog Ethernet communication, it can achieve high stability lx, phase contrast and good portability. The details of the preferred embodiment of the present invention and the implementation of the present invention are as follows. [Embodiment] The present invention proposes a dual-controller communication system based on a hard disk controller and a method thereof, and the main Wei can improve the conventional dual-controller through the Ethernet interface or the hardware The problem of communication between the ways. 10 200820009 The money of Baizhiji Street is shown as "Figure 1A", and its method is =, relative (4) is as follows. Here, the main controller of the first controller 110, which is operated by the transparent device lion type '.2(1)w, is added to the service and the service controller of the first controller 110 can be used to control the command port & For the 彳10 and the second controller 120 to perform the synchronization sequence "This % of the main controller core will be executed through the software of the operating system, ^ _ _ layer will be compiled into a packet of red too scale (four) format (step ..., 'after The Ethernet packet is sent through the Ethernet card driver running in the software layer of the Ethernet card M3 (step (10)), and the Ethernet card driver = the Ethernet packet is sent to the hard after processing. The physical layer Ethernet card 113 performs the private sequence of the real rainbow transmission 'transmits the Ethernet packet to the Ethernet network card 123 on the connected second controller (step 22〇), and executes through the second controller 12 After receiving the Ethernet packet, the dedicated Ethernet card driver on the backup layer forwards the packet to the network protocol layer in the software layer (step 23〇), and finally the second control is crying. Retrieving the request of the Ethernet Tether Packet = from the controller core 121 from the network protocol layer, Executing the program corresponding to the request (step 240), completing the communication between the main controller core and the core controller of the controller through the Ethernet interface. In addition, the hardware implements the parallel control between the two controls H. The process is also roughly the same as this. Therefore, it can be found that any conventional technical content that is transmitted through the Ethernet interface or the dedicated hardware, and only the communication between the two control interests must be used for the electronic device. Such as: Ethernet card, dedicated hardware device..., will cause cost and space 11 200820009 is more likely to waste transmission efficiency, and use proprietary hardware interface rate, private plantability, poor phase contrast The problem. ..., and we can also notice that in the above mentioned "the first map" and the second controller 120 have their own hard disk control (122), in the computer, hard drive The controller cores (1) ^ (1) 1 and 121) in the controllers (1) 2 and 122 (110 and 120) are connected to control the hard disk group in the computer system under the control of the controller cores (1) and 12D. Hard disk group almost in the system of electricity m It is an indispensable hardware - in other words, the hard disk controllers (1) 2 and 122) have become the necessary hardware parts for the operation of today's computers.
因此’本發明主要就是利用原本控制器⑴0及伽)來實現電 腦系統100中兩個控制器之間的職,當然原本硬碟控制器^ 及122)所具有控管硬碟組13〇的功能基本上維持不變,請參考「第 2圖」的部分。由圖中可明顯看出’實施本發明基於硬碟控制器之 雙控制器通訊純的電_,統科需要為了實現 : 額外加裝其他的硬體,以前述的例子來說,乙太網卡(或專屬硬 體)(113及123)便可以自控制器⑴〇及12〇)上移除,所騰出的空 間未來便可提供在控·⑽及12Q)上增加其他更多功能實現^ 可能性。 只^ 所述代表性之硬碟控制器(112及122)可以係為序列依附小型 電腦系統介面控制器(Seriei-Attached SCSI Controller),如· LS| 12 200820009 型號1068E的硬碟控制器。此種硬碟控制器同時提供發起端 (Initiator Mode)及響應端模式(丁arget M〇de)進行運作因此可^ 之間可以透 供本畚明所需的雙向通訊支援,並且兩個硬碟控制哭 過實體連線進行相連。 有關本發明硬體及軟體詳細的交互運作 意’請同時參考「第3圖」及「第4圖」,在整個描二 奴第-控· 為正在運作且提供服務的控制器,而第二控 制器120為電腦系統中的另一個控制器,作為第—控制器训 之_控制器(事實上兩個控制器彼此之間可以互為對方的備用控 制器),整個過程係以第一控制器彳彳〇向第二控制器彳2〇提出請求 要求執订對應程序的描述為主(即第_控制器則為發起端,第二 控制器為響應端120)。首先,在「第3圖」的部分先交代本㈣ 運作上涉及硬體與軟體,其中硬體層部分包括在第—控制器彻 上的主控制器核心111及硬碟控制器112,以及在第二控制器12〇 ^的^控制器核心121及硬碟控制器122 ;軟體層的部分包括分 别於弟-控制器11C)與第二控制器上的網路協議層训、虛擬網 卡驅動程序302以及硬碟控制驅動程序3Q:^整個運作可分為發 起端(第-控制器11〇)執行以及響應端(第二控制器12〇)執行的部 分: (1)第一控制器110部分: 首先,如同習知技術般當主控制器核心川接收到來自電腦 13 200820009 1=;:::=:的指令(即請求)時,透過_錢層 .順利被硬碟控制器了使 .Γ= 行格式轉換的處理,此為本案與習知撕 皿接:礙大不同處,透過執行中的虛擬網卡驅動程序 接收_路封包’並乙太纟輸 硬碟控制請求進行笋牛鞞π 负知貝貝汛之 '忘w ^ 辦驟31Q)。因此,必須在虛擬網卡驅動程 3: :3。2執行轉換及發送的•中,虛擬心 據乙太網路封包喻大小來決定需要填人硬碟控制 頭貧訊中的内容,·產生好標頭資訊之後再將原本的乙太 網路封包龜繼物㈣術,帛 :卡驅動程序302所發送的硬碟_求,會_行㈣2 =3傳?硬赌㈣112透過實體線路連財式將硬碟 她侧咖122巾(步糊), 由於係透過硬碟控繼(112及122)之間實體連線的直 通訊,姉於料翻乙太網齡喊者朝顿介的通 訊方式來說,本發明的傳輸速率將可大過習知技術許多。、以序^ 依附小型議統介面控制器(Sen•私版_ scs^⑽「〇㈣ 14 200820009 ,例’其傳輪速率為3Gbps,而乙太網路介面可提供的傳輸速率 最大為1Gbps。 (2)第二控制器120部分: 當㈣控制器122透過實體線路連接方式接收來自第一控制 為110之㈣控制t青求時會進行轉發動作(步驟350),使第二控制 器120執行中辦更碟控制驅動程序3〇3可以接收硬碟㈣請求並 回餘虛擬網卡驅動程序3Q2中(步驟),紐為了使硬碟㈣ 請烟蝴路協議層3〇1順利接收,因此必須透過虛擬網卡驅 動私序302接收硬碟控制請求,並將硬碟控制請求還原成為乙 網路封包後再進行_步驟37Q),最後的運作與f知技術相同, 由第二控制器120中的從控制器核心121便可經由網路協議層 301對乙太網路封包進行接收及還原,以獲得請求並供從控制器 核121可執仃對應程序,至此完成整個發起端(第一控制器1Therefore, the present invention mainly utilizes the original controller (1) 0 and gamma to realize the functions between the two controllers in the computer system 100. Of course, the original hard disk controllers ^ and 122) have the functions of controlling the hard disk group 13〇. Basically, please keep in mind, please refer to the section on "Figure 2." It can be clearly seen from the figure that 'the implementation of the dual controller communication based on the hard disk controller of the present invention is pure _, and the department needs to implement: additional hardware is added, in the foregoing example, the Ethernet card (or exclusive hardware) (113 and 123) can be removed from the controller (1) 〇 and 12 〇), and the space vacated in the future can be added to control (10) and 12Q) to add other functions. possibility. Only the representative hard disk controllers (112 and 122) can be serially attached to a small computer system controller (Seriei-Attached SCSI Controller), such as the LS| 12 200820009 model 1068E hard disk controller. The hard disk controller provides both the Initiator Mode and the Responder mode (Ding arget M〇de) to operate, so that the two-way communication support required by the present invention can be provided, and two hard disks are provided. Control the crying of physical connections to connect. Regarding the detailed interactive operation of the hardware and software of the present invention, please refer to "3rd picture" and "4th picture" at the same time, and in the whole description, the second slave-control is a controller that is in operation and provides service, and the second The controller 120 is another controller in the computer system, as the first controller controller (in fact, the two controllers can be each other's standby controllers), the whole process is controlled by the first The device sends a request to the second controller to request that the description of the corresponding program is dominant (ie, the first controller is the initiator and the second controller is the response terminal 120). First of all, in the "Figure 3" section, the first part of this (4) operation involves hardware and software, wherein the hardware layer part includes the main controller core 111 and the hard disk controller 112 on the first controller, and The controller core 121 and the hard disk controller 122 of the second controller 12; the software layer portion includes the network protocol layer training and the virtual network card driver 302 on the second controller and the second controller respectively. And the hard disk control driver 3Q: ^ The entire operation can be divided into an execution end (the - controller 11 〇) execution and a response end (second controller 12 〇) execution: (1) the first controller 110 part: First, as the conventional technology, when the main controller core receives an instruction (ie, a request) from the computer 13 200820009 1=;:::=:, it is successfully passed by the hard disk controller. = Line format conversion processing, this is the case and the conventional tear-off: the big difference, through the implementation of the virtual network card driver to receive the _ road packet 'and the Ethernet hard drive control request to carry out the 鞞 鞞 negative Know the Beibei's 'forget w ^ to do 31Q). Therefore, in the virtual network card driver 3: : 3. 2 to perform the conversion and transmission of the • virtual heart according to the size of the Ethernet packet to determine the need to fill in the content of the hard disk control head poor news, After the header information, the original Ethernet packet is also included (four), 帛: the hard disk sent by the card driver 302 _ seeking, will _ line (four) 2 = 3 pass? Hard gambling (4) 112 through the physical line and even the financial type of the hard disk, her side of the side of the 122 towel (step paste), due to the direct communication between the hard disk control (112 and 122) physical connection, 姊 料 乙 乙 乙 乙The transmission rate of the present invention can be much greater than that of the prior art. In order to attach to the small-scale interface controller (Sen private version _ scs^ (10) "〇 (4) 14 200820009, for example, its transmission rate is 3Gbps, and the Ethernet interface can provide a transmission rate of up to 1Gbps. (2) The second controller 120 part: when the (four) controller 122 receives the (four) control from the first control 110 through the physical line connection mode, the forwarding operation is performed (step 350), so that the second controller 120 performs The medium-sized disc control driver 3〇3 can receive the hard disk (4) request and return to the virtual network card driver 3Q2 (step), in order to make the hard disk (4) please smoothly receive the protocol layer 3〇1, so it must pass The virtual network card driver private sequence 302 receives the hard disk control request, and restores the hard disk control request to the network packet, and then performs _step 37Q). The final operation is the same as the f-known technology, and the slave controller 12 The controller core 121 can receive and restore the Ethernet packet via the network protocol layer 301 to obtain a request and can execute the corresponding program from the controller core 121, thereby completing the entire initiator (the first controller 1)
與響應端(第二控制器12〇)間基於硬碟控制器⑴2及 的通訊流程。 Μ Λ ,本u取主要技術内容在於透過兩控彻(彻及1 2q)中網路 協議層301、虛擬網卡驅動程序3〇2及硬碟控制驅動程序咖三 者在权體射X互運作以實現基於硬碟控制器⑴2及從)之模 乙太,罔路U機制’杯考「第4圖」,圖中顯示網路協議層、 虛擬網卡鶴程序3Q2狄碟控制驅動程序網I者的交互 關係,其中特別需要翻的是虛擬網卡驅動程序3〇2錢碟控制 15 200820009 驅動程序303的部分。 虛擬網卡驅動程序3Q2具有如下的細部方塊以狀進行乙太 網路封包/硬碟控制請求的轉換: 木⑻乙太網路介面核組3〇21,負責與網路協議層如通訊, 田位於第才空制為11〇端時,負責接收來自網路協議層期之乙 太網路封包;或當位於第二控制器12〇端時,則負責接收來自請 求類型轉換 3Q22之㈣請求4〇〇。 (b)請求類型轉換模組觀,#位於第—控制器彳扣端接收乙 太網路介面模組3021之乙太網路封包進行轉換成為硬碟控制請 求400進行發送給資料發送模組3〇23;或當位於第二控制哭彻 端接收資料接收模組3024之硬碟控制請求·轉換成為;;太網 路封包發給乙太網路介面模組3〇21。 乂其中將乙太網路封包轉換為硬碟控制請求4〇〇的部分,主要 係透過判斷乙太網路封包的大小來決定所要生成之硬碟控制請求 400的標頭資訊41〇,然後將乙太網路封包直接封包到包含此標頭 資訊410之硬碟㈣請求中,然後發給#料發送模組3〇2^。、 其中將硬碟控制請求400轉換成為乙太網路封包的部分,則 主要係透過解析硬碟控制請求4〇〇中的標頭資訊,來還原找 出原始的乙太網路封包。 有關硬碟控制請求400,係為資料結構的部分,請參考「第5 圖」’主要分為標頭資訊41G以及乙太網路封包兩個部分,其 16 200820009 中標頭資訊410又可更細分包含識別攔位4〇1(通常長度為8個字 節)、起始獅402(通f長度為4個碎)、域嫌樹(通常長 度為4個字節)及預備攔位4〇4(通常長度視乙太網路封包4〇5長度 而動態決幻。其中,識別攔位仙記錄用於作為識別硬碟控制請 求400是否需要處理或者丢棄的内容;起始攔位4〇2用以記錄乙 太網路封包405於整個硬碟控制請求彻中的起始位置;長度搁 位403用以記錄整個硬碟控制請求的實際大小(通常為512 字節的整數倍數纖欄位404用以作為填補整個硬碟控制請求 400長度大小不足的部分(通常以“〇,,進行填補),至於硬碟控制 請求400長度大小的規範則會因為所採用的指令格式不同而有所 差兴。乙太網路封包405部分則直接封包在標頭資訊4扣之後, 如圖所示。 在「第5圖」的實施例當中,硬碟控制請求4〇〇係為小型電 腦系統介面(Small Computer Systems Interface, SCSI)指令格 式,係透過直接記憶存取(Direct Memory Access, DMA)方式進行 發送的,此實施例中識別攔位401的内容為“VIRTUAL,,因此當 硬碟控制驅動程序303中的發起端介面模組3031接到此硬碟控 制請求400時,便可透過字串比對方式決定是否繼續處理或者直 接丟棄硬碟控制請求400。 我們假設標頭資訊410中的識別欄位401為8個字節長,起 始攔位402為4個字節長,長度欄位403為4個字節長,則當乙 17 200820009 太網路封包.的長縣“345”字料齡度她·中的值 為345)。由於剛面提到’硬碟控制請求_長度大小會因為所採 用的指令格式不同而有所差異,因此假設我們採取 WRITE一 1〇 scs丨的指令格式時,所要求的硬碟控制請求長度大小應為 512字節長,而此時所需的預備攔位4〇4具有的長度則為151個 字節長(因此預備欄位404中的值應該為151個填補的“〇,,),其 長度的算法為:512*((345+16_1)/512+1)_(345+16),故整個乙太 網路封包405於硬碟控制請求·中的起始位置應紋術,其 為識別欄位401、起始欄位他、長度棚位以及乙太網路封 包405的長度總和,即:(16+151),所以起始攔位4Q2中的值應 該為Ί67”。 ⑹資料發送模組3023,用以於第—控制器彳1 〇端接收請求類 型轉換模組3022發送之硬碟㈣請求·,並基於發起端模式 (Initiator Mode)轉發給«控制驅動程序3〇3之發起端介面模組 3031 〇 (d)貧料接收模組3024,用以於第二控制器120端基於響應 端模式(Target Mode)接收硬碟控制驅動程序3〇3之響應端介面模 組3032發送之硬碟控制請求4〇〇,轉發給請求類型轉換模組 3022。 硬碟控制驅動程序303則係設計有對應於資料發送模組3Q23 的發起端介面模組3031,可基於發起端模式(丨nitjat0「M〇d句接收 18 200820009 由「第3圖」亦可知’兩個控制器⑽及120)中控制器核心 (及121),.罔路協議層3〇1、虛擬網卡驅動程序、硬碟控制 驅動程序303與硬碟控制_2及122)之間的通訊係可雙向白工卜 也就是說當兩控制器⑽及12_角色互換時,亦即第一控制器 彻成為魏糾第二控彻絲魏稱(㈣馳Μ色亦對 調),亦可透朗樣的方式來實現通訊。 透過本發明’確實可_大轉省空_目的,並增加可在 控制器中開發其他魏的可祕,同時_大_省顧額外硬 體的功效。糾,透财發明也可大幅提升㈣通赠輸效率及 内部通訊魏,再力吐模擬乙太鱗通關實現技術,更可產生 面穩定、㈣發、相容性及移植性佳的功效。 雖然本發明以前述之較佳實施例揭露如上,然其並非甩以限 定本=明,任何熟習相像技藝者,在不脫離本發明之精神和範圍 田可作些許之更動與潤飾,因此本發明之專利保護範圍須視 本說明書所社冑請專利翻所界定者為準。 【圖式簡單說明】 。。弟1Α圖係習知透過乙太網路介面(或專屬硬體介面)進行雙控 制态通訊之系統示意圖。 19 200820009 第1B 流程圖。 圖係習知透過乙太網路介面進行雙控制哭 通訊之方法 第2圖係本發明系統示意圖。 第3圖係本發明硬體層/軟體層運作方塊示意及運作流程圖 第4圖係本發明軟體層細部運作方塊示意及運作流程圖。 第5圖係本發明硬碟控制請求資料結構及實施例示意圖。 【主要元件符號說明】 100 電腦系統 110 第一控制器 111 主控制器核心 112 硬碟控制器 113 乙太網卡(或專屬硬體) 120 弟二控制器 121 從控制器核心 122 硬碟控制器 123 乙太網卡(或專屬硬體) 130 硬碟組 301 網路協議層 302 虛擬網卡驅動程序 3021 乙太網路介面模組 3022 請求類型轉換模組 20 200820009 3023 資料發送模組 3024 資料接收模組 303 硬碟控制驅動程序 3031 發起端介面模組 3032 響應端介面模組 400 硬碟控制請求 401 識別欄位 402 起始欄位 403 長度欄位 404 預備欄位 405 乙太網路封包 410 標頭資訊 21The communication process based on the hard disk controller (1) 2 and the response terminal (the second controller 12A). Μ Λ, the main technical content of this u is to use the two network control layer 301, the virtual network card driver 3〇2 and the hard disk control driver in the two control (completely 1 2q) In order to realize the hard disk controller (1) 2 and from the mode of the Ethernet, the U road mechanism "cup test" 4th picture, the figure shows the network protocol layer, virtual network card crane program 3Q2 disc control driver network I The interactive relationship, which is particularly needed to turn over is the virtual NIC driver 3〇2 Money Disc Control 15 200820009 Driver 303 part. The virtual network card driver 3Q2 has the following detailed blocks for the conversion of the Ethernet packet/hard disk control request: Wood (8) Ethernet interface core group 3〇21, responsible for communication with the network protocol layer, When the first system is 11 ,, it is responsible for receiving the Ethernet packet from the network protocol layer; or when it is located at the second controller 12, it is responsible for receiving the (4) request from the request type conversion 3Q22. Hey. (b) request type conversion module view, #located at the first controller to receive the Ethernet packet of the Ethernet interface module 3021 for conversion to become the hard disk control request 400 for transmission to the data transmission module 3 〇23; or when the second control is in the middle of receiving the data receiving module 3024, the hard disk control request is converted into; the Ethernet packet is sent to the Ethernet interface module 3〇21. The part that converts the Ethernet packet into a hard disk control request is mainly determined by determining the size of the Ethernet packet to determine the header information 41 of the hard disk control request 400 to be generated, and then The Ethernet packet is directly encapsulated into the hard disk (4) request containing the header information 410, and then sent to the #material sending module 3〇2^. The conversion of the hard disk control request 400 into the portion of the Ethernet packet is mainly to restore the original Ethernet packet by parsing the header information in the hard disk control request. For the hard disk control request 400, which is part of the data structure, please refer to "5th figure", which is mainly divided into two parts: header information 41G and Ethernet packet. The header information 410 of 16 200820009 can be further subdivided. Contains identification block 4〇1 (usually 8 bytes in length), starting lion 402 (with a length of 4 broken lines), domain suspect tree (usually 4 bytes long), and preliminary block 4〇4 (Normally, the length is dynamically determined depending on the length of the Ethernet packet 4〇5. Among them, the identification of the interception record is used as a content for identifying whether the hard disk control request 400 needs to be processed or discarded; the initial block 4〇2 Used to record the starting position of the entire Ethernet control packet 405 in the entire hard disk control request; the length shelf 403 is used to record the actual size of the entire hard disk control request (usually an integer multiple of 512 bytes of the field 404) Used as a part of filling the entire hard disk control request 400 with insufficient length (usually "filled"), as for the specification of the length of the hard disk control request 400, it will be different due to the different instruction formats used. The 405 part of the Ethernet packet After the packet is marked with the button information, as shown in the figure, in the embodiment of "figure 5", the hard disk control request 4 is a Small Computer Systems Interface (SCSI) command format. The content is transmitted through the direct memory access (DMA) mode. In this embodiment, the content of the identification block 401 is “VIRTUAL,” so that the initiator interface module 3031 in the hard disk control driver 303 is connected. At this time, the hard disk control request 400 can determine whether to continue processing or directly discard the hard disk control request 400 through the string comparison mode. We assume that the identification field 401 in the header information 410 is 8 bytes long. The initial block 402 is 4 bytes long, and the length field 403 is 4 bytes long. When the B 17 200820009 is too network packet, the Chang County "345" word age is 345). Since the hard disk mentioned 'hard disk control request _ length size will vary depending on the format of the instruction used, it is assumed that the length of the hard disk control request is required when we adopt the WRITE-1〇scs丨 instruction format. Size should be The length of 512 bytes is long, and the required reserved position 4〇4 at this time has a length of 151 bytes long (so the value in the preliminary field 404 should be 151 filled "〇,,), the length thereof. The algorithm is: 512*((345+16_1)/512+1)_(345+16), so the entire Ethernet packet 405 should be in the beginning position of the hard disk control request. The sum of the length of field 401, the starting field, the length of the booth, and the Ethernet packet 405, namely: (16 + 151), so the value in the starting block 4Q2 should be Ί 67". (6) The data sending module 3023 is configured to receive the hard disk (four) request sent by the request type conversion module 3022 at the first controller 彳1 terminal, and forward it to the control driver 3 based on the initiator mode (Initiator Mode). The initiator interface module 3031 of the 3 is configured to receive the response mode interface module of the hard disk control driver 3〇3 based on the response mode (Target Mode) at the second controller 120 end. The hard disk control request sent by the group 3032 is forwarded to the request type conversion module 3022. The hard disk control driver 303 is designed with an originating interface module 3031 corresponding to the data sending module 3Q23, and can be based on the originating mode (丨nitjat0 "M〇d sentence receiving 18 200820009 is also known by "3rd picture") Communication between the controller core (and 121), the routing protocol layer 3, the virtual network card driver, the hard disk control driver 303, and the hard disk control_2 and 122) of the two controllers (10) and 120) It can be a two-way white work, that is to say, when the two controllers (10) and 12_ roles are interchanged, that is, the first controller becomes the second control of the Weishen Wei (the (four) gallop color is also adjusted), but also A way to achieve communication. Through the present invention, it is indeed possible to make a large-scale emptiness, and to increase the secret of other Weis that can be developed in the controller, while at the same time _ large_saving the effect of additional hardware. Correction, and wealth-saving inventions can also be greatly improved (4) through the transmission efficiency and internal communication Wei, and then force the simulation of the implementation of the technology of the Tai Tai scale, and can also produce surface stability, (four) hair, compatibility and good transplantability. While the present invention has been described above in terms of the preferred embodiments thereof, the present invention is not limited thereto, and the skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. The scope of patent protection shall be subject to the definition of the patent in this specification. [Simple description of the diagram]. . The Brother 1 is a schematic diagram of a system for dual-control communication via an Ethernet interface (or a dedicated hardware interface). 19 200820009 1B Flowchart. Figure 2 shows a method for dual control of crying communication through an Ethernet interface. Fig. 2 is a schematic diagram of the system of the present invention. Figure 3 is a block diagram showing the operation of the hard layer/soft layer of the present invention and a flow chart of the operation. Fig. 4 is a flow chart showing the operation of the soft layer of the present invention. Figure 5 is a schematic diagram showing the structure and embodiment of the hard disk control request data of the present invention. [Main component symbol description] 100 computer system 110 first controller 111 main controller core 112 hard disk controller 113 Ethernet network card (or dedicated hardware) 120 second controller 121 slave controller core 122 hard disk controller 123 Ethernet network card (or proprietary hardware) 130 hard disk group 301 network protocol layer 302 virtual network card driver 3021 Ethernet interface module 3022 request type conversion module 20 200820009 3023 data transmission module 3024 data receiving module 303 Hard Disk Control Driver 3031 Initiator Interface Module 3032 Response Interface Module 400 Hard Disk Control Request 401 Identification Field 402 Start Field 403 Length Field 404 Pre-Field 405 Ethernet Packet 410 Header Information 21