Self-driving networks, i.e., networks driven by real-time analytics performed on data at line-rate guided by programmatic control, can help to ensure better network security and aid with performance diagnosis and repair. Realizing such a network often require machine learning (ML) inferencing algorithms (e.g., to detect anomalous traffic). Unfortunately, as network bandwidth grows to hundreds of gigabits to even terabits per second, it is challenging to analyze network traffic at line rates today. Many production intrusion detection systems rely on out-of-band analysis resulting in slow reaction times that may take the order of minutes to resolve security issues besides requiring significant bandwidth to export data from routers. This project is tackling the challenge of inline traffic analysis using programmable switches and programmable hardware.