Written October 2026, looking back at Career4 min read
Four months in Kanata
My first internship, at Nokia, writing C++ for a packet-inspection test harness, SIMD signature matching, and the CI that kept test networks honest.
From Nokia · Jan 2023 – Apr 2023
My first internship was at Nokia in Kanata, from January to April 2023, hybrid, on a team that works on network traffic at high throughput. It was four months, so this is a short post, but it was the first time my code ran somewhere that mattered.
The work
Most of my time went into C++ on a deep packet inspection (DPI) test harness. DPI looks inside network packets to work out what protocol or application they belong to. The harness generates and captures traffic so you can check that the classification is correct, at the speeds it has to run at.
A few pieces I worked on:
- Zero-copy rings and per-core queues. At line rate, copying every packet is expensive and sharing one queue across cores turns into lock contention. Packets stay in one shared buffer and get passed by reference, and each core gets its own queue. That's where most of the "how do we not drop packets under a burst" problem lives.
- SIMD signature matching. Classifying a packet means comparing its bytes against a set of known signatures. The straightforward version is a long chain of branches per signature. With AVX2, one instruction compares 32 bytes at once, filtering candidate signatures quickly before an exact check confirms a match. That's faster and, just as importantly, more predictable in latency than a branch per signature.
- A plugin interface. New protocol signatures could be added without touching or rebuilding the capture path, which made the harness useful to more than one team.
- CI for test environments. I helped automate spinning up the Docker and Kubernetes test networks through Jenkins, so testing didn't depend on someone setting up an environment by hand. I also wrote some Python automation against Jira's API for routing and updating tickets.
For a sense of why those details matter, here's the budget at a common line rate. A 10 Gb/s link carrying minimum-size Ethernet frames delivers about 14.88 million packets per second (each 64-byte frame takes 84 bytes on the wire once the preamble and inter-frame gap are counted, and 10^10 / (84 x 8) ≈ 14.88M). That leaves one core about 67ns per packet, roughly 200 cycles at 3 GHz, for everything: receiving it, queueing it, and classifying it. A single mispredicted branch costs on the order of 15 to 20 cycles on a modern x86 core, so a matcher that mispredicts a handful of times per packet has spent a large share of the budget before doing any real work. A copy of each packet, or a lock shared by every core, has the same problem at a larger scale. That's the arithmetic behind all three choices: pass by reference, give each core its own queue so no cache line is written by two cores, and make the matcher's cost independent of what the bytes are.
The core of a filter like that is small. Load 32 bytes of the packet into one 256-bit register, compare them against 32 bytes of a broadcast signature byte in one instruction (_mm256_cmpeq_epi8), and collapse the result into a 32-bit mask (_mm256_movemask_epi8), one bit per byte position. A zero mask means no candidate anywhere in those 32 bytes, decided with one branch. Only the positions whose bits are set go on to the exact comparison, which is the expensive part and now runs rarely.
What I took from it
Trust the harness before the speedup. A faster matcher is only worth anything if you can show it's still correct and show the before and after on a setup that doesn't lie to you. That habit, measure first and write the baseline down, is the one I've carried into everything since.
Big-O isn't the whole story. In school I thought about complexity. On this team people thought about cache lines, branches, and memory traffic. None of that shows up in big-O, and all of it shows up in a profile.
Process has scars behind it. Reviews were thorough, and test stages existed because at some point someone had broken something important. I came in thinking the job was about being clever. I left thinking it's mostly about being careful in a way other people can verify.
After it came more school, and then IBM, where I learned how services, rather than packets, fail.