Communication device and two-phase packet parser enhancement method with loopback unit
AssigneeRealtek Semiconductor Corp.
InventorYu-Hsiu Lin
Life of this patent
Estimating the term…
Abstract
A communication device includes a first parser circuit, a second parser circuit, and a forwarding circuit. The first parser circuit is configured to parse first data in a packet based on a tunneling protocol to obtain first parsing information and an offset value. The second parser circuit is configured to parse second data in the packet according to the offset value to obtain second parsing information, in which the offset value is utilized to indicate a starting position of the second data in the packet. The forwarding circuit is configured to forward the packet according to the first parsing information and the second parsing information.
Claims19
A communication device, comprising:
- a first parser circuit configured to parse first data in a packet based on a tunneling protocol to obtain first parsing information and an offset value;
- a second parser circuit configured to parse second data in the packet according to the offset value to obtain second parsing information, wherein the offset value is utilized to indicate a starting position of the second data in the packet;
- and
- a forwarding circuit configured to forward the packet according to the first parsing information and the second parsing information,
- wherein if a sum of the offset value and a data size of the second data exceeds a first predetermined value, the forwarding circuit is configured to truncate the first data from the packet according to the offset value and forward the packet back to the second parser circuit via a loopback unit to obtain the second parsing information.
A packet processing method, comprising:
- parsing, by a first parser circuit, first data in a packet based on a tunneling protocol and generating an offset value to obtain first parsing information;
- parsing, by a second parser circuit, second data in the packet according to the offset value to obtain second parsing information, wherein the offset value is utilized to indicate a starting position of the second data in the packet;
- forwarding the packet according to the first parsing information and the second parsing information;
- and
- if a sum of the offset value and a data size of the second data exceeds a first predetermined value, truncating the first data from the packet according to the offset value, and forwarding the packet back to the second parser circuit via a loopback unit to obtain the second parsing information.
A communication device, comprising:
- a first parser circuit configured to parse first data in a packet based on a tunneling protocol to obtain first parsing information and an offset value;
- a second parser circuit configured to parse second data in the packet according to the offset value to obtain second parsing information, wherein the offset value is utilized to indicate a starting position of the second data in the packet;
- and
- a forwarding circuit configured to forward the packet according to the first parsing information and the second parsing information,
- if a data size of the first data exceeds a predetermined value or the first data comprises a header that is unable to be parsed by the first parser circuit, the second parser circuit is further configured to parse the first data to obtain the first parsing information, and the forwarding circuit is configured to truncate the first data from the packet according to the offset value and forward the packet back to the second parser circuit via a loopback unit to obtain the second parsing information.
Dependencies are inferred from the claim text.