JP3557201B2 - Packet processing device, packet processing method, and telephone device that can use the method - Google Patents
Packet processing device, packet processing method, and telephone device that can use the method Download PDFInfo
- Publication number
- JP3557201B2 JP3557201B2 JP2003005100A JP2003005100A JP3557201B2 JP 3557201 B2 JP3557201 B2 JP 3557201B2 JP 2003005100 A JP2003005100 A JP 2003005100A JP 2003005100 A JP2003005100 A JP 2003005100A JP 3557201 B2 JP3557201 B2 JP 3557201B2
- Authority
- JP
- Japan
- Prior art keywords
- packet
- unit
- processing
- buffer
- data
- 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.)
- Expired - Lifetime
Links
- 238000012545 processing Methods 0.000 title claims description 78
- 238000000034 method Methods 0.000 title description 21
- 238000003672 processing method Methods 0.000 title 1
- 230000005540 biological transmission Effects 0.000 claims description 37
- 238000004891 communication Methods 0.000 claims description 30
- 238000007726 management method Methods 0.000 description 20
- 230000008569 process Effects 0.000 description 10
- 238000004458 analytical method Methods 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 230000004044 response Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000002194 synthesizing effect Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000020169 heat generation Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004377 microelectronic Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は通信技術に関し、とくにパケットを効率的に処理する技術に関する。
【0002】
【従来の技術】
インターネットが広く普及し、ネットワークのインフラの整備も進みつつある現在、通話音声信号を符号化したデータをパケット化し、インターネットなどのネットワークを介して送受信するインターネット電話装置が注目を集めている。通話音声と同時にビデオ映像を送ることにより、ビデオ電話装置として利用することも可能であり、従来の電話装置に取って代わる次世代の電話装置として期待されている。
【0003】
現在、パケット通信のための通信プロトコルとして、TCP/IP(Transmission Control Protocol / Internet Protocol)が広く利用されている。TCPは、装置間で接続を確立してからデータを送受信するなど、正確性を重視した通信プロトコルである。しかしながら、処理が複雑で、相手側がパケットを受信したことを確認するまで次のパケットを送ることができないなどの時間的制約があり、リアルタイム性に欠けるため、通話音声の送受信には不向きである。
【0004】
TCPよりも簡便な通信プロトコルに、UDP/IP(User Datagram Protocol / Internet Protocol)がある。UDPでは、データの送受信に先立って装置間で接続を確立する必要がなく、パケットの受信確認を待たずに次のパケットを送ることが許されるので、送信側は次々にパケットを送出することができる。そのため、データの正確性よりもリアルタイム性が重視される、通話音声の送受信に適している。
【0005】
TCPとUDPの双方の通信プロトコルをサポートする装置では、パケット処理は、CPUなどの汎用プロセッサによりソフトウェア処理されるのが一般的である。すなわち、ネットワークインタフェースデバイスがパケットを受信すると、自装置以外のMAC(Media Access Control)アドレス宛てのパケットがフィルタリングされ、CRC(Cyclic Redundancy Check)による誤りチェックが行われた後、それらを通過した全てのパケットがCPUに送られて処理される。
【0006】
【非特許文献1】
エスティー(ST)マイクロエレクトロニクス株式会社、ボイスオーバーアイピー(VoIP)デジタルプロセッサデータシート、[online]、平成14年、[平成14年9月30日検索]、インターネット<URL:http://www.st.com/stonline/books/pdf/docs/7818.pdf>
【0007】
【発明が解決しようとする課題】
しかしながら、全てのパケットをCPUによりソフトウェア処理する方式では、処理効率が悪い、速度が遅い、消費電力が大きい、などの課題がある。とくに、複数の相手と同時に通話したり、音声とともに画像を送ったりする場合には、プロトコル処理が律速となり、リアルタイム性が損なわれる恐れがある。また、通話中は常にCPUがプロトコル処理を実行しているため、その他のアプリケーションを並行して実行させるのが困難である。たとえば、パーソナルコンピュータなどのように高性能のCPUを搭載した装置により通信を行う場合は、CPUに全てのパケット処理を担わせても、それに見合う十分な能力を有しているので問題はないが、インターネット電話のための専用装置を開発する場合、装置の小型化、低価格化、低消費電力化を実現するためには、比較的性能の低いCPUを搭載せざるを得ないので、いかにCPUの処理負荷を軽減するかが課題となる。
【0008】
本発明は、そうした課題に鑑みてなされたものであり、その目的は、データ通信に伴うパケット処理を効率よく行う技術を提供することにある。本発明の別の目的は、パケット処理におけるCPUの処理負荷を軽減し、高速でリアルタイムな通信を実現する技術を提供することにある。
【0009】
【課題を解決するための手段】
本発明のある態様は、パケット処理装置に関する。このパケット処理装置は、ネットワークを介して取得したパケットを一時的に保持するバッファと、前記パケットの前記バッファへの格納を制御する書き込み制御部と、を備え、前記書き込み制御部は、前記パケットのヘッダ情報のうち、送信先アドレス情報を破棄して前記受信バッファに格納する。
【0010】
パケットのMACヘッダに格納されている送信先MACアドレスは、パケットを受信すると以降のパケット処理には不要であるので、これを破棄することにより、バッファの使用効率を向上させることができる。
【0011】
前記書き込み制御部は、前記送信先アドレス情報に代えて、そのパケットがユニキャスト、マルチキャスト、ブロードキャストのいずれで送信されたかを示す送信種別情報を含む管理情報を格納してもよい。前記管理情報は、パケットの種別を示すパケット種別情報、および次のパケットの格納位置を示すアドレス情報をさらに含んでもよい。前記書き込み制御部は、前記管理情報を1ワードにおさめ、後続のデータをワード単位で整形して前記バッファに格納してもよい。
【0012】
MACヘッダは、32ビットワードで3.5ワードであり、半端なサイズであるから、そのままバッファに格納すると、後続のデータが全て半ワードずつずれることになる。そのため、1.5ワード分の送信先MACアドレスを破棄してバッファに格納することにより、後続のデータをワード単位でアライメントすることができる。このとき、パケット処理に必要な管理情報を1ワード分追加してもよい。これにより、ハードウェア的にもソフトウェア的にも扱いが容易になる。
【0017】
本発明のさらに別の態様は、電話装置に関する。この電話装置は、音声を入力する入力部と、前記入力部により入力された音声を他の装置へ送信し、他の装置から音声を受信する通信部と、他の装置から受信した音声を出力する出力部と、を備え、前記通信部は、ネットワークを介して送られたパケットを受信する受信部と、受信したパケットを処理するパケット処理部と、を含み、前記パケット処理部は、前記パケットを一時的に保持するバッファと、前記パケットの前記バッファへの格納を制御する書き込み制御部と、を含み、前記書き込み制御部は、前記パケットのヘッダ情報のうち、送信先アドレス情報を破棄して前記受信バッファに格納する。更に前記書き込み制御部は、前記破棄した送信先アドレス情報に代えて、そのパケットがユニキャスト、マルチキャスト、ブロードキャストのいずれで送信されたかを示す送信種別情報を含む管理情報を前記受信バッファに格納する。
【0020】
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、などの間で変換したものもまた、本発明の態様として有効である。
【0021】
【発明の実施の形態】
図1は、本発明の実施の形態に係る通信装置の一例としてのインターネット電話装置100の全体構成を示す。インターネット電話装置100は、インターネット20を介して、他のインターネット電話装置100との間で通話を行うための装置である。インターネット電話装置100は、主に、ソフトウェア処理を実行するための汎用回路であるCPU110、プログラムエリアまたはワークエリアとして利用されるメモリ120、インターネット20を介してパケットを送受信するネットワークインタフェース部130、音声信号を入力するマイク150、音声信号を出力するスピーカ160、音声信号の圧縮符号化処理および復号処理を行うコーデック処理部140、通信データの暗号化処理または復号処理などを行うセキュリティ処理部172、UDPパケットを処理するための専用回路であるUDP処理部174、通信プロトコルに応じた各種処理を行うプロトコルエンジン200、およびこれらの構成を電気的に接続するバス102を備える。
【0022】
本実施の形態のインターネット電話装置100は、受信したパケットの処理をCPU110のみに任せるのではなく、CPU110へパケットを転送する前に、専用のハードウェアにより構成されたプロトコルエンジン200が、ヘッダ解析、エラーチェック、データのアライメントなどの処理を行うので、CPU110が無駄なパケット処理を行う必要がなく、処理負荷が大幅に軽減される。
【0023】
本実施の形態のインターネット電話装置100では、UDPを利用して音声信号を送受信する。UDPは、接続の確立を要さず、パケットを次々に送出することが可能な通信方式であるため、プロトコル処理が簡単で、かつ高速な通信が可能であり、通話音声を送るなどのリアルタイムな通信に適している。本実施の形態のインターネット電話装置100では、UDPパケットの処理を、専用の回路であるUDP処理部174に実行させることで、さらに処理速度を向上させ、通話音声のリアルタイムな送受信を実現する。
【0024】
インターネット電話装置100が送受信するパケットのうち、TCPにより送受信されるパケットは、CPU110を利用してソフトウェアにより処理される。リアルタイム性を要しないTCPパケットについては、専用の回路を設けず、汎用回路によるソフトウェア処理を行うことで、回路規模の増大を抑え、コスト、消費電力、熱発生の増大を最小限に抑えることができる。本発明者の試算によれば、TCPとUDPの双方を専用回路により処理する場合に比べて、回路の面積および消費電力が約1/3で済むことが分かっている。このように、本実施の形態では、専用のハードウェアと汎用のソフトウェアとにより協調処理することで、処理の高速化と回路規模の削減という二律背反的な要望に応える。
【0025】
ネットワークインタフェース部130が受信したパケットは、プロトコルエンジン200に送られる。プロトコルエンジン200は、パケットが自装置に割り当てられたIPアドレスに宛てられたものであるか否かを判断し、自装置宛てのパケットのみを通し、その他のパケットを破棄する。また、パケットに付されたヘッダ情報を参照してプロトコルの種別を検出し、パケットがTCPにより送られたパケットであった場合は、そのパケットのデータをバス102上に送り、CPU110によりソフトウェア処理させる。パケットがUDPのパケットであった場合は、そのパケットのデータをUDP処理部174に送り、UDPパケットの処理のために専用に設けられた回路により処理させる。
【0026】
UDP処理部174は、UDPパケットを処理するための専用回路であり、UDPパケットを受け取って、そのヘッダを解析し、必要な処理を実行する。セキュリティ処理部172は、データに対して暗号化処理などのセキュリティ対策が施されていた場合に、暗号を復号するなどの処理を行う。復号されたデータは、コーデック処理部140に送られる。コーデック処理部140は、圧縮符号化されていた通話音声信号を復号し、スピーカ160に出力する。
【0027】
このように、本実施の形態のインターネット電話装置100では、正確性よりもリアルタイム性が重視され、通話中、常時処理が必要となる通話音声データは、UDPにより送受信を行い、専用回路であるUDP処理部174によりハードウェア処理を行う一方、リアルタイム性よりも正確性が重視されるデータは、TCPにより送受信を行い、CPU110によりソフトウェア処理を行う。これにより、回路の複雑化、回路規模、コスト、消費電力、熱発生などの増大を抑えつつ、通話音声データを高速に処理することが可能となる。このような利点は、複数の相手と同時に通話したり、通話音声とともに画像を送信するなど、大量のデータを同時に処理することが必要な場合に、より顕著となる。また、プロトコルエンジン200によりパケットの種別を検出し、パケットの処理主体を高速かつ適切に選択することができる。さらに、CPU110の処理負担を軽減し、低コスト化、低消費電力化が実現できるほか、CPU110に余力ができるため、通話中に他のアプリケーションを実行することが可能となり、新たなサービスを提供することもできる。
【0028】
以上、パケットを受信したときの動作について説明したが、つづいて、マイク150から入力された音声信号をパケット化して送信するときの動作について説明する。マイク150から入力された音声信号は、コーデック処理部140に送られ、符号化される。符号化された信号は、必要であれば、セキュリティ処理部172により暗号化されたあと、UDP処理部174に送られ、UDPヘッダが付され、パケット化される。このUDPパケットは、プロトコルエンジン200によりチェックサム値などのヘッダ情報が付され、ネットワークインタフェース部130を介して、インターネット20に送出される。
【0029】
図2は、プロトコルエンジン200の内部構成を示す。ARP制御部202は、ネットワークインタフェース部130が自装置のIPアドレスに宛てたARP(Address Resolution Protocol)パケットを受信したときに、自動的に自装置のデータリンク層のアドレス(MACアドレス)情報をセットして応答パケットを生成し、ARPパケットの送信元へ送信する。従来は、ARPパケットもCPU110によりソフトウェア処理していたが、本実施の形態では、ARP制御部202がCPU110を介さずに自動応答することにより、CPU110の負担を大幅に軽減するとともに、割り込みによるタスクスイッチを減少させることができる。
【0030】
ヘッダ解析部210は、パケットのヘッダ情報を解析して、不要なパケットを破棄し、必要なパケットのみを通す処理を行う。たとえば、自装置のIPアドレスに宛てたパケットのみを通し、その他のIPアドレス宛てのパケットは破棄する。IPパケットのみを送受信する装置に本実施の形態のプロトコルエンジン200を搭載する場合、IP以外の通信方式のパケットを破棄してもよい。また、特定のパケットを検出して、そのパケットを処理する専用回路へ送ってもよい。本実施の形態では、UDPパケットを専用回路であるUDP処理部174により処理するので、ヘッダ解析部210は、ヘッダ情報を解析することによりUDPパケットを検出すると、そのUDPパケットをCPU110を介さずに直接UDP処理部174に転送する。このとき、ヘッダ情報を破棄してデータ部分のみを送ってもよい。これにより、ソフトウェア処理が必要なパケットのみをCPU110に処理させることができるので、CPU110の処理負担を軽減することができる。また、適宜専用のハードウェアによりパケットを処理することにより、処理の高速化を図ることができる。
【0031】
チェックサム算出部212は、パケットのチェックサムを算出し、ヘッダに格納されたチェックサム値と一致するか否かを検証する。一致した場合は、そのパケットを通し、一致しなかった場合は、そのパケットを破棄する。従来は、CPU110がチェックサムの検証を行っていたが、本実施の形態のように、CPU110に送る前の段階で専用回路にてチェックサムの検証を行うことで、CPU110に無用なパケットを処理させることを防ぎ、CPU110の処理負担を軽減することができる。
【0032】
書き込み制御部220は、ヘッダ解析部210を通過したパケットを受信バッファ230に格納する。チェックサム算出部212によりエラーが検出されたパケットは受信バッファ230に格納せずに破棄するが、チェックサム算出部212がチェックサムを算出している間、受信バッファ230への書き込みを待機しているよりも、並行して受信バッファ230へ書き込んでいくほうが効率がよい。そのため、書き込み制御部220は、ヘッダ解析部210を通過したパケットを、チェックサム算出部212による検証の結果を待たずに受信バッファ230に書き込んでいき、チェックサム算出部212による検証でエラーが検出された場合は、書き込んだパケットを消去し、ライトポインタを元に戻す。読み出し制御部240は、受信バッファ230に格納された受信パケットの読み出しを制御する。書き込み制御部220、受信バッファ230、および読み出し制御部240の構成および動作の詳細については、図4において詳述する。
【0033】
チェックサム生成部280は、送信パケットのチェックサムを算出する。UDPパケットは、送信キューに投入する時点でパケットサイズが確定しているので、チェックサム生成部280により予めデータ部のチェックサムを算出して保持しておき、パケット送出時にヘッダ合成部250によりヘッダにチェックサム値をセットする。TCPパケットは、パケット送出時にパケットサイズが確定するので、予めデータ部のチェックサム値を算出しておくことはできないが、所定の区間ごとにチェックサム累積値を算出して保持しておくことで、パケット送出時のチェックサム算出処理を簡略化することができる。TCPパケットのパケットサイズを、チェックサム累積値の算出区間の整数倍に限定すれば、データ部のチェックサム値はデータ部の区間前後のチェックサム累積値を減算するだけで得られる。
【0034】
第1送信バッファ270は、送信パケットのうち、送信先のMACアドレスが未解決のものを格納する。第2送信バッファ272は、送信パケットのうち、送信先のMACアドレスが分かっているものを格納する。ARPインタフェース260は、第1送信バッファ270に格納された、送信先のMACアドレスが不明なパケットについて、そのMACアドレスを解決すべく、ARPパケットを生成してネットワークにブロードキャストする。ARPパケットの応答が戻ってくるまでの間はそのパケットを送出できないので、アドレス解決が不要なパケットのキューとは別に第1送信バッファ270を設けて待機させておき、その間は第2送信バッファ272にて待機中のアドレス解決が不要な送信パケットを送出する。ARPの応答が戻ってくると、解決されたMACアドレスをセットして第1送信バッファ270のパケットを送出し、次に待機中のパケットについてARPパケットを送出する。そして、応答が戻るまでの間は再び第2送信バッファ272のパケットを送出する。これにより、全体の送信待ち時間を減少させ、効率良くパケットを送出することができる。また、送信先のMACアドレスが未解決のパケットであっても、第1送信バッファ270に投入しておけば自動的にMACアドレスを解決しつつパケットを送出してくれるので、CPU110側の処理が単純になり、処理負荷を軽減することができる。
【0035】
ヘッダ合成部250は、第1送信バッファ270または第2送信バッファ272に保持された送信待機中の送信パケットを、ネットワークインタフェース部130を介して送出すべく、そのパケットのヘッダ情報を生成する。ヘッダ合成部250は、頻繁に変更されないパラメータや容易に推測可能なパラメータを自動的に生成してヘッダ情報を生成する。たとえば、IPヘッダの識別子は、CPU110が指定しなくともヘッダ合成部250が自動的にインクリメントしてヘッダにセットする。CPU110は、データ以外には、送信先とパケットサイズのみを指定すればよい。これにより、CPU110のバッファ管理を単純化し、処理負荷を軽減することができる。
【0036】
ホストテーブル204は、他装置のMACアドレスおよびIPアドレスを対応付けて保持する。図3は、ホストテーブル204の内部データの例を示す。ホストテーブル204には、ホストID欄205、MACアドレス欄206、およびIPアドレス欄207が設けられている。ホストテーブル204の内容は、CPU110が予め頻繁に通信を行う可能性のあるホスト装置の情報を登録してもよいし、通信中にCPU110などが登録してもよい。MACアドレスが不明なホスト装置であっても、まずIPアドレスのみを格納しておき、ARPインタフェース260によりARPパケットを送出し、その応答を取得したときにMACアドレスを登録してもよい。ホストテーブル204を設けてあるので、CPU110は、パケットの送信先を指定するときに、ホストID、MACアドレス、IPアドレスのいずれを用いて指定してもよい。ヘッダ合成部250は、ホストテーブル204を参照して、ヘッダ生成に必要な情報を取得することができる。
【0037】
ホストインタフェース部290は、プロトコルエンジン200の構成要素とCPU110との間でデータや指示の入出力を制御する。
【0038】
図4は、書き込み制御部220および読み出し制御部240の内部構成を示す。書き込み制御部220は、管理情報生成部222、データ入れ替え部224、書き込みアドレス生成部226、遅延回路228、およびセレクタ229を備える。ヘッダ解析部210によるパケットフィルタリングを通過したパケットは、管理情報生成部222およびデータ入れ替え部224により整形されて受信バッファ230に格納される。パケットのデータが整形される様子は、図5を参照しつつ後述することにする。書き込みアドレス生成部226は、受信バッファ230のライトポインタを管理する。前述したように、チェックサム算出部212によるチェックサムの検証に並行して受信バッファ230にパケットのデータを格納していくが、チェックサムエラーが検出されたときは、書き込みアドレス生成部226は、ライトポインタを元の位置に戻す。チェックサムエラーが検出されず、受信バッファ230への格納が正常に終了すると、書き込みアドレス生成部226は、管理情報生成部222に次のパケットのアドレスを通知する。読み出し制御部240は、読み出しアドレス生成部242およびセレクタ244を備える。
【0039】
図5は、書き込み制御部220によりパケットのデータが整形される様子を示す。通常のIPパケットは、先頭のMACヘッダが14バイトを占めているが、32ビットワードでは3.5ワードと半端になるため、以降のデータが16ビットずつずれた形となる。このまま受信バッファ230に格納すると、アクセスするときに不便であるから、本実施の形態では、MACヘッダが3ワードとなるようにデータを整形してから受信バッファ230に格納する。すなわち、MACヘッダを16ビット分減らせばよい。MACヘッダのうち、宛先MACアドレスは、自装置のMACアドレスと同じであり、既にパケットを受信しているので不要である。MACアドレスは48ビットであるから、これを破棄すると、32ビット分余裕が残る。アプリケーションによっては、このパケットがユニキャスト、マルチキャスト、ブロードキャストのいずれで送信されたのかという情報が必要な場合があるので、これをフラグとして宛先MACアドレスの代わりに格納する。このフラグは2ビットで十分であるから、まだ30ビット分余裕がある。そこで、パケット種別を示すフラグや、次のパケットの格納位置を示すアドレス情報などを管理情報として格納する。以上により、MACヘッダが3ワードにおさまるので、以降のデータをワード単位で整列させることができ、アクセスが容易になる。
【0040】
図4に戻り、受信したパケットを書き込む手順と読み出す手順について説明する。管理情報生成部222は、上述した管理情報を生成する。管理情報として、たとえば、このパケットがユニキャスト、マルチキャスト、ブロードキャストのいずれで送信されたのかを示す送信種別情報、このパケットがTCPパケットかUDPパケットか、フラグメント化されたIPパケットまたはオプション付きのIPパケットなど複雑な処理を要する特殊なIPパケットであるか否か、などを示すパケット種別情報、次のパケットの格納位置を示すアドレス情報、などを生成してもよい。次パケットのアドレス情報を格納する場合は、自パケットのデータの格納が終了してから、書き込みアドレス生成部226から次パケットのアドレス情報を取得するので、管理情報の受信バッファ230への書き込みはパケットのデータの格納が完了した後になる。これらの管理情報は、全体で1ワードとなるように整形され、セレクタ229を介して受信バッファ230に格納される。
【0041】
データ入れ替え部224は、受信したパケットのデータのうち、MACアドレスを除いたデータを32ビットワードで整列させるために、上位16ビットと下位16ビットを入れ替える。データ入れ替え部224の出力のうち、上位16ビットを遅延回路228により1クロック遅延させて合成することにより、16ビットずつずれていたデータを整列させることができる。整形されたデータは、セレクタ229を介して受信バッファ230に格納される。
【0042】
書き込みアドレス生成部226は、まず、書き込み位置の先頭にポインタを移動するが、1ワード目の管理情報は最後に格納されるので、ポインタをインクリメントし、MACヘッダのうち宛先MACアドレスを除いた2ワード、IPヘッダ5ワード、IPデータを、ポインタをインクリメントしつつ次々に書き込んでいく。データ部分の書き込みが終了すると、次の書き込み開始位置を管理情報生成部222に通知し、書き込み位置の先頭にポインタを戻して、管理情報を書き込む。
【0043】
管理情報を含むヘッダ情報は、それぞれ独立したレジスタを割り当て、CPU110がランダムに何度でもアクセスできるようにする。受信バッファ230に格納されたパケットは、既にヘッダ解析部210およびチェックサム算出部212により有効性が検証されたものであるから、CPU110が直接ヘッダ情報にアクセスしてデータを渡すべきアプリケーションを判断できるようにする。他方、データ部分は、1つのアクセスポートレジスタから読み出すようにする。すなわち、アクセスポートレジスタへの最初の読み出しでは、データ部分の最初のデータが読み出され、以降、同じレジスタを連続してアクセスすることにより、データが次々に読み出される。データの転送先が決定されれば、あとはデータをコピーするだけであるから、ランダムアクセスを可能とする必要はない。したがって、アクセスポート方式を採用することにより、ポインタ管理が必要なメモリマップ方式よりも簡便で処理負担を軽減することができる。また、CPU110を持たないハードウェアと組み合わせて利用することもできる。
【0044】
受信バッファの読み出しアドレスは上位アドレスと下位アドレスから構成される。CPU110は、受信バッファ230に格納されたパケットのヘッダ情報にアクセスするときは、上位アドレスと下位アドレスの双方を指定する。上位アドレスについては、どのパケットのどのヘッダにアクセスしたいかを読み出しアドレス生成部242に指定すれば、読み出しアドレス生成部242が自動的に上位アドレスを生成してポインタを移動する。下位アドレスについては、CPU110が出力する下位アドレスをそのまま受信バッファの下位アドレスとし、CPU110が自由に読み出せるようにする。CPU110は、パケットのデータ部分にアクセスするときは、読み出しアドレス生成部242に、どのパケットのデータにアクセスしたいかを指定すればよい。読み出しアドレス生成部242は、自動的に上位アドレスと下位アドレスを生成してポインタを移動し、データを次々に読み出す。
【0045】
以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。以下、そうした例を述べる。
【0046】
実施の形態では、電話装置を例にとって説明したが、本発明の技術は、コンピュータや携帯電話など、ストリームデータを送受信する通信装置全般に利用可能である。
【0047】
プロトコルエンジン200の機能を有する回路を、一つの半導体基板上に搭載してもよい。さらに、セキュリティ処理部172、コーデック処理部140、CPU110などの回路を搭載してもよい。これにより、通信装置の小型化、軽量化、高速化を図ることができる。
【0048】
【発明の効果】
本発明によれば、データ通信に伴うパケット処理を効率よく行う技術を提供することができる。また、本発明によれば、パケット処理におけるCPUの処理負荷を軽減し、高速でリアルタイムな通信を実現する技術を提供することができる。
【図面の簡単な説明】
【図1】実施の形態に係る通信装置の一例としてのインターネット電話装置の全体構成を示す図である。
【図2】実施の形態に係るプロトコルエンジンの内部構成を示す図である。
【図3】実施の形態に係るホストテーブルの内部データを示す図である。
【図4】実施の形態に係る書き込み制御部および読み出し制御部の内部構成を示す図である。
【図5】書き込み制御部によりパケットのデータが整形される様子を示す図である。
【符号の説明】
100 インターネット電話装置、 130 ネットワークインタフェース部、 140 コーデック処理部、 150 マイク、 160 スピーカ、 174 UDP処理部、 200 プロトコルエンジン、 202 ARP制御部、 204 ホストテーブル、 210 ヘッダ解析部、 212 チェックサム算出部、 220 書き込み制御部、 222 管理情報生成部、 224 データ入れ替え部、 226 書き込みアドレス生成部、 230 受信バッファ、 240 読み出し制御部、 242 読み出しアドレス生成部、 250ヘッダ合成部、 260 ARPインタフェース、 270 第1送信バッファ、 272 第2送信バッファ、 280 チェックサム生成部。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to communication technology, and more particularly to technology for efficiently processing packets.
[0002]
[Prior art]
2. Description of the Related Art With the widespread use of the Internet and the improvement of network infrastructure, Internet telephone devices that packetize data obtained by encoding a call voice signal and transmit / receive the data via a network such as the Internet have attracted attention. By transmitting a video image simultaneously with a call voice, it can be used as a video telephone device, and is expected as a next-generation telephone device to replace a conventional telephone device.
[0003]
At present, TCP / IP (Transmission Control Protocol / Internet Protocol) is widely used as a communication protocol for packet communication. TCP is a communication protocol that emphasizes accuracy, such as transmitting and receiving data after establishing a connection between devices. However, the processing is complicated, and there is a time constraint such that the next packet cannot be sent until the other party confirms that the packet has been received, and the real-time property is lacking.
[0004]
UDP / IP (User Datagram Protocol / Internet Protocol) is a simpler communication protocol than TCP. In UDP, it is not necessary to establish a connection between devices prior to data transmission / reception, and the next packet can be sent without waiting for packet reception confirmation. Therefore, the transmitting side can send packets one after another. it can. Therefore, it is suitable for transmitting and receiving call voice, in which real-time performance is more important than data accuracy.
[0005]
In an apparatus that supports both TCP and UDP communication protocols, packet processing is generally performed by software using a general-purpose processor such as a CPU. That is, when the network interface device receives the packet, the packet addressed to the MAC (Media Access Control) address other than the own device is filtered, and after performing an error check by a CRC (Cyclic Redundancy Check), all the packets that pass through them are checked. The packet is sent to the CPU for processing.
[0006]
[Non-patent document 1]
Estee (ST) Microelectronics, Inc., Voice over IP (VoIP) digital processor datasheet, [online], 2002, [searched September 30, 2002], Internet <URL: http: // www. st. com / stonline / books / pdf / docs / 7818. pdf>
[0007]
[Problems to be solved by the invention]
However, the method of processing all packets by software using the CPU has problems such as low processing efficiency, low speed, and high power consumption. In particular, when talking with a plurality of parties at the same time or sending an image together with voice, the protocol processing is rate-determining, and the real-time property may be impaired. In addition, since the CPU always executes protocol processing during a call, it is difficult to execute other applications in parallel. For example, when communication is performed by a device equipped with a high-performance CPU, such as a personal computer, there is no problem even if the CPU performs all packet processing because it has sufficient capacity to meet the requirement. When developing a dedicated device for an Internet telephone, a relatively low-performance CPU must be mounted in order to realize a reduction in size, cost, and power consumption of the device. The issue is how to reduce the processing load of the system.
[0008]
The present invention has been made in view of such a problem, and an object of the present invention is to provide a technique for efficiently performing packet processing accompanying data communication. Another object of the present invention is to provide a technique for reducing the processing load of a CPU in packet processing and realizing high-speed real-time communication.
[0009]
[Means for Solving the Problems]
One embodiment of the present invention relates to a packet processing device. The packet processing device includes a buffer that temporarily holds a packet acquired via a network, and a write control unit that controls storage of the packet in the buffer. The destination address information in the header information is discarded and stored in the reception buffer.
[0010]
Since the destination MAC address stored in the MAC header of the packet is unnecessary for subsequent packet processing after the packet is received, discarding the destination MAC address can improve the use efficiency of the buffer.
[0011]
The write control unit may store, instead of the destination address information, management information including transmission type information indicating whether the packet was transmitted by unicast, multicast, or broadcast. The management information may further include packet type information indicating a type of the packet, and address information indicating a storage position of a next packet. The write control unit may store the management information in one word, shape subsequent data in word units, and store the data in the buffer.
[0012]
Since the MAC header is 3.5 words of 32 bits and has an odd size, if it is stored in the buffer as it is, all subsequent data will be shifted by half words. Therefore, by discarding the transmission destination MAC address for 1.5 words and storing it in the buffer, subsequent data can be aligned in word units. At this time, management information required for packet processing may be added for one word. This facilitates handling both in hardware and software.
[0017]
Yet another embodiment of the present invention relates to a telephone device. This telephone device has an input unit for inputting voice, a communication unit for transmitting voice input from the input unit to another device and receiving voice from another device, and outputting a voice received from another device. And a communication unit, wherein the communication unit includes: a reception unit that receives a packet transmitted via a network; and a packet processing unit that processes the received packet. Buffer temporarily, and a write control unit that controls the storage of the packet in the buffer, the write control unit, of the header information of the packet, discard the destination address information, The data is stored in the reception buffer.Further, the write control unit stores, in the reception buffer, management information including transmission type information indicating whether the packet was transmitted by unicast, multicast, or broadcast, instead of the discarded destination address information.
[0020]
It is to be noted that any combination of the above-described components and any conversion of the expression of the present invention between a method, an apparatus, a system, and the like are also effective as embodiments of the present invention.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 shows an overall configuration of an
[0022]
In the
[0023]
The
[0024]
Of the packets transmitted and received by the
[0025]
The packet received by the
[0026]
The
[0027]
As described above, in the
[0028]
The operation when the packet is received has been described above. Next, the operation when the audio signal input from the microphone 150 is packetized and transmitted will be described. The audio signal input from the microphone 150 is sent to the
[0029]
FIG. 2 shows an internal configuration of the
[0030]
The
[0031]
The
[0032]
The
[0033]
The
[0034]
The
[0035]
The
[0036]
The host table 204 holds a MAC address and an IP address of another device in association with each other. FIG. 3 shows an example of internal data of the host table 204. The host table 204 has a
[0037]
The
[0038]
FIG. 4 shows an internal configuration of the
[0039]
FIG. 5 shows how the packet data is shaped by the
[0040]
Returning to FIG. 4, a procedure for writing and reading a received packet will be described. The management
[0041]
The
[0042]
First, the write
[0043]
The header information including the management information is assigned to an independent register so that the
[0044]
The read address of the reception buffer is composed of an upper address and a lower address. When accessing the header information of the packet stored in the
[0045]
The present invention has been described based on the embodiments. This embodiment is an exemplification, and it is understood by those skilled in the art that various modifications can be made to the combination of each component and each processing process, and that such modifications are also within the scope of the present invention. . Hereinafter, such an example will be described.
[0046]
In the embodiments, the telephone device has been described as an example. However, the technology of the present invention can be used for all communication devices that transmit and receive stream data, such as computers and mobile phones.
[0047]
A circuit having the function of the
[0048]
【The invention's effect】
ADVANTAGE OF THE INVENTION According to this invention, the technique which performs the packet processing accompanying data communication efficiently can be provided. Further, according to the present invention, it is possible to provide a technology that reduces the processing load on the CPU in packet processing and realizes high-speed real-time communication.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an overall configuration of an Internet telephone device as an example of a communication device according to an embodiment.
FIG. 2 is a diagram showing an internal configuration of a protocol engine according to the embodiment.
FIG. 3 is a diagram showing internal data of a host table according to the embodiment.
FIG. 4 is a diagram illustrating an internal configuration of a write control unit and a read control unit according to the embodiment;
FIG. 5 is a diagram illustrating a state in which packet data is shaped by a write control unit;
[Explanation of symbols]
100 Internet telephone device, 130 network interface unit, 140 codec processing unit, 150 microphone, 160 speaker, 174 UDP processing unit, 200 protocol engine, 202 ARP control unit, 204 host table, 210 header analysis unit, 212 checksum calculation unit, 220 write control section, 222 management information generation section, 224 data exchange section, 226 write address generation section, 230 reception buffer, 240 read control section, 242 read address generation section, 250 header synthesis section, 260 ARP interface, 270 first transmission Buffer, 272 second transmission buffer, 280 checksum generator.
Claims (4)
前記パケットの前記バッファへの格納を制御する書き込み制御部と、を備え、
前記書き込み制御部は、
前記パケットのヘッダ情報のうち、送信先アドレス情報を破棄して前記受信バッファに格納し、
前記破棄した送信先アドレス情報に代えて、そのパケットがユニキャスト、マルチキャスト、ブロードキャストのいずれで送信されたかを示す送信種別情報を含む管理情報を前記受信バッファに格納することを特徴とする、パケット処理装置。A buffer for temporarily holding packets obtained via the network,
A write control unit that controls storage of the packet in the buffer,
The write control unit,
Of the header information of the packet, the destination address information is discarded and stored in the reception buffer ,
Packet processing, characterized in that the reception buffer stores management information including transmission type information indicating whether the packet was transmitted by unicast, multicast, or broadcast, in place of the discarded destination address information. apparatus.
前記入力部により入力された音声を他の装置へ送信し、他の装置から音声を受信する通信部と、
他の装置から受信した音声を出力する出力部と、を備え、
前記通信部は、
ネットワークを介して送られたパケットを受信する受信部と、
受信したパケットを処理するパケット処理部と、を含み、
前記パケット処理部は、
前記パケットを一時的に保持するバッファと、
前記パケットの前記バッファへの格納を制御する書き込み制御部と、を含み、
前記書き込み制御部は、前記パケットのヘッダ情報のうち、送信先アドレス情報を破棄して前記受信バッファに格納し、
前記破棄した送信先アドレス情報に代えて、そのパケットがユニキャスト、マルチキャスト、ブロードキャストのいずれで送信されたかを示す送信種別情報を含む管理情報を前記受信バッファに格納することを特徴とする電話装置。An input unit for inputting voice,
A communication unit that transmits voice input by the input unit to another device and receives voice from another device,
An output unit that outputs audio received from another device,
The communication unit,
A receiving unit that receives a packet sent via the network;
A packet processing unit for processing the received packet,
The packet processing unit,
A buffer for temporarily holding the packet,
A write control unit that controls storage of the packet in the buffer,
The write control unit, among the header information of the packet, discards the destination address information and stores it in the reception buffer ,
A telephone device , wherein management information including transmission type information indicating whether a packet is transmitted by unicast, multicast, or broadcast is stored in the reception buffer in place of the discarded destination address information .
Priority Applications (8)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003005100A JP3557201B2 (en) | 2003-01-10 | 2003-01-10 | Packet processing device, packet processing method, and telephone device that can use the method |
| KR1020047014902A KR100753734B1 (en) | 2002-09-30 | 2003-09-24 | Communication device and its application |
| AU2003266582A AU2003266582A1 (en) | 2002-09-30 | 2003-09-24 | Communication device and application thereof |
| KR1020077006527A KR100790673B1 (en) | 2002-09-30 | 2003-09-24 | Communication device, communication method, packet processing device and telephone device |
| CN038124793A CN1656767B (en) | 2002-09-30 | 2003-09-24 | Communication device and its application |
| PCT/JP2003/012166 WO2004036865A1 (en) | 2002-09-30 | 2003-09-24 | Communication device and application thereof |
| KR1020077018565A KR100899923B1 (en) | 2002-09-30 | 2003-09-24 | Communication device and application thereof |
| US11/003,982 US7843968B2 (en) | 2002-09-30 | 2004-12-06 | Communication apparatus and applications thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003005100A JP3557201B2 (en) | 2003-01-10 | 2003-01-10 | Packet processing device, packet processing method, and telephone device that can use the method |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004088462A Division JP4514487B2 (en) | 2004-03-25 | 2004-03-25 | Packet processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2004221795A JP2004221795A (en) | 2004-08-05 |
| JP3557201B2 true JP3557201B2 (en) | 2004-08-25 |
Family
ID=32895851
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003005100A Expired - Lifetime JP3557201B2 (en) | 2002-09-30 | 2003-01-10 | Packet processing device, packet processing method, and telephone device that can use the method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3557201B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7929410B2 (en) * | 2005-06-29 | 2011-04-19 | Interdigital Technology Corporation | Protocol engine for processing data in a wireless transmit/receive unit |
| JP4809679B2 (en) * | 2006-01-11 | 2011-11-09 | ルネサスエレクトロニクス株式会社 | Stream data communication method and stream data communication apparatus |
| JP2008283394A (en) * | 2007-05-09 | 2008-11-20 | Matsushita Electric Ind Co Ltd | Communication equipment and integrated circuit for communication |
| JP5110956B2 (en) * | 2007-05-10 | 2012-12-26 | 三菱電機株式会社 | Encryption device and decryption device |
| JP6612526B2 (en) * | 2015-05-14 | 2019-11-27 | 日本電気通信システム株式会社 | Time synchronization control device, time synchronization control system, time synchronization control method, and time synchronization control program |
| CN114499750B (en) * | 2021-11-30 | 2025-05-02 | 华为技术有限公司 | A data packet processing method, communication device and communication system |
-
2003
- 2003-01-10 JP JP2003005100A patent/JP3557201B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2004221795A (en) | 2004-08-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI406133B (en) | Data processing device and data transmission method | |
| US20050083917A1 (en) | Communication apparatus and applications thereof | |
| US20090086736A1 (en) | Notification of out of order packets | |
| TWI451725B (en) | Receiver for error-protected packet-based frame | |
| US8495241B2 (en) | Communication apparatus and method therefor | |
| JP3557201B2 (en) | Packet processing device, packet processing method, and telephone device that can use the method | |
| CN107613409A (en) | Multimedia data processing method and device | |
| JP2008517565A (en) | System and method for processing RX packets in high speed network applications using RX FIFO buffers | |
| US20090086729A1 (en) | User datagram protocol (UDP) transmit acceleration and pacing | |
| JP3988475B2 (en) | Transmitting apparatus, receiving apparatus and methods thereof | |
| JP4514487B2 (en) | Packet processing device | |
| CN115202573A (en) | Data storage system and method | |
| JP3524914B1 (en) | Checksum calculation method, checksum recording method, and communication device that can use the method | |
| JP2007195240A (en) | Packet processing apparatus and communication device | |
| JP3796251B2 (en) | Communication device | |
| JP3557202B2 (en) | Communication device, communication method, and telephone device, video telephone device, and imaging device that can use the method | |
| WO2010078802A1 (en) | Method and apparatus for reading data from a protocol stack of transmission control protocol/internet protocol | |
| KR100753734B1 (en) | Communication device and its application | |
| CN121858389A (en) | Apparatus and method for data processing | |
| JP5906078B2 (en) | Data transfer apparatus and data transfer method | |
| JP4519090B2 (en) | Transmitting apparatus, receiving apparatus and methods thereof | |
| JP2012049883A (en) | Communication device and packet processing method | |
| CN1783875B (en) | Device and method for realizing CDMA network A10/A11 interface | |
| JP2004236351A (en) | Communication method, and communication device | |
| JP4201719B2 (en) | Communication device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040427 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040514 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 3557201 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080521 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090521 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090521 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100521 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110521 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120521 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130521 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130521 Year of fee payment: 9 |
|
| EXPY | Cancellation because of completion of term |