KR100287910B1 - Board-to-board communication method of switching device - Google Patents

Board-to-board communication method of switching device Download PDF

Info

Publication number
KR100287910B1
KR100287910B1 KR1019980061822A KR19980061822A KR100287910B1 KR 100287910 B1 KR100287910 B1 KR 100287910B1 KR 1019980061822 A KR1019980061822 A KR 1019980061822A KR 19980061822 A KR19980061822 A KR 19980061822A KR 100287910 B1 KR100287910 B1 KR 100287910B1
Authority
KR
South Korea
Prior art keywords
ipc
function
event
packet
board
Prior art date
Application number
KR1019980061822A
Other languages
Korean (ko)
Other versions
KR20000045264A (en
Inventor
박성욱
Original Assignee
서평원
엘지정보통신주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 서평원, 엘지정보통신주식회사 filed Critical 서평원
Priority to KR1019980061822A priority Critical patent/KR100287910B1/en
Publication of KR20000045264A publication Critical patent/KR20000045264A/en
Application granted granted Critical
Publication of KR100287910B1 publication Critical patent/KR100287910B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/104Asynchronous transfer mode [ATM] switching fabrics
    • H04L49/105ATM switching elements

Abstract

본 발명은 메인보드에서 서브보드를 제어할 경우 패킷을 안전하게 제어하고, 패킷 손실이 발생하지 않도록 원하는 서브보드로 전송하며, 서브보드로부터 응답이 없는 경우에는 상위 응용 프로그램(application)에게 이를 알려 줄 수 있는 스위칭 장치의 보드간의 통신방법에 관한것이다. 이와 같은 본 발명의 스위칭 장치의 보드간의 통신방법에 따르면, 인터 프로세서 커뮤니케이션(IPC) 함수를 초기화시키는 단계와, 지정하는 슬롯으로 IPC를 보내기 위한 명령을 실행하고, 이벤트 메시지를 대기하는 단계와, IPC 수신 큐에 메시지가 들어오면 큐에서 패킷을 꺼내서 상기 IPC 함수를 호출하는 단계와, 상기 IPC 전송 타스크는 상기 IPC 함수의 결과값에 따라 기억된 타스크 식별자에게 이벤트를 송신하고, 다시 이벤트를 대기하는 상태로 되돌아가는 단계로 이루어진다.According to the present invention, when the subboard is controlled by the main board, the packet is safely controlled, the packet is transmitted to a desired subboard so that packet loss does not occur, and when there is no response from the subboard, the upper application can be notified of this. It relates to a communication method between boards of a switching device. According to such a board-to-board communication method of the switching device of the present invention, the steps of initializing an interprocessor communication (IPC) function, executing a command for sending an IPC to a designated slot, waiting for an event message, and When a message is received in the reception queue, removing the packet from the queue and calling the IPC function, and the IPC transmission task sends an event to the stored task identifier according to the result of the IPC function, and waits for the event again. Return to step is made.

Description

스위칭 장치의 보드간 통신방법Board-to-board communication method of switching device

본 발명은 스위칭 장치의 보드간의 통신방법에 관한 것으로, 특히 종래의 방법을 개선하여 신뢰성을 높일 수 있는 스위칭 장치의 보드간의 통신방법에 관한것이다.The present invention relates to a board-to-board communication method of a switching device, and more particularly to a board-to-board communication method of the switching device that can improve the reliability by improving the conventional method.

일반적으로 스위칭 장치의 백플레인은 이더넷(Ethernet)과 같은 특정 네트웍크로 구현되어 있으며, 이 경로를 통하여 메인보드가 각 서브보드들을 제어하며, 보드간 통신을 수행한다. 그러나, 메인보드가 각 서브보드를 제어할 경우 종래의 기술에는 그 신뢰성에 한계가 있었다.In general, the backplane of a switching device is implemented with a specific network such as Ethernet, and the main board controls each subboard and performs board-to-board communication through this path. However, when the main board controls each subboard, the conventional technology has its limitations in reliability.

본 발명의 목적은 이와 같은 종래 기술을 개선하기 위하여 안출한 것으로서, 메인보드에서 서브보드를 제어할 경우 패킷을 안전하게 제어하고, 패킷 손실이 발생하지 않도록 원하는 서브보드로 전송하며, 서브보드로부터 응답이 없는 경우에는 상위 응용 프로그램(application)에게 이를 알려 줄 수 있는 스위칭 장치의 보드간의 통신방법에 제공하기 위한 것이다.An object of the present invention is to devise to improve such a prior art, when controlling the subboard from the main board, the packet is safely controlled, the packet is transmitted to the desired subboard so that no packet loss occurs, and the response from the subboard is If not, it is to provide a communication method between the board of the switching device that can inform the upper application (application).

본 발명의 다른 목적은 상위 응용 프로그램(application)으로의 편의성 제공을 위하여, 상위 응용 프로그램(application)은 통신하고자 원하는 상대방 보드의 슬롯 식별자(slot ID)만으로 통신 가능하게 하는 스위칭 장치의 보드간의 통신방법을 제공하기 위한 것이다.Another object of the present invention is to provide a convenience to the upper application (application), the upper application (application) is a communication method between the boards of the switching device to enable the communication only by the slot ID (slot ID) of the other board desired to communicate It is to provide.

이와 같은 목적을 달성하기 위한 본 발명의 일 특징에 따르면, 스위칭 장치의 보드간의 통신방법이 인터 프로세서 커뮤니케이션(IPC) 함수를 초기화시키는 단계와, 지정하는 슬롯으로 IPC를 보내기 위한 명령을 실행하고, 이벤트 메시지를 대기하는 단계와, IPC 수신 큐에 메시지가 들어오면 큐에서 패킷을 꺼내서 상기 IPC 함수를 호출하는 단계와, 상기 IPC 전송 타스크는 상기 IPC 함수의 결과값에 따라 기억된 타스크 식별자에게 이벤트를 송신하고, 다시 이벤트를 대기하는 상태로 되돌아가는 단계로 이루어진다.According to an aspect of the present invention for achieving the above object, the communication method between the board of the switching device, the step of initializing the inter-processor communication (IPC) function, executing the command to send the IPC to the designated slot, the event Waiting for a message, fetching a packet from the queue when the message comes in an IPC reception queue, calling the IPC function, and the IPC transmission task sends an event to a stored task identifier according to the result of the IPC function. And returning to the state of waiting for an event again.

본 발명의 다른 특징에 따르면, 스위칭 장치의 보드간 통신방법이 IPC 수신 타스크가 이벤트 메시지를 대기하는 단계와, 상기 IPC 수신 타스크가 이벤트 메시지를 수신하는 경우, IPC 수신 큐에서 상기 메시지를 읽고, 상기 메시지의 도착 시간을 갱신하는 단계와, 상기 메시지를 처리하는 명령 형식의 종류를 판단하여 판단 결과에 따라 상기 IPC 전송 타스크에게 EV_IPC_SUCCESS 신호를 보내고 다시 대기 상태로 돌아가거나, ACK 패킷을 전송하고, 패킷에 저장되어 있는 명령 종류와 명령 번호를 인식하여, 해당하는 IPC 시그널 하우스에 타스크 식별자와 이벤트가 등록되어 있는지를 판단하는 단계와, 상기 등록 판단단계의 결과에 따라 상기 수신 타스크에 이벤트를 보내거나, 상기 시그널 하우스에 함수가 등록되어 있는지를 판단하여 함수가 등록되어 있다면 그 함수를 호출하고 호출을 완료하면 다시 초기 대기 상태로 돌아가는 단계로 이루어진다.According to another aspect of the present invention, a method for board-to-board communication of a switching device includes the steps of waiting for an event message by an IPC receiving task and reading the message from an IPC receiving queue when the IPC receiving task receives an event message. Updating the arrival time of the message; determining the type of command format for processing the message; according to the determination result, sending an EV_IPC_SUCCESS signal to the IPC transmission task and returning to a standby state, or transmitting an ACK packet to the packet. Recognizing a stored command type and a command number, determining whether a task identifier and an event are registered in a corresponding IPC signal house, and sending an event to the receiving task according to a result of the registration determining step, If the function is registered by determining whether the function is registered in the signal house It calls the function and when the call completes, it goes back to the initial wait state.

도 1a 내지 도 1e는 본 발명에 따른 패킷 및 이에 따른 여러 필드의 형식을 보인 도면.1A-1E illustrate the format of a packet and its various fields according to the present invention.

도 2 내지 도 3은 본 발명에 따른 스위칭 장치의 송신 타스크의 동작을 설명하기 위한 흐름도.2 to 3 are flowcharts for explaining the operation of the transmission task of the switching device according to the present invention.

도 4는 본 발명에 따른 스위칭 장치의 수신 타스크의 동작을 설명하기 위한 흐름도.4 is a flow chart for explaining the operation of the reception task of the switching device according to the present invention.

이하 본 발명의 바람직한 일 실시 예에 따른 구성 및 작용을 첨부된 도면을 참조하여 설명한다.Hereinafter, a configuration and an operation according to an exemplary embodiment of the present invention will be described with reference to the accompanying drawings.

이하에서 첨부된 도면을 참조하여 본 발명의 일 실시 예에 따른 스위칭 장치의 보드간의 통신방법을 설명한다.Hereinafter, a communication method between boards of a switching device according to an exemplary embodiment will be described with reference to the accompanying drawings.

본 발명에서는 메인보드와 서브보드간의 통신시에 사용될 수 있는 명령은 다음과 같이 나눌 수 있다.In the present invention, the commands that can be used in communication between the main board and the sub board can be divided as follows.

첫째, 시스템이 부트되고 상위 응용 프로그램(application)들이 인터 프로세스 커뮤니케이션(Inter Process Communication: 이하 IPC)을 사용할 수 있게하고, 시스템의 관리를 위한 경우에 사용된다.First, the system is booted and allows upper applications to use Inter Process Communication (IPC) and is used for management of the system.

둘째, 시스템 동작 환경을 설정하기 위한 경우에 사용된다.Secondly, it is used to set the system operating environment.

셋째, 인터페이스 포트(Interface Port)의 변화를 알리기 위한 경우에 사용된다.Third, it is used to inform the change of the interface port.

넷째, SNMP 처리를 위한 경우에 사용된다.Fourth, it is used for SNMP processing.

다섯째, 메인보드의 이중화를 위한 경우에 사용된다.Fifth, it is used for the duplication of the motherboard.

여섯째, Hot Swap을 위한 경우에 사용된다.Sixth, it is used for Hot Swap.

일곱째, 보드의 소프트웨어의 업그레이드(upgrade)를 위한 경우에 사용된다.Seventh, it is used to upgrade software on board.

여덟째, 리셋을 위한 경우에 사용된다.Eighth, it is used in case of reset.

아홉째, ACK를 위한 경우에 사용된다.Ninth, it is used in the case for ACK.

본 발명의 일 실시 예에서는 IPC에 사용되는 패킷은 도 1a에 도시된 바와 같은 형식을 가진다. 도 1a에 도시된 맥 어드레스 필드는 도 1b에 도시된 바와 같은 형식을 가진다. 기본적으로 IPC 중에 맥 어드레스는 실제 맥 어드레스라기보다는 시스템의 정보를 나타내는 필드로 사용된다. 여기서, B0은 슬롯 식별자( SLOT ID)를 나타내며, B1은 보드 종류(Board Type)를 나타낸다. 예를 들어 B 다음에 1이 표시되어 있으면, 주 스위치 보드( Main Switch Board)를 , 2가 표시되어 있으면 부 스위치 보드(Sub Switch Board)를, 3이 표시되어 있으면 이더넷 보드(이더넷 Board)를, 4가 표시되어 있으면 OC3 보드를 나타내는 것이다. 또한, B5 ~ B2의 어드레스는 00:40:5a:00과 같이 표시할 수 있다. 따라서, 메인 스위치 보드와 서브 스위치 보드의 맥 어드레스는 항상 일정하다.In an embodiment of the present invention, a packet used for IPC has a format as shown in FIG. 1A. The MAC address field shown in FIG. 1A has a format as shown in FIG. 1B. Basically, during the IPC, the MAC address is used as a field indicating the information of the system rather than the actual MAC address. Here, B0 represents a slot identifier (SLOT ID), B1 represents a board type (Board Type). For example, if B is displayed after 1, the main switch board is displayed, if 2 is displayed, the sub switch board is displayed, and if 3 is displayed, the Ethernet board is selected. If 4 is displayed, it means OC3 board. In addition, the addresses of B5 to B2 can be displayed as 00: 40: 5a: 00. Therefore, the MAC addresses of the main switch board and the sub switch board are always constant.

또한, 도 1a에 도시된 바와 같이 길이 필드는 항상 길이(length)로만 사용되고 종류(type)를 나타내지는 않는다.Also, as shown in FIG. 1A, the length field is always used only as a length and does not indicate a type.

IPC 헤더(즉, 맥 헤더 이후의 부분)에 IPC 데이터를 보내는 필드는 도 1c에 도시된 바와 같은 형식을 가진다.The field for sending IPC data to the IPC header (ie, the part after the Mac header) has the format as shown in FIG. 1C.

도 1c에서 시퀀스 번호(Sequence Number)는 패킷 손실을 대비한 필드이며 전송할 때마다 1씩 증가한다. 전송하는 보드 자신이 각 상대방 보드들 각각에 대해서 시퀀스 번호를 가진다. 즉, 스위치 보드가 이더넷 보드#1에 대해서 IPC할 때와, 이더넷 보드#2에 대해서 IPC할 때는 각각 서로 다른 시퀀스 번호를 가진다.In FIG. 1C, a sequence number is a field for packet loss and increases by 1 for each transmission. The transmitting board itself has a sequence number for each of the counterpart boards. That is, when the switch board IPCs the Ethernet board # 1 and when the switch board IPCs the Ethernet board # 2, they have different sequence numbers.

패킷을 받은 쪽은 각각의 상대방 보드에 대한 시퀀스 번호를 기억하다가, 빠진 것이 있으면 재전송을 요구 할 수도 있다. 그러나, 현재의 구조(각 패킷마다 ACK를 필요로 하는 구조)에서는 필요 없다. 즉, 현재의 구조에서는 큰 필요가 없는 필드이나 앞으로 사용하게 될 수도 있다.The receiving party may remember the sequence number for each other board and request retransmission if something is missing. However, it is not necessary in the current structure (structure requiring an ACK for each packet). In other words, the current structure may not be a big need or may be used in the future.

각 보드들은 도 1d와 같은 시퀀스 번호를 저장하기 위한 테이블을 관리 해야하며, 이러한 관리를 위한 명령은 다음과 같다.Each board must manage a table for storing sequence numbers as shown in FIG. 1D. The commands for such management are as follows.

Struct {Struct {

MAC slot_mac;MAC slot_mac;

UINT tx_seq_num;UINT tx_seq_num;

UINT rx_seq_num;UINT rx_seq_num;

UINT alive_time;UINT alive_time;

UINT dead_or_aliveUINT dead_or_alive

}IpcSeqNumTbl[MAX_SLOTS];} IpcSeqNumTbl [MAX_SLOTS];

이때, IpcSeqNumTbl[] 에서 인덱스 값은 바로 슬롯 식별자가 되며, 자신의 슬롯 식별자가 인덱스인 레코드는 모두 0으로 초기화되어야 한다.At this time, the index value in IpcSeqNumTbl [] becomes a slot identifier immediately, and all records whose slot identifier is an index must be initialized to zero.

시퀀스 번호는 최대값(2^32 - 1 = 4294967295) 이후에 0으로되며, 최대값에서 0으로 넘어감을 알리는 패킷은 없다. 받는 쪽은 각각 최대값 이후는 0이 올 것을 기대해야하며, 보내는 쪽에서는 최대값 이후에는 0을 보낸다.The sequence number becomes 0 after the maximum value (2 ^ 32-1 = 4294967295). There is no packet indicating that the sequence number is skipped to zero. The receiving side should expect 0 after each maximum, and the sending side sends 0 after the maximum.

살아있는 시간은 해당 보드로부터 가장 최근에 패킷을 받은 때이다. 이 수치는 IPC가 초기화된 후의 초를 나타낸다.The live time is when the most recent packet was received from the board. This number represents the seconds after the IPC is initialized.

Dead_or_alive는 해당 보드가 현재 IPC를 하고 있는지를 나타낸다.Dead_or_alive indicates whether the board is currently doing IPC.

#define BOARD_UNCONFIGURED 0 어떤 보드이든지 인식된적이 없음#define BOARD_UNCONFIGURED 0 No Boards Recognized

#define BOARD_DEAD 1 한때 인식되었으나 현재는 인식되지 않음#define BOARD_DEAD 1 Once recognized but not currently

#define BOARD_UNKNOWN 2 알 수 없는 보드가 인식됨#define BOARD_UNKNOWN 2 Unknown board recognized

#define BOARD_ALIVE 3 현재 인식되는 보드#define BOARD_ALIVE 3 Boards Currently Recognized

BOARD_DEAD 또는 BOARD_ALIVE는 slot_mac의 2번째 바이트를 읽으면 그 보드의 타입을 알 수 있다.BOARD_DEAD or BOARD_ALIVE knows the type of the board by reading the second byte of slot_mac.

시스템이 사용할 IPC는 크게 다음과 같이 9종류로 나눌 수 있다. 이를 이용하여 IPC의 명령 종류(command type)를 정하며 정의된 명령 종류는 도 1e와 같다.IPC to be used by system can be divided into 9 types as follows. By using this, a command type of the IPC is determined and the defined command type is shown in FIG. 1E.

각 명령 종류마다 별개의 명령 번호가 존재하며 그중 상위 응용 프로그램(application)에 의존하지 않는 명령 종류가 1,7,A IPC의 명령 번호와 뜻은 다음과 같다.There is a separate command number for each command type, and the command types and meanings of 1,7, A IPC are as follows.

부팅 중에 필요한 IPC들의 명령 번호와 각각의 의미는 다음의 표1과 같다.Command numbers of IPCs required during booting and their meanings are shown in Table 1 below.

명령 종류Command type 명령 번호Command number 의 미meaning 1One 00 각 I/O 보드가 자신의 존재(동작중임)를 메인 스위치 보드에게 알린다.이 IPC를 받은 메인 스위치 보드는 시스템의 컨피그레이션과 현재 각 입/출력 보드들의 동작 상황을 알 수 있다.부팅후 계속 주기적(1초)으로 발생된다.Each I / O board informs the main switch board of its presence (operation). The main switch board, which has received this IPC, can see the configuration of the system and the operation status of each input / output board. (1 second). 1One 1One 메인 보드가 각 I/O 보드들에게 1초마다 보낸다. 메인 보드가 자신의 존재(동작중임)를 알린다.Command Specific Field :4 Byte : Slot IDThe main board sends to each I / O board every 1 second. The main board announces its existence (operation) Command Specific Field: 4 Byte: Slot ID 1One 22 스위치 보드 중에서 서브 보드가 자신이 서브보드임을 알린다.이 IPC를 받은 나머지 보드들은 서브 보드의 존재를 알 수 있다.Command Specific field. 4 Byte :Slot ID 서브 스위치 보드의 slot IDAmong the switch boards, the sub board informs itself that it is a sub board. The remaining boards which have received this IPC can know the existence of the sub board. Command Specific field. 4 Byte: Slot ID of slot ID sub switch board 1One 33 메인 보드가 I/O보드에게, 시스템 환경 인식이 끝났음을 알리고 보드 컨피그레이션 정보 전송 시작을 알린다.The main board informs the I / O board that system environmental awareness has been completed and the board configuration information transmission starts. 1One 44 메인 보드가 그 외의 보드들에게 시스템 컨피그레이션을 알리는 패킷Command Specific Field4 Byte : SLOT ID6 Byte : MACPacket that the main board notifies other boards of system configuration Command Specific Field 4 Byte: SLOT ID 6 Byte: MAC 1One 55 메인 보드가 그 외의 보드들에게 모든 초기화가 끝났음을 알린다.The main board informs the other boards that all initialization is complete.

이어, 소프트웨어 업그레이드를 위한 IPC 명령은 아래의 표 2와 같다. 이 명령은 스프트웨어 업그레이드를 위한 다운로드(download)와 I/O 보드의 실행을 제어하는데에 사용된다. 각 I/O 보드들은 다운 로드받은 이미지(image)를 0x410번지부터 순차적으로 저장한다.Subsequently, the IPC commands for software upgrade are shown in Table 2 below. This command is used to control the download of the software upgrade and the execution of the I / O board. Each I / O board stores the downloaded image sequentially from 0x410 address.

종 류Kinds 번 호Number 방 향direction 의 미meaning 77 00 SW-〉IOSW-> IO 시작 패킷 CSF : 4 bytes - 이미지에 저장하는 시작 주소주식회사로 0x410) 4 bytes - 바이트에서 이미지의 길이Start Packet CSF: 4 bytes-The starting address to store in the image. 0x410) 4 bytes-The length of the image in bytes. 77 1One SW-〉IOSW-> IO 데이터 패킷 CSF : bytes - 시작 주소로부터 어드레스 옵셋을 저장 1~1486 Bytes - 데이터Data packet CSF: bytes-Save address offset from start address 1 ~ 1486 Bytes-Data 77 22 SW-〉IOSW-> IO 다운로드의 끝 CSF : 4 bytes - 전송된 이미지의 합을 확인한다End of download CSF: 4 bytes-Check the sum of the images transferred. 77 33 IO-〉SWIO-> SW 합계의 확인(Checksum)이 맞음Checksum is correct 77 44 IO-〉SWIO-> SW 합계의 확인(Chechsum)이 틀림 이 IPC를 스위치 보드가 받고나서의 일은 정의되어 있지 않다. 현재는 다운로드가 실패했음을 나타내고 종료된다.Checking the sum (Chechsum) The job after the switch board receives the IPC is not defined. The current indicates that the download failed and ends. 77 55 IO-〉SWIO-> SW 파일 크기가 틀림(사용되지 않음)Incorrect file size (not used) 77 66 SW-〉IOSW-> IO 디램에 있는 이미지를 실행한다. CSF : 4 bytes - 시작 주소Run the image in DRAM. CSF: 4 bytes-starting address 77 77 SW-〉IOSW-> IO 디램에 있는 이미지를 플래쉬에 라이트한다. CSF : 4 bytes - 시작 주소Write the image on the flash to the flash. CSF: 4 bytes-starting address 77 88 IO-〉SWIO-> SW 디램에 있던 이미지를 플레쉬에 라이트 완료했음을 알린다.Notifies Flash that the image on the DRAM has been written to. 77 99 SW-〉IOSW-> IO 플래쉬에 있는 이미지를 디램으로 옮겨서 실행한다. CSF : 4 bytes - 시작 주소Run the image in Flash by moving it to DRAM. CSF: 4 bytes-starting address

여기서, ACK 패킷은 명령 종류 = 11이고, 명령 번호 = 0이며, 이하 본 발명의 실시 예에서 IPC(x, y)는 명령 종류=x, 명령 번호=y 인 IPC 을 의미한다.Here, the ACK packet is command type = 11, command number = 0, and in the following embodiment, IPC (x, y) means IPC with command type = x and command number = y.

이하에서 도 2 내지 도 3을 참조하여, 본 발명에 따른 IPC 전송시 타스크의 동작을 설명한다.2 to 3, the operation of the task in IPC transmission according to the present invention will be described.

또한, 지정된 IPC가 도착할 때까지 기다리는 wait_for_ipc1(), wait_for_ipc2() 함수에 대하여 설명한다. 이 함수는 IPC 수신 타스크로 지정하는 IPC가 들어오면 자신에게 특정 시그널을 보내도록 등록하고, ev_receive를 수행한다. 즉, 지정하는 IPC가 들어올 때까지 타스크는 중지된다. wait_for_ipc1()은 지정된 명령 종류와 명령 번호에 따라 데이터 베이스의 일종인 시그널 하우스(Signal House)에 자신의 타스크 식별자, 이벤트의 종류로는 EV_IPC_COME1을 등록하고, 이벤트 EV_IPC_COME1이 수신되기를 대기한다. 이벤트 EV_IPC_COME1이 수신되면 수행이 종료된다.In addition, the functions wait_for_ipc1 () and wait_for_ipc2 () that wait until the specified IPC arrives are described. This function registers itself to send a specific signal when an IPC comes in as an IPC receive task, and executes ev_receive. In other words, the task is suspended until the IPC that you specify comes in. wait_for_ipc1 () registers its task identifier and EV_IPC_COME1 as a type of event in the Signal House, which is a kind of database according to the designated command type and command number, and waits for the event EV_IPC_COME1 to be received. Execution ends when the event EV_IPC_COME1 is received.

또한, 지정된 IPC가 도착하면 지정하는 타스크로 이벤트를 보내거나 지정된 함수를 호출하는 register_ipc() 함수에 대해 설명한다. 이 함수는 지정하는 IPC가 수신되면 호출된 함수를 등록하거나 타스크와 시그널을 등록하고 함수의 수행을 종료하므로, 그 IPC가 도착될 때까지 대기하지 않는다. 한 번 등록되면 아래의 remove_register_ipc()가 호출될 때까지 효력을 유지한다. register_ipc()는 지정된 명령 종류와 명령 번호에 따라 시그널 하우스에 지정된 타스크 식별자, 이벤트, 함수를 등록하고 수행 종료한다.It also describes the register_ipc () function, which sends an event to a specified task or calls a specified function when a specified IPC arrives. This function registers a called function or registers a task and a signal when the specified IPC is received, and finishes executing the function, so it does not wait for the IPC to arrive. Once registered, it stays in effect until remove_register_ipc () is called. register_ipc () registers the task identifier, event, and function specified in the signal house according to the specified command type and command number and terminates execution.

여기서, remove_register_ipc()는 register_ipc()로 등록된 함수 또는 타스크로의 이벤트를 삭제할 경우 사용하는 함수이다.Here, remove_register_ipc () is a function used to delete an event to a function or task registered with register_ipc ().

한편, IPC에서 사용되는 데이터 구조를 설명하면 다음과 같다. IPC에서 사용되는 데이터는 크게 시그널 하우스와 IPC 수신 큐 및 전송 큐로 구분된다.Meanwhile, the data structure used in the IPC will be described below. Data used in IPC is divided into signal house, IPC receive queue and transmit queue.

먼저, 시그널 하우스는 수신하는 패킷에 따라 어떤 행동을 취해야 하는지를 정의해 두는 장소이다. 즉, ipc(x, y)가 들어왔을 때, 어떤 타스크로 이벤트를 보내야 하는지, 또는 function을 호출해야 하는지를 저장하며, 구조는 다음과 같다.First, the signal house is where you define what actions to take based on the packets you receive. That is, when ipc (x, y) comes in, it stores which task should send the event or call the function. The structure is as follows:

Typedef struct __signal_houseTypedef struct __signal_house

{{

char in_use;char in_use;

int durationint duration

int taskId;int taskId;

int signal;int signal;

IPC_MBUF* mbuf;IPC_MBUF * mbuf;

Void *(*func)();Void * (* func) ();

}SIGNAL_HOUSE;} SIGNAL_HOUSE;

SIGNAL_HOUSE IpcSignalHouse[MAX_COM_TYPE]{MAX_COM_NUM};SIGNAL_HOUSE IpcSignalHouse [MAX_COM_TYPE] {MAX_COM_NUM};

이 데이터 구조를 엑세스하기 위해서는 세마포아(semaphore)를 획득하여야 한다. 즉, 세마포아를 사용하여 상호 실행이 구현되어 있다. 이를 위해서 AddSignalHouse()와 RemoveSignalHouse()가 제공된다.In order to access this data structure, a semaphore must be obtained. In other words, interoperability is implemented using semaphores. AddSignalHouse () and RemoveSignalHouse () are provided for this purpose.

int AddSignalHouse(int com_type, int com_num, int tid, int 이벤트, void *(*func)(), IPC_MBUF *mbuf);int AddSignalHouse (int com_type, int com_num, int tid, int event, void * (* func) (), IPC_MBUF * mbuf);

이 함수는 IpcSignalHouse[com_type][com_num]에 tid, 이벤트, 함수 등을 등록한다.This function registers tid, event, function, etc. in IpcSignalHouse [com_type] [com_num].

Int RemoveSignalHouse(int com_type, int com_num)Int RemoveSignalHouse (int com_type, int com_num)

이 함수는 IpcSignalHouse[com_type][com_num]에 저장된 내용을 삭제한다.This function deletes the contents stored in IpcSignalHouse [com_type] [com_num].

이어, IPC 전송 큐 및 IPC 수신 큐의 구조를 설명한다.Next, the structures of the IPC transmission queue and the IPC reception queue will be described.

전송 큐는 IPC 패킷을 전송하기 위해서 사용된다. IPC를 보내고자 하는 응용 프로그램(application)은 이 큐에 보내고자 하는 패킷을 넣으면 IPC 전송 타스크가 큐에서 데이터를 읽어서 패킷을 전송하게 된다.The transmission queue is used to send IPC packets. An application that wants to send an IPC puts a packet to send to this queue, and the IPC sending task reads the data from the queue and sends the packet.

반면, 수신 큐는 수신한 패킷을 이더넷 드라이버로부터 받아들이기 위한 큐이다. NIC 드라이버는 패킷을 받으면 이 큐에 패킷을 넣는다. 그러면 IPC 수신 타스크가 패킷을 읽어 들이고, 시그널 하우스에서 예약된 타스크로 이벤트를 보내거나 함수를 호출한다.On the other hand, a receive queue is a queue for receiving a received packet from the Ethernet driver. When the NIC driver receives a packet, it puts the packet in this queue. The IPC Receive task then reads the packet and sends an event or call a function from the signal house to the scheduled task.

이어, 첨부된 도 4를 참조하여 IPC 패킷을 수신하였을 경우 IPC 수신 타스크에 대해 설명한다.Next, an IPC reception task will be described when an IPC packet is received with reference to FIG. 4.

도 4를 참조하면, IPC 수신 타스크는 항상 EV_MESSAGE 을 대기하고 있으며(S21), 이 메시지는 IPC 수신 큐에 메시지가 도착하였을 때 발생된다. NIC 드라이버는 정상적인 패킷을 수신하면 IPC 수신 큐에 메시지를 삽입한다.Referring to FIG. 4, the IPC reception task is always waiting for EV_MESSAGE (S21). This message is generated when a message arrives in the IPC reception queue. When the NIC driver receives a normal packet, it inserts a message in the IPC receive queue.

IPC 수신 타스크는 EV_MESSAGE를 받으면 IPC 수신 큐에서 메시지를(이 메시지는 실제 IPC 패킷이다) 읽어서 그 패킷을 보낸 보드의 상태를 살아있는 상태로 하고, 도착 시간을 갱신한다(S22). 이어, 명령 형식이 11인지를 판단한다(S23). 만일, 판단단계의 결과가 패킷이 ACK이면, IPC 전송 타스크에게 EV_IPC_SUCCESS 신호를 보내고(S24) 다시 대기 상태로 돌아간다.Upon receiving EV_MESSAGE, the IPC Receive task reads a message from the IPC Receive Queue (this message is an actual IPC packet), makes the status of the board that sent the packet alive, and updates the arrival time (S22). Next, it is determined whether the command format is 11 (S23). If the result of the determination step is that the packet is an ACK, it sends an EV_IPC_SUCCESS signal to the IPC transmission task (S24) and returns to the standby state.

그러나, 판단단계(S23)의 결과가 받은 패킷에 ACK가 아니면, ACK 패킷을 전송하고(S25), 패킷에 저장되어 있는 명령 종류와 명령 번호를 인식하여, 해당하는 Ipc 시그널 하우스에 타스크 식별자와 이벤트가 등록되어 있는지를 판단한다(S26). 만일, 판단결과가 타스크에 이벤트를 보낸다(S27). 그러나, 등록되지 않은 경우 IPC 시그널 하우스에 함수가 등록되어 있는지를 판단하여(S28), 함수가 등록되어 있다면, 그 함수를 호출하고(S29), 호출을 완료하면 다시 초기 대기 상태로 돌아간다.However, if the result of the determination step (S23) is not an ACK to the received packet, an ACK packet is transmitted (S25), the command type and the command number stored in the packet are recognized, and the task identifier and the event are transmitted to the corresponding Ipc signal house. It is determined whether is registered (S26). If, the determination result sends an event to the task (S27). However, if it is not registered, it is determined whether a function is registered in the IPC signal house (S28). If the function is registered, the function is called (S29), and when the call is completed, it returns to the initial waiting state again.

따라서, IPC 소프트웨어의 전체 구조에서는 최상위 계층에는 각종 응용 프로그램(application)과 (스위치 보드에서는 pNA+도 포함됨) 수행되고 있다. 각 응용 프로그램(application)들은 IPC 인터페이스 루틴을 통하여 IPC관련 작업을 수행할 수 있다. IPC 인터페이스 루틴은 이미 기술한 IPC API들이다. IPC 인터페이스 루틴은 IPC 전송 큐에 패킷을 삽입하거나(make_ipc(), 이 때 IpcTxSigFn()이 사용된다)시그널 하우스에 라이트 할 수 있다(register_ipc(), wait_for_ipc() ).Therefore, in the overall structure of the IPC software, various applications and (including pNA + on a switch board) are executed at the top layer. Each application can perform IPC related tasks through IPC interface routines. IPC interface routines are already described IPC APIs. IPC interface routines can insert packets into the IPC transmission queue (make_ipc (), where IpcTxSigFn () is used) or write to the signal house (register_ipc (), wait_for_ipc ()).

이때, 시그널 하우스를 엑세스하기 위해서는 세마포아가 필요하다. 이 세마포아는 IPC를 초기화 할 때 생성되며, 여러 타스크가 동시에 시그널 하우스를 엑세스하는 것을 방지하여, 상호 실행이 되게 한다.At this time, semaphores are required to access the signal house. This semaphore is created when the IPC is initialized and prevents multiple tasks from accessing the signal house at the same time, making it interoperable.

IPC 전송 큐에 메시지가 삽입되면, IPC 전송 타스크가 깨어나며, IPC 전송 타스크의 설명에서 이미 기술할 바와 같은 작업을 수행하게 된다. IPC 전송 타스크는 패킷을 실제로 전송하기 위해서 de_write() 시스템 호출을 사용하며, 이 시스템 호출은 다시 NIC 드라이버의 전송 루틴을 호출한다.When a message is inserted into the IPC transmission queue, the IPC transmission task wakes up and performs the work already described in the description of the IPC transmission task. The IPC transfer task uses the de_write () system call to actually send the packet, which in turn calls the NIC driver's transfer routine.

NIC 칩에서 인터럽트가 발생하면, NIC ISR이 수행되며, NIC ISR은 인터럽트의 상태를 읽어서, 전송한 패킷이 에러가 발생한 것이면, IPC 전송 타스크로 EV_IPC_SEND_FAIL을 보낸다. 그 이벤트를 받은 IPC 전송 타스크는 다시 IPC 인터페이스 루틴으로 동일한 이벤트를 보내며, IPC 인터페이스 루틴은 EV_IPC_SEND_FAIL을 응용 프로그램(application)으로 리턴한다.When an interrupt occurs in the NIC chip, NIC ISR is performed, and the NIC ISR reads the interrupt status and sends EV_IPC_SEND_FAIL to the IPC transfer task if the transmitted packet is an error. The IPC transport task that receives the event sends the same event back to the IPC interface routine, which returns EV_IPC_SEND_FAIL to the application.

인터럽트의 상태가 패킷을 수신한 것이면, 수신한 패킷을 IpcRxSigFn()을 사용하여 IPC 수신 큐에 삽입한다. 이 큐에 메시지가 삽입되면 IPC 수신 타스크에 이벤트가 보내어지며, 이 이벤트를 받음으로써, IPC 수신 타스크가 동작된다.If the interrupt status is that a packet has been received, the received packet is inserted into the IPC receive queue using IpcRxSigFn (). When a message is inserted into this queue, an event is sent to the IPC Receive task, and by receiving this event, the IPC Receive task is operated.

이상과 같은 본 발명에 따르면, 이더넷을 백본(backplane)으로 사용한 시스템에서 IPC를 사용함에 있어서, 명령 종류와 명령 번호로 명령의 종류를 이중화하고, 시퀀스 번호를 사용하여 패킷이 이중으로 수신됨을 방지하고, ACK를 요구함으로써 스위칭 장비에서 안정되고 신뢰성 있는 통신이 가능하다. 또한, 소스 맥 필드에는 슬롯 식별자와 보드의 종류를 두어서 통신의 양을 줄일 수 있는 효과가 있다.According to the present invention as described above, in using IPC in a system using Ethernet as a backplane, the type of command is duplicated by the command type and the command number, and the packet is prevented from being duplicated by using the sequence number. By requiring ACK, stable and reliable communication is possible in switching equipment. In addition, the source MAC field has a slot identifier and a type of board to reduce the amount of communication.

Claims (3)

인터 프로세서 커뮤니케이션(IPC) 함수를 초기화시키는 단계와,Initializing an interprocessor communication (IPC) function; 지정하는 슬롯으로 IPC를 보내기 위한 명령을 실행하고, 이벤트 메시지를 대기하는 단계와,Executing a command to send an IPC to a designated slot, waiting for an event message, IPC 수신 큐에 메시지가 들어오면 큐에서 패킷을 꺼내서 상기 IPC 함수를 호출하는 단계와,When a message enters an IPC receive queue, removing the packet from the queue and calling the IPC function; 상기 IPC 전송 타스크는 상기 IPC 함수의 결과값에 따라 기억된 타스크 식별자에게 이벤트를 송신하고, 다시 이벤트를 대기하는 상태로 되돌아가는 단계로 이루어진 것을 특징으로 하는 스위칭 장치의 보드간의 통신방법.And transmitting the event to the stored task identifier according to a result value of the IPC function, and returning to the waiting state for the event. 제 1항에 있어서, 상기 IPC 함수가 호출된 경우The method of claim 1, wherein the IPC function is called 패킷을 NIC 드라이버에게 전송하고 현재 모드의 종류를 판단하는 단계와,Sending the packet to the NIC driver and determining the type of current mode; 상기 판단 결과가 비동기 모드(async mode)이면 EV_IPC_SUCCESS를 리턴하고, 상기 판단 결과가 동기 모드(Sync mode)이면, 이벤트를 기다리는 단계와,Returning EV_IPC_SUCCESS if the determination result is an async mode, and waiting for an event if the determination result is a synchronization mode; 시간이 초과되었는지를 판단하여 설정된 시간이 되면, 타임 아웃된 회수를 카운트하여 미리 설정된 회수까지만 패킷을 재 전송하고, 계속 타임아웃이 발생하면 EV_IPC_ACK_NOT_RECEIVED를 리턴하는 단계와,Determining whether the time has been exceeded and counting the number of timed out, retransmitting the packet only up to the preset number of times, and returning EV_IPC_ACK_NOT_RECEIVED if the timeout continues, 상기 기간이 초과 되지 않은 경우 시그널의 종류를 판단하여 판단 결과에 따라 EV_IPC_SEND_FAIL을 리턴하거나 EV_IPC_SUCCESS를 리턴하는 단계로 이루어진 것을 특징으로 하는 스위칭 장치의 보드간의 통신방법.And if the period is not exceeded, determining the type of signal and returning EV_IPC_SEND_FAIL or EV_IPC_SUCCESS according to the determination result. IPC 수신 타스크가 이벤트 메시지를 대기하는 단계와,The IPC Receive task is waiting for an event message, 상기 IPC 수신 타스크가 이벤트 메시지를 수신하는 경우, IPC 수신 큐에서 상기 메시지를 읽고, 상기 메시지의 도착 시간을 갱신하는 단계와,When the IPC receiving task receives an event message, reading the message from an IPC receiving queue and updating the arrival time of the message; 상기 메시지를 처리하는 명령 형식의 종류를 판단하여 판단 결과에 따라 상기 IPC 전송 타스크에게 EV_IPC_SUCCESS 신호를 보내고 다시 대기 상태로 돌아가거나, ACK 패킷을 전송하고, 패킷에 저장되어 있는 명령 종류와 명령 번호를 인식하여, 해당하는 IPC 시그널 하우스에 타스크 식별자와 이벤트가 등록되어 있는지를 판단하는 단계와,Determine the type of command format for processing the message and send EV_IPC_SUCCESS signal to the IPC transmission task according to the determination result and return to standby state, send an ACK packet and recognize the command type and command number stored in the packet. Determining whether a task identifier and an event are registered in a corresponding IPC signal house; 상기 등록 판단단계의 결과에 따라 상기 수신 타스크에 이벤트를 보내거나, 상기 시그널 하우스에 함수가 등록되어 있는지를 판단하여 함수가 등록되어 있다면 그 함수를 호출하고 호출을 완료하면 다시 초기 대기 상태로 돌아가는 단계로 이루어진 것을 특징으로 하는 스위칭 장치의 보드간의 통신방법.Sending an event to the receiving task according to the result of the registration determining step, or determining whether a function is registered in the signal house, calling the function if the function is registered, and returning to the initial waiting state again when the function is completed. Communication method between the board of the switching device, characterized in that consisting of.
KR1019980061822A 1998-12-30 1998-12-30 Board-to-board communication method of switching device KR100287910B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980061822A KR100287910B1 (en) 1998-12-30 1998-12-30 Board-to-board communication method of switching device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980061822A KR100287910B1 (en) 1998-12-30 1998-12-30 Board-to-board communication method of switching device

Publications (2)

Publication Number Publication Date
KR20000045264A KR20000045264A (en) 2000-07-15
KR100287910B1 true KR100287910B1 (en) 2001-06-01

Family

ID=19568519

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980061822A KR100287910B1 (en) 1998-12-30 1998-12-30 Board-to-board communication method of switching device

Country Status (1)

Country Link
KR (1) KR100287910B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101448951B1 (en) 2013-02-27 2014-10-13 주식회사 시큐아이 Apparatus and method for processing packet

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101448951B1 (en) 2013-02-27 2014-10-13 주식회사 시큐아이 Apparatus and method for processing packet

Also Published As

Publication number Publication date
KR20000045264A (en) 2000-07-15

Similar Documents

Publication Publication Date Title
US6901580B2 (en) Configuration parameter sequencing and sequencer
US7051112B2 (en) System and method for distribution of software
US5630061A (en) System for enabling first computer to communicate over switched network with second computer located within LAN by using media access control driver in different modes
EP0613274B1 (en) Socket structure for concurrent multiple protocol access
US5987511A (en) Communication system capable of exchanging software and restarting with all information preserved
US6047338A (en) System for transferring a data directly from/to an address space of a calling program upon the calling program invoking a high performance interface for computer networks
US6697876B1 (en) Distributed kernel operating system
KR101558289B1 (en) Composing message processing pipelines
EP1088422B1 (en) A telecommunication controller messaging system
KR100287910B1 (en) Board-to-board communication method of switching device
JP4415391B2 (en) Method and apparatus for transmitting data to a network and method and apparatus for receiving data from a network
JP3730545B2 (en) Service control application execution method and system
Rajbharti The Microchip TCP/IP Stack
EP1229470A2 (en) Tracking of data relating to computer based training courses
JP2924783B2 (en) Remote read processing method and device
JP3070749B2 (en) Header prediction method and communication control processing device
WO2001093032A1 (en) Computer system, method of controlling computer, and medium storing control program
KR960006472B1 (en) Fddi firmware driving method for ticom iop environment
JPH09162887A (en) Terminal connection method on network and network system
KR100489942B1 (en) method of data transmission between processor using socket communication
JPH10154116A (en) Data transfer method
Hellwagner et al. 1. SCI Sockets Library
KR0136493B1 (en) Downloading Method of Signal Relay Switch
KR0168946B1 (en) Method for booting control part of full electron switch by using ethernet
Schmidt et al. APPLYING PATTERNS TO DEVELOP

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20080124

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee