GPUs don't have access to any hardware connected to the host.
The typical execution for GPU programs is:
- data transferred from host memory to GPU device memory
- GPU device does some processing
- data transferred back from GPU device memory to host memory
and then the host does something useful with the data such as displaying it to the user or saving to file.
Memory transfer is not cost-free, so typically you need to accumulate enough data and then send it to the GPU device to make it worthwhile.
Something else to consider is that GPU devices are data parallel (as opposed to task parallel). Unlike CPUs, which can run different code in parallel, GPUs run the same code in parallel on different data. This makes them poor at doing things like being a web server, but great for certain scientific and mathematical problems where a problem can be parallelized.
If you need low-latency network packet processing, GPUs are unlikely to be suitable. You would need to:
- receive the network packet
- send it to the GPU (some latency)
- process on GPU
- send back to host (more latency)
The only way for GPUs to be feasible would be either if:
- a single packet analysis could be parallelized into many smaller chunks
- you are willing to wait for many network packets to come in and analyze a whole lot of them at once