At the time of this writing, there are a few switches that are supported by OpenWrt. Most of them are based on a Realtek RTL83xx or RTL93xx SoC that features at least:
A list of supported switches can be found in this Table of Hardware view.
You cannot replace your router by a switch running OpenWrt if you need routing performance above 15-20MBit/s
The hardware in these switches was designed for switching ethernet packets on L2. That means that the traffic does not pass through the CPU under normal circumstances, it is all handled by the switch fabric. While OpenWrt has all required packages available to turn them into routers, the performance is very low as the packets now need to pass the CPU.
In addition, the CPU does not have any optimizations for packet processing - something that router SoCs usually include.
You can expect about 20Mbit/s routing performance with such a switch being used as a router. The CPU interface of the switch is really only meant for running the configuration web interface.
Some Forum references:
There are still a number of valid reasons to run OpenWrt on the switch:
Yes, there are a few drawbacks: There are some features that do not work or do not work properly (like link aggregation). Depending on the switch, some other features might be missing, check the commit message for your device and/or the wiki page for your device for details.
Some switches have limitations like:
…while on other switches all of these features are supported.