1. 09 3月, 2020 23 次提交
  2. 07 3月, 2020 10 次提交
  3. 06 3月, 2020 7 次提交
    • D
      Merge branch 'tun-debug' · 425c075d
      David S. Miller 提交于
      Michal Kubecek says:
      
      ====================
      tun: debug messages cleanup
      
      While testing ethtool output for "strange" devices, I noticed confusing and
      obviously incorrect message level information for a tun device and sent
      a quick fix. The result of the upstream discussion was that tun driver
      would rather deserve a more complex cleanup of the way it handles debug
      messages.
      
      The main problem is that all debugging statements and setting of message
      level are controlled by TUN_DEBUG macro which is only defined if one edits
      the source and rebuilds the module, otherwise all DBG1() and tun_debug()
      statements do nothing.
      
      This series drops the TUN_DEBUG switch and replaces custom tun_debug()
      macro with standard netif_info() so that message level (mask) set and
      displayed using ethtool works as expected. Some debugging messages are
      dropped as they only notify about entering a function which can be done
      easily using ftrace or kprobe.
      
      Patch 1 is a trivial fix for compilation warning with W=1.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      425c075d
    • M
      tun: drop TUN_DEBUG and tun_debug() · 5af09071
      Michal Kubecek 提交于
      TUN_DEBUG and tun_debug() are no longer used anywhere, drop them.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5af09071
    • M
      tun: replace tun_debug() by netif_info() · 3424170f
      Michal Kubecek 提交于
      The tun driver uses custom macro tun_debug() which is only available if
      TUN_DEBUG is set. Replace it by standard netif_ifinfo(). For that purpose,
      rename tun_struct::debug to msg_enable and make it u32 and always present.
      Finally, make tun_get_msglevel(), tun_set_msglevel() and TUNSETDEBUG ioctl
      independent of TUN_DEBUG.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3424170f
    • M
      tun: drop useless debugging statements · 18209434
      Michal Kubecek 提交于
      Some of the tun_debug() statements only inform us about entering
      a function which can be easily achieved with ftrace or kprobe. As
      tun_debug() is no-op unless TUN_DEBUG is set which requires editing the
      source and recompiling, setting up ftrace or kprobe is easier. Drop these
      debug statements.
      
      Also drop the tun_debug() statement informing about SIOCSIFHWADDR ioctl.
      We can monitor these through rtnetlink and it makes little sense to log
      address changes through ioctl but not changes through rtnetlink. Moreover,
      this tun_debug() is called even if the actual address change fails which
      makes it even less useful.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18209434
    • M
      tun: get rid of DBG1() macro · 7522416d
      Michal Kubecek 提交于
      This macro is no-op unless TUN_DEBUG is defined (which requires editing and
      recompiling the source) and only does something if variable debug is 2 but
      that variable is zero initialized and never set to anything else. Moreover,
      the only use of the macro informs about entering function tun_chr_open()
      which can be easily achieved using ftrace or kprobe.
      
      Drop DBG1() macro, its only use and global variable debug.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7522416d
    • M
      tun: fix misleading comment format · 516c512b
      Michal Kubecek 提交于
      The comment above tun_flow_save_rps_rxhash() starts with "/**" which
      makes it look like kerneldoc comment and results in warnings when
      building with W=1. Fix the format to make it look like a normal comment.
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      516c512b
    • R