Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command-line argument for debugging purposes (-dm) and only print the last_size info when debug is enabled #324

Merged
merged 2 commits into from
Nov 24, 2014

Commits on Nov 19, 2014

  1. main.lua: Add command-line argument for debugging purposes.

      * -dm = Enable developer mode. Enables debug prints and asserts.
    
      * This sets to true a global variable _G.developer_debug that can be
        used on the rest of snabswitch to enable prints, asserts or other
        things that are not intended for production.
    
      * Make all other parts of snabswitch where a debug variable was used
        (or should be used) to depend on this one.
    clopez committed Nov 19, 2014
    Configuration menu
    Copy the full SHA
    ab45904 View commit details
    Browse the repository at this point in the history
  2. Only print the last_size when debug is enabled (./snabbswitch -dm).

     * This code starts triggering on a kernel >= 3.14 (Ubuntu 14.04 uses
       3.13, so this went unnoticed). It causes a lot of flood because it
       triggers constantly.
    
     * Example of the output from snabswitch when running same_vlan.ports
       with both VMs running Kernel 3.14.23 and running an iperf test
       (MTU 1500) between both VMs:
    
          size=  2036
          size=  1524
          size=  2036
          size=  1524
          size=  2036
          size=  1524
          [ .... repeated ad-infinitum ]
    
     * I have bisected the Linux kernel, the commit that causes this print to
       trigger is fb51879dbceab9c40a39018d5322451691909e15 (merged on 3.14)
       https://git.kernel.org/linus/fb51879
    clopez committed Nov 19, 2014
    Configuration menu
    Copy the full SHA
    979af8c View commit details
    Browse the repository at this point in the history