Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Packet Classification in Virtex-5

Status
Not open for further replies.

aquanaut

Junior Member level 1
Joined
Jul 3, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,398
Hi,

I want to implement packet classification based on ETHERNET/IP/UDP/TCP packets. So during search I found that CAM core can be used for classification.
But it has limitation that it can not classify range of data which is main thing for classification in design.

Is there any possible solution for this? If there is, please suggest.

I'm using Xilinx's Virtex 5 device.
 

Hi,

I want to implement packet classification based on ETHERNET/IP/UDP/TCP packets. So during search I found that CAM core can be used for classification.
But it has limitation that it can not classify range of data which is main thing for classification in design.

Is there any possible solution for this? If there is, please suggest.

I'm using Xilinx's Virtex 5 device.

A FSM to parse the headers. A CAM will just be slow in an FPGA as all of them use latency (i.e. cycle through all addresses searching for the data) to produce the address of the data. It's a whole lot easier to design an FSM to cycle through the headers and decided if the packet is the something you need to deal with or drop.

Regards
 

A FSM to parse the headers. A CAM will just be slow in an FPGA as all of them use latency (i.e. cycle through all addresses searching for the data) to produce the address of the data. It's a whole lot easier to design an FSM to cycle through the headers and decided if the packet is the something you need to deal with or drop.

Regards

Thanks for your reply....
My implementation is bit different, let me explain it. Here I want to classify the incoming packets into different streams based on filter conditions. These conditions may be based on IP source/destination address, TCP/UDP source/destination port number, protocol etc header fields. These conditions may be static or in range. For example,

Stream 1
IP src address = 192.168.0.0
IP dst address = 192.168.0.2
src port = 80
dst port = 23
protocol = Any

Stream 2
IP src address = 192.168.1.0
IP dst address = 192.168.1.2
src port = 21
dst port = Any between 50 and 2000
protocol = Any

All other packets will be dropped. Here I have taken example of two streams but it can be more.
Also I have attached an image here.
**broken link removed**

Thanks & Regards
 

Thanks for your reply....
My implementation is bit different, let me explain it. Here I want to classify the incoming packets into different streams based on filter conditions. These conditions may be based on IP source/destination address, TCP/UDP source/destination port number, protocol etc header fields. These conditions may be static or in range. For example,

Stream 1
IP src address = 192.168.0.0
IP dst address = 192.168.0.2
src port = 80
dst port = 23
protocol = Any

Stream 2
IP src address = 192.168.1.0
IP dst address = 192.168.1.2
src port = 21
dst port = Any between 50 and 2000
protocol = Any

All other packets will be dropped. Here I have taken example of two streams but it can be more.
Also I have attached an image here.
**broken link removed**

Thanks & Regards
A CAM will work in this situation, especially if you have a large number of possible streams you are filtering. The CAM will really be implemented in the FPGA as a memory search.

To deal with the range you need to include in the CAM the upper/lower bounds of the range and the CAM search will include logic to use the range to determine if the packet is passed. You should also include a bit-field that has enables for each header field you can classify on, so you can enable/disable classification on that header field.

Either using a CAM/search or using an FSM will both work, I've used both methods depending on how big a list of filters I had to deal with.
 

I thought of mapping range into CAM but I'm stuck at mapping any range to CAM. Especially, I need to map range for IP Src/Dst addr (32+32bit), VLAN (12bit), MPLS (20bit) and TCP/UDP Src/Dst port number (16+16bit) fields.

Can mapping using single bit map all the possible ranges for given fields? If it is possible can you please elaborate it?

I went through some papers on this but they all have their own limitations, some have memory limitations, other have limited ranges etc.

Thanks
 

I thought of mapping range into CAM but I'm stuck at mapping any range to CAM. Especially, I need to map range for IP Src/Dst addr (32+32bit), VLAN (12bit), MPLS (20bit) and TCP/UDP Src/Dst port number (16+16bit) fields.
I suggest not building a CAM in the FPGA. There are a couple of ways to implement a CAM or CAM-like function in an FPGA. 1. Throw memory at it until you can have an address that matches the data width (32+32+12+20+16+16 bits in your case), which is hardly practical. 2. Search a memory to find an entry that matches the data. To shorten search times you can add more search memories that will run in parallel.

Using the second method you will need an upper and lower range value for each of the fields you are comparing against.
IP Src upper/ IP Src lower
Dst addr upper/ Dst addr lower
...
TCP/UDP Src/Dst upper/lower

How you map these ranges into a memory is up to you either as a single very wide entry or multiple addresses for each entry. The trade-off is width v.s. latency. I would include the enable/disable field flag in this memory along with what ever data you may need that is based on a matched classification.

Can mapping using single bit map all the possible ranges for given fields? If it is possible can you please elaborate it?
the single bit per field is to enable disable the field from the classification. (i.e. disable any comparisons between the field and a packet that might not be needed, like when you aren't searching for a VLAN because there is no VLAN field in the header).
 

I'm still not clear about range mapping...

For simplicity, lets use TCP/UDP destination port number (16 bit) for classification. Its of 16 bits so 0 to 65535 are the possible values. Now if I want to classify packets (only using this field, ignore other fields) with "any range", lets say..

stream 1 - 1 to 329
stream 2 - 23 to 90
stream 3 - 4323 to 7103
stream 4 - 50000 to 60000

So how will you map these stream ranges (upper/lower) to filter practically?

Thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top