1. 28 9月, 2011 1 次提交
  2. 10 6月, 2011 1 次提交
    • G
      rtnetlink: Compute and store minimum ifinfo dump size · c7ac8679
      Greg Rose 提交于
      The message size allocated for rtnl ifinfo dumps was limited to
      a single page.  This is not enough for additional interface info
      available with devices that support SR-IOV and caused a bug in
      which VF info would not be displayed if more than approximately
      40 VFs were created per interface.
      
      Implement a new function pointer for the rtnl_register service that will
      calculate the amount of data required for the ifinfo dump and allocate
      enough data to satisfy the request.
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c7ac8679
  3. 23 4月, 2011 1 次提交
  4. 28 3月, 2011 1 次提交
  5. 13 3月, 2011 2 次提交
  6. 26 2月, 2011 1 次提交
  7. 04 2月, 2011 1 次提交
  8. 18 11月, 2010 1 次提交
  9. 06 10月, 2010 1 次提交
    • E
      net: add a core netdev->rx_dropped counter · caf586e5
      Eric Dumazet 提交于
      In various situations, a device provides a packet to our stack and we
      drop it before it enters protocol stack :
      - softnet backlog full (accounted in /proc/net/softnet_stat)
      - bad vlan tag (not accounted)
      - unknown/unregistered protocol (not accounted)
      
      We can handle a per-device counter of such dropped frames at core level,
      and automatically adds it to the device provided stats (rx_dropped), so
      that standard tools can be used (ifconfig, ip link, cat /proc/net/dev)
      
      This is a generalization of commit 8990f468 (net: rx_dropped
      accounting), thus reverting it.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      caf586e5
  10. 21 9月, 2010 1 次提交
  11. 07 6月, 2010 2 次提交
  12. 26 5月, 2010 1 次提交
  13. 18 5月, 2010 1 次提交
  14. 11 5月, 2010 6 次提交
    • P
      ipv6: ip6mr: add support for dumping routing tables over netlink · 5b285cac
      Patrick McHardy 提交于
      The ip6mr /proc interface (ip6_mr_cache) can't be extended to dump routes
      from any tables but the main table in a backwards compatible fashion since
      the output format ends in a variable amount of output interfaces.
      
      Introduce a new netlink interface to dump multicast routes from all tables,
      similar to the netlink interface for regular routes.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      5b285cac
    • P
      ipv6: ip6mr: support multiple tables · d1db275d
      Patrick McHardy 提交于
      This patch adds support for multiple independant multicast routing instances,
      named "tables".
      
      Userspace multicast routing daemons can bind to a specific table instance by
      issuing a setsockopt call using a new option MRT6_TABLE. The table number is
      stored in the raw socket data and affects all following ip6mr setsockopt(),
      getsockopt() and ioctl() calls. By default, a single table (RT6_TABLE_DFLT)
      is created with a default routing rule pointing to it. Newly created pim6reg
      devices have the table number appended ("pim6regX"), with the exception of
      devices created in the default table, which are named just "pim6reg" for
      compatibility reasons.
      
      Packets are directed to a specific table instance using routing rules,
      similar to how regular routing rules work. Currently iif, oif and mark
      are supported as keys, source and destination addresses could be supported
      additionally.
      
      Example usage:
      
      - bind pimd/xorp/... to a specific table:
      
      uint32_t table = 123;
      setsockopt(fd, SOL_IPV6, MRT6_TABLE, &table, sizeof(table));
      
      - create routing rules directing packets to the new table:
      
      # ip -6 mrule add iif eth0 lookup 123
      # ip -6 mrule add oif eth0 lookup 123
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      d1db275d
    • P
      6bd52143
    • P
      f30a7784
    • P
      ipv6: ip6mr: remove net pointer from struct mfc6_cache · b5aa30b1
      Patrick McHardy 提交于
      Now that cache entries in unres_queue don't need to be distinguished by their
      network namespace pointer anymore, we can remove it from struct mfc6_cache
      add pass the namespace as function argument to the functions that need it.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      b5aa30b1
    • P
      ipv6: ip6mr: move unres_queue and timer to per-namespace data · c476efbc
      Patrick McHardy 提交于
      The unres_queue is currently shared between all namespaces. Following patches
      will additionally allow to create multiple multicast routing tables in each
      namespace. Having a single shared queue for all these users seems to excessive,
      move the queue and the cleanup timer to the per-namespace data to unshare it.
      
      As a side-effect, this fixes a bug in the seq file iteration functions: the
      first entry returned is always from the current namespace, entries returned
      after that may belong to any namespace.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      c476efbc
  15. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  16. 27 3月, 2010 1 次提交
  17. 25 3月, 2010 1 次提交
  18. 20 3月, 2010 1 次提交
  19. 29 10月, 2009 1 次提交
  20. 19 10月, 2009 1 次提交
    • E
      inet: rename some inet_sock fields · c720c7e8
      Eric Dumazet 提交于
      In order to have better cache layouts of struct sock (separate zones
      for rx/tx paths), we need this preliminary patch.
      
      Goal is to transfert fields used at lookup time in the first
      read-mostly cache line (inside struct sock_common) and move sk_refcnt
      to a separate cache line (only written by rx path)
      
      This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
      sport and id fields. This allows a future patch to define these
      fields as macros, like sk_refcnt, without name clashes.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c720c7e8
  21. 01 10月, 2009 1 次提交
  22. 23 9月, 2009 1 次提交
  23. 15 9月, 2009 1 次提交
  24. 02 9月, 2009 2 次提交
  25. 01 9月, 2009 1 次提交
  26. 06 7月, 2009 1 次提交
  27. 14 6月, 2009 1 次提交
    • T
      PIM-SM: namespace changes · 403dbb97
      Tom Goff 提交于
      IPv4:
        - make PIM register vifs netns local
        - set the netns when a PIM register vif is created
        - make PIM available in all network namespaces (if CONFIG_IP_PIMSM_V2)
          by adding the protocol handler when multicast routing is initialized
      
      IPv6:
        - make PIM register vifs netns local
        - make PIM available in all network namespaces (if CONFIG_IPV6_PIMSM_V2)
          by adding the protocol handler when multicast routing is initialized
      Signed-off-by: NTom Goff <thomas.goff@boeing.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      403dbb97
  28. 03 6月, 2009 1 次提交
  29. 31 1月, 2009 1 次提交
  30. 28 1月, 2009 1 次提交
    • T
      IPv6: Fix multicast routing bugs. · 1d6e55f1
      Thomas Goff 提交于
      This patch addresses the IPv6 multicast routing issues described
      below.  It was tested with XORP 1.4/1.5 as the IPv6 PIM-SM routing
      daemon against FreeBSD peers.
      
      net/ipv6/ip6_input.c:
      
        - Don't try to forward link-local multicast packets.
      
        - Don't reset skb2->dev before calling ip6_mr_input() so packets can
          be identified as coming from the PIM register vif properly.
      
      net/ipv6/ip6mr.c:
      
        - Fix incoming PIM register messages processing:
      
          * The IPv6 pseudo-header should be included when checksumming PIM
            messages (RFC 4601 section 4.9; RFC 3973 section 4.7.1).
      
          * Packets decapsulated from PIM register messages should have
            skb->protocol ETH_P_IPV6.
      
        - Enable/disable IPv6 multicast forwarding on the corresponding
          interface when a routing daemon adds/removes a multicast virtual
          interface.
      
        - Remove incorrect skb_pull() to fix userspace signaling.
      
        - Enable/disable global IPv6 multicast forwarding when an IPv6
          multicast routing socket is opened/closed.
      
      net/ipv6/route.c:
      
        - Don't use strict routing logic for packets decapsulated from PIM
          register messages (similar to disabling rp_filter for the IPv4
          case).
      Signed-off-by: NThomas Goff <thomas.goff@boeing.com>
      Reviewed-by: NFred Templin <fred.l.templin@boeing.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d6e55f1
  31. 15 12月, 2008 1 次提交
  32. 11 12月, 2008 1 次提交
    • B
      netns: ip6mr: enable namespace support in ipv6 multicast forwarding code · 8229efda
      Benjamin Thery 提交于
      This last patch makes the appropriate changes to use and propagate the
      network namespace where needed in IPv6 multicast forwarding code.
      
      This consists mainly in replacing all the remaining init_net occurences
      with current netns pointer retrieved from sockets, net devices or 
      mfc6_caches depending on the routines' contexts.
      
      Some routines receive a new 'struct net' parameter to propagate the current
      netns:
      * ip6mr_get_route
      * ip6mr_cache_report
      * ip6mr_cache_find
      * ip6mr_cache_unresolved
      * mif6_add/mif6_delete
      * ip6mr_mfc_add/ip6mr_mfc_delete
      * ip6mr_reg_vif
      
      All the IPv6 multicast forwarding variables moved to struct netns_ipv6 by
      the previous patches are now referenced in the correct namespace.
      
      Changelog:
      ==========
      * Take into account the net associated to mfc6_cache when matching entries in
        mfc_unres_queue list.
      * Call mroute_clean_tables() in ip6mr_net_exit() to free memory allocated
        per-namespace.
      * Call dev_net_set() in ip6mr_reg_vif() to initialize dev->nd_net 
        correctly.
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8229efda