Live data from Hacker News

Liberouter Combo Cards – FPGA boards focused on network data processing

liberouter.org

31–36 of 36 posts

Re: Liberouter Combo Cards – FPGA boards focused on network data processing

#31

Earlier quoted context omitted.

Generally speaking, FPGAs are for building hardware pipelines with fixed throughput and finite state machines to control things. If your first thought is "Linux", you're almost certainly better off with an off the shelf SoC. If you have a well understood problem (say, filtering packets based on a handful of patterns), you would design a filtering pipeline that would connect between two Ethernet MACs, applying the fil…

The "connecting two ethernet MACs [with] filtering" seems like an interesting project. I guess a "simple" (and possibly useless) idea could be to do filtering based on MAC addresses in the enthernet frame. Is there open IP for this? I guess I'm asking how a hobbyist gets into this :-) If anyone knows of an existing project, I'd appreciate a pointer.

In actual fact for Xilinx based FPGA's this is quite straightforward. An example for 10G Base R:

You can get Xilinx's component for their pma/pcs for 10g base-r ethernet for free from vivado and stick one of the macs from open cores on the end of it (probably this: http://opencores.org/project,xge_ll_mac - I used it for prototyping and it seems to work (before creating my own pcs/pma block and mac to cut down the latency)

Once you have that, then you would need to deal with the ethernet frames streaming through the FPGA, probably 64-bits at a time at 156MHz for 10G, so you need to pull out the fields you are interested in (like mac addresses, ip addresses, etc). You can buffer the incoming packet into a FIFO whilst waiting for the stuff you want to filter on. Once you have all your fields you can decide whether you want to pass the packet through to the tx side or not (I usually read the packet out of the FIFO either way and just hold the valid low for packets I don't want to send).

Hope this makes sense!

Re: Liberouter Combo Cards – FPGA boards focused on network data processing

#32

Earlier quoted context omitted.

Yeah, it would have an advantage: you could deploy it without spending hundreds of thousands of dollars on ASIC production or prototyping. It's the main use for FPGA's. They're better so long as unit price is cheaper than masks and such for ASIC's. In this case, each customer would have a relatively small number of the switches where volume doesn't justify an ASIC. Might be enough switches & customers to justify lice…

Alternatively you can also re-configure the FPGA for specific loads where ASIC is always fixed. Downside is of course lower speed and higher power consumption.

I shouldve mentioned that. Tks for catch. Reconfiguration is huge selling poinf for them. Gone from HTTP 1 to 1.1 or 2.0? Just upload the new bitstream. Got a better algorithm or bug fix? Upload new bitstream.

ASIC folks be like, "You gonna neef to bring a soldering iron for that update. Or buy our latest model." Haha.

Re: Liberouter Combo Cards – FPGA boards focused on network data processing

#33
post #27

Earlier quoted context omitted.

Dont be fooled by the appearance of VHDL/Verilog. you are building hardware with them. So writing a TCP/IP stack in VHDL would be almost like physically building a TCP/IP stack with physical logic gate IC's. I looked into this a few years ago. If you can settle for just sending bytes on an ethernet cable, you can relatively easily TX/RX using UDP Multicast. The FPGA can beam bits straight to the PHY adapter and out t…

> you are building hardware with them Actually, not quite, not with FPGA. Sure, you can use an HDL to synthesize a custom microchip, in which case you indeed would be "building hardware", but you can also target an FPGA specifically, in which case you would essentially be programming a kind of a computer in a way similar to how it was done on those (early) switchboard-based computers that were configured by manually…

The early computers (for the most part) were von Neumann architecture machines just like modern computers, with an instruction pointer, registers, branching, and so forth that most people associate with conventional software development.

FPGAs are a undifferentiated sea of configurable logic gates with configurable connections between them[0]; it's not quite wiring together bare transistors but it's not that far removed either. None of the elements of a von Neumann architecture are there; if a engineer wants any of those things in their design, they would have to assemble it themselves from the available gates[1]. So, no, building a design for a FPGA has little to do with programming in the sense that most people mean it.

[0] With various special function blocks interspersed at regular intervals depending on the manufacturer and model of the FPGA

[1] or buy a pre-made soft-IP core

Re: Liberouter Combo Cards – FPGA boards focused on network data processing

#34
Amazon announced they were doing network processing in hardware at Re:work last week [1].

Custom silicon, rather than the FPGA or ASICS they were using when they started the project in 2012.

They tout not only the freed CPU resources, but lower latencies and increased security of isolating the networking from the CPUs running hosted VMs.

https://youtu.be/AyOAjFNPAbA?t=1822

Re: Liberouter Combo Cards – FPGA boards focused on network data processing

#35
post #27

Earlier quoted context omitted.

> you are building hardware with them Actually, not quite, not with FPGA. Sure, you can use an HDL to synthesize a custom microchip, in which case you indeed would be "building hardware", but you can also target an FPGA specifically, in which case you would essentially be programming a kind of a computer in a way similar to how it was done on those (early) switchboard-based computers that were configured by manually…

The early computers (for the most part) were von Neumann architecture machines just like modern computers, with an instruction pointer, registers, branching, and so forth that most people associate with conventional software development. FPGAs are a undifferentiated sea of configurable logic gates with configurable connections between them[0]; it's not quite wiring together bare transistors but it's not that far remo…

> little to do with programming in the sense that most people mean it

No disagreement here, but see, e.g., http://fpgacenter.com/fpga/fpga_prg.php.

Re: Liberouter Combo Cards – FPGA boards focused on network data processing

#36
post #28

Earlier quoted context omitted.

Yeah, it would have an advantage: you could deploy it without spending hundreds of thousands of dollars on ASIC production or prototyping. It's the main use for FPGA's. They're better so long as unit price is cheaper than masks and such for ASIC's. In this case, each customer would have a relatively small number of the switches where volume doesn't justify an ASIC. Might be enough switches & customers to justify lice…

At Azure scale, ASICs would definitely be cheaper but they're still using FPGAs for the flexibility. OTOH AWS is using ASICs so we can see that different clouds have made different tradeoffs.

Probably. Azure scale is a rare example, though. Most of the time a company will be much lower volume. They might consider S-ASIC's like at eASIC before ASIC's. Prototyping cost at eASIC can be as cheap as $50,000 per some writeups thanks to the eBeam machine. With low costs, they're easier to swap out than full on ASIC's too.
Post reply on HN