05 Jan, 2009

2 commits

  • Signed-off-by: Ilpo Järvinen
    Reported-by: Eric Sesterhenn
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Thanks to excellent diagnosis by Eduard Guzovsky.

    The core problem is that on a network with lots of active
    multicast traffic, the neighbour cache can fill up. If
    we try to allocate a new route and thus neighbour cache
    entry, the bog-standard GC attempt the neighbour layer does
    in ineffective because route entries hold a reference
    to the existing neighbour entries and GC can only liberate
    entries with no references.

    IPV4 already has a way to handle this, by doing a route cache
    GC in such situations (when neigh attach returns -ENOBUFS).

    So simply mimick this on the ipv6 side.

    Tested-by: Eduard Guzovsky
    Signed-off-by: David S. Miller

    David S. Miller
     

30 Dec, 2008

1 commit

  • When we converted the protocol atomic counters such as the orphan
    count and the total socket count deadlocks were introduced due to
    the mismatch in BH status of the spots that used the percpu counter
    operations.

    Based on the diagnosis and patch by Peter Zijlstra, this patch
    fixes these issues by disabling BH where we may be in process
    context.

    Reported-by: Jeff Kirsher
    Tested-by: Ingo Molnar
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

29 Dec, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
    net: Allow dependancies of FDDI & Tokenring to be modular.
    igb: Fix build warning when DCA is disabled.
    net: Fix warning fallout from recent NAPI interface changes.
    gro: Fix potential use after free
    sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
    sfc: When disabling the NIC, close the device rather than unregistering it
    sfc: SFT9001: Add cable diagnostics
    sfc: Add support for multiple PHY self-tests
    sfc: Merge top-level functions for self-tests
    sfc: Clean up PHY mode management in loopback self-test
    sfc: Fix unreliable link detection in some loopback modes
    sfc: Generate unique names for per-NIC workqueues
    802.3ad: use standard ethhdr instead of ad_header
    802.3ad: generalize out mac address initializer
    802.3ad: initialize ports LACPDU from const initializer
    802.3ad: remove typedef around ad_system
    802.3ad: turn ports is_individual into a bool
    802.3ad: turn ports is_enabled into a bool
    802.3ad: make ntt bool
    ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
    ...

    Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
    to the conversion to %pI (in this networking merge) and the addition of
    doing IPv6 addresses (from the earlier merge of CIFS).

    Linus Torvalds
     

25 Dec, 2008

1 commit


16 Dec, 2008

4 commits

  • 1.When no interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface specified in an IPV6_PKTINFO sticky optionis
    is used.

    RFC3542:
    6.7. Summary of Outgoing Interface Selection

    This document and [RFC-3493] specify various methods that affect the
    selection of the packet's outgoing interface. This subsection
    summarizes the ordering among those in order to ensure deterministic
    behavior.

    For a given outgoing packet on a given socket, the outgoing interface
    is determined in the following order:

    1. if an interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface is used.

    2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky
    option, the interface is used.

    Signed-off-by: Yang Hongyang
    Signed-off-by: David S. Miller

    Yang Hongyang
     
  • When get receiving interface index while no message is received,
    the the value seted with setsockopt() should be returned.

    RFC 3542:
    Issuing getsockopt() for the above options will return the sticky
    option value i.e., the value set with setsockopt(). If no sticky
    option value has been set getsockopt() will return the following
    values:

    - For the IPV6_PKTINFO option, it will return an in6_pktinfo
    structure with ipi6_addr being in6addr_any and ipi6_ifindex being
    zero.

    Signed-off-by: Yang Hongyang
    Signed-off-by: David S. Miller

    Yang Hongyang
     
  • There are three reasons for me to add this support:
    1.When no interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface specified in an IPV6_PKTINFO sticky optionis
    is used.

    RFC3542:
    6.7. Summary of Outgoing Interface Selection

    This document and [RFC-3493] specify various methods that affect the
    selection of the packet's outgoing interface. This subsection
    summarizes the ordering among those in order to ensure deterministic
    behavior.

    For a given outgoing packet on a given socket, the outgoing interface
    is determined in the following order:

    1. if an interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface is used.

    2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky
    option, the interface is used.

    2.When no IPV6_PKTINFO ancillary data is received,getsockopt() should
    return the sticky option value which set with setsockopt().

    RFC 3542:
    Issuing getsockopt() for the above options will return the sticky
    option value i.e., the value set with setsockopt(). If no sticky
    option value has been set getsockopt() will return the following
    values:

    3.Make the setsockopt implementation POSIX compliant.

    Signed-off-by: Yang Hongyang
    Signed-off-by: David S. Miller

    Yang Hongyang
     
  • Conflicts:

    drivers/net/e1000e/ich8lan.c

    David S. Miller
     

15 Dec, 2008

3 commits


11 Dec, 2008

9 commits

  • 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: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Declare IPv6 multicast forwarding /proc/net entries per-namespace:
    /proc/net/ip6_mr_vif
    /proc/net/ip6_mr_cache

    Changelog
    =========
    V2:
    * In routine ipmr_mfc_seq_idx(), only match entries belonging to current
    netns in mfc_unres_queue list.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Declare variable 'reg_vif_num' per-namespace, moves into struct netns_ipv6.

    At the moment, this variable is only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Declare IPv6 multicast forwarding variables 'mroute_do_assert' and
    'mroute_do_pim' per-namespace in struct netns_ipv6.

    At the moment, these variables are only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Declare variable cache_resolve_queue_len per-namespace: moves it into
    struct netns_ipv6.

    This variable counts the number of unresolved cache entries queued in the
    list mfc_unres_queue. This list is kept global to all netns as the number
    of entries per namespace is limited to 10 (hardcoded in routine
    ip6mr_cache_unresolved).
    Entries belonging to different namespaces in mfc_unres_queue will be
    identified by matching the mfc_net member introduced previously in
    struct mfc6_cache.

    Keeping this list global to all netns, also allows us to keep a single
    timer (ipmr_expire_timer) to handle their expiration.
    In some places cache_resolve_queue_len value was tested for arming
    or deleting the timer. These tests were equivalent to testing
    mfc_unres_queue value instead and are replaced in this patch.

    At the moment, cache_resolve_queue_len is only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Dynamically allocates IPv6 multicast forwarding cache, mfc6_cache_array,
    and moves it to struct netns_ipv6.

    At the moment, mfc6_cache_array is only referenced in init_net.

    Replace 'ARRAY_SIZE(mfc6_cache_array)' with mfc6_cache_array size: MFC6_LINES.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • This patch stores into struct mfc6_cache the network namespace each
    mfc6_cache belongs to. The new member is mfc6_net.

    mfc6_net is assigned at cache allocation and doesn't change during
    the rest of the cache entry life.

    This will help to retrieve the current netns around the IPv6 multicast
    forwarding code.

    At the moment, all mfc6_cache are allocated in init_net.

    Changelog:
    ==========
    * Use write_pnet()/read_pnet() to set and get mfc6_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Dynamically allocates interface table vif6_table and moves it to
    struct netns_ipv6, and updates MIF_EXISTS() macro.

    At the moment, vif6_table is only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Make IPv6 multicast forwarding mroute6_socket per-namespace,
    moves it into struct netns_ipv6.

    At the moment, mroute6_socket is only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     

10 Dec, 2008

1 commit

  • This patch fixes minor annoyance during transmission of unsolicited
    neighbor advertisements from userspace to multicast addresses (as
    far as I can see in RFC, this is allowed and the similar functionality
    for IPv4 has been in arping for a long time).

    Outgoing multicast packets get reinserted into local processing as if they
    are received from the network. The machine thus sees its own NA and fills
    the logs with error messages. This patch removes the message if NA has been
    generated locally.

    Signed-off-by: Jan Sembera
    Signed-off-by: David S. Miller

    Jan Sembera
     

04 Dec, 2008

4 commits

  • Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Today, iproute2 fails to show multicast forwarding unresolved cache
    entries while scanning /proc/net/ip_mr_cache.

    Indeed, it expects to see -1 in 'Iif' column to identify unresolved
    entries but the kernel outputs 65535. It's a signed/unsigned issue:

    'Iif', the source interface, is retrieved from member mfc_parent in
    struct mfc_cache. mfc_parent is a vifi_t: unsigned short, but is
    displayed in ipmr_mfc_seq_show() as "%-3d", signed integer.

    In unresolevd entries, the 65535 value (0xFFFF) comes from this define:
    #define ALL_VIFS ((vifi_t)(-1))

    That may explains why the guy who added support for this in iproute2
    thought a -1 should be expected.

    I don't know if this must be fixed in kernel or in iproute2. Who is
    right? What is the correct API? How was it designed originally?

    I let you decide if it should goes in the kernel or be fixed in iproute2.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • /proc/net/ip_mr_cache and /proc/net/ip6_mr_cache displays garbage when
    showing unresolved mfc_cache entries.

    [root@qemu tests]# cat /proc/net/ip_mr_cache
    Group Origin Iif Pkts Bytes Wrong Oifs
    014C00EF 010014AC 1 10 10050 0 2:1 3:1
    024C00EF 010014AC 65535 514 2 -559067475

    The first line is correct. It is a resolved cache entry, 10 packets used it...
    The second line represents an unresolved entry, and the columns Pkts(4th),
    Bytes(5th) and Wrong(6th) just show garbage.

    In struct mfc_cache, there's an union to store data for resolved and
    unresolved cases. And what ipmr_mfc_seq_show() is printing in these
    columns for the unresolved entries is some bytes from mfc_cache.mfc_un.res.
    Bad.
    (eg. In our case -559067475 is in fact 0xdead4ead which is the spinlock
    magic from mfc_cache.mfc_un.unres.unresolved.lock.magic).

    This patch replaces the garbage data written in these columns for the
    unresolved entries by '0' (zeros) which is more correct.
    This change doesn't break the ABI.

    Also, mfc->mfc_un.res.pkt, mfc->mfc_un.res.bytes, mfc->mfc_un.res.wrong_if
    are unsigned long.

    It applies on top of net-next-2.6.

    The patch for net-2.6 is slightly different because of the NIP6_FMT to
    %pI6 conversion that was made in the seq_printf.

    Changelog:
    ==========
    V2:
    * Instead of breaking the ABI by suppressing the columns that have no
    meaning for unresolved entries, fill them with 0 values.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Conflicts:
    fs/nfsd/nfs4recover.c

    Manually fixed above to use new creds API functions, e.g.
    nfs4_save_creds().

    Signed-off-by: James Morris

    James Morris
     

28 Nov, 2008

1 commit


26 Nov, 2008

11 commits


25 Nov, 2008

2 commits