Project Title

Ringmap Capturing Stack for High Performance Packet Capturing in FreeBSD


Project Description

Packet capturing in high-speed networks is not an easy task due to the system limitations such as RAM and system bus throughput. Unfortunately, it is often impossible to capture every packet arriving at the network interface. Hardware may not be the only bottleneck, however, as inefficient software is also to blame for poor resources usage and the resulting packet loss during capture.

The new ringmap capturing stack for FreeBSD already allows for efficient capturing at 1GBit/sec on commodity hardware with very low packet loss and low system load. Under similar conditions, with Intel 1GbE cards and 64 bytes packets, the standard capturing software of FreeBSD-7.x during capturing generates a system load of up to 100% and results in close to 100% packet loss.

Similar to "zero-copy BPF" implementation, our idea is to eliminate packet copy operations by using shared memory buffers. However, unlike the "zero-copy BPF" model, ringmap eliminates all packet copies during capturing: the network adapter's DMA buffer is mapped directly into the user-space. Ringmap also adapts libpcap accordingly to provide user-space applications with access to the captured packets without any additional overhead.


Tasks for GSoC-2010


Project Schedule

May 24 - May 28: Ringmap refactoring
  • Refactoring ringmap code to achieve more portability

    • I'm planning at first to split out the existing ringmap code into hardware-dependent and hardware-independent code. This will first be done by splitting the data structures and then the functions. This must be done because the present ringmap code was implemented only for em-driver and only for one type of Ethernet controller, and as a result the hardware-dependent and -independent data is mixed together within the same structures. Moreover, I have to extend the existing data structures to make the ringmap code more portable.


May 31 - June 4: Porting ringmap to FreeBSD-CURRENT
  • Installing FreeBSD-8 and update it to CURRENT
  • Porting ringmap to FreeBSD-CURRENT


June 7 - June 20: Porting ringmap'' to 10Gb
  • The ringmap capturing stack is currently based on em-driver and is usable only with Intel 1Gb Ethernet adapters. Therefore, the goal is to modify the ringmap capturing stack for the 10Gb Ethernet Intel network adapters based on 82598 and 82599 processors. To achieve this goal, the ringmap code must be ported to ixgbe-driver. To do it I will first insert the "hooks" for ringmap functionalities into the ixgbe-driver code (through #ifdef). The first places where I will port the ringmap functions are "attach" and "detach" functions of ixgbe-driver. In addition to their ordinary tasks, these functions must be able to allocate and deallocate the ringmap data structures properly. After this step I will begin porting most complicated part of the code that has to be executed as a result of interrupt.


June 21 - June 23: Debugging
  • These three days should be for debugging the code and also for implementing in case I didn't manage something in previous steps


June 24 - July 4: Functionality tests
  • Deploying a tesbed network of three hosts and implementing the software for tests control and measurements (the software is already partly implemented). These three hosts should be for:
    • Traffic generation
      • OS Linux. Will be done using Linux Kernel Packet Generator
    • Capturing
      • OS FreeBSD. ringmap vs. standard FreeBSD capturing software

    • Test control
      • Scripts for the central coordination of tests
  • Conducting experiments


July 5 - July 16: Porting ringmap to FreeBSD-8
  • This step will be the port to FreeBSD-8, but it requires that all previous steps are finished (at least the coding part, but not necessarily all testing work)


July 19 - July 23: Functionality and Performance Tests
  • Functionality test and cosmetic debugging of FreeBSD-8 ringmap capturing stack.

  • Conducting performance analysis and evaluation between the standard packet capturing stack of FreeBSD-8 and ringmap. To perform effective performance evaluation, several servers for traffic generation will be used together in order to reach greater-than 1Gibt/sec traffic.


July 26 - August 15: Documentation and the remaining work
  • Debugging, implementing small requested features, documentation


External Links

...

AlexandreFiveg/SOC2010AlexandreFiveg (last edited 2022-10-27T04:05:15+0000 by KubilayKocak)