24 Nov, 2011

1 commit


22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

25 Aug, 2011

1 commit


18 Aug, 2011

1 commit


08 Aug, 2011

1 commit


02 Aug, 2011

1 commit

  • When assigning a NULL value to an RCU protected pointer, no barrier
    is needed. The rcu_assign_pointer, used to handle that but will soon
    change to not handle the special case.

    Convert all rcu_assign_pointer of NULL value.

    //smpl
    @@ expression P; @@

    - rcu_assign_pointer(P, NULL)
    + RCU_INIT_POINTER(P, NULL)

    //

    Signed-off-by: Stephen Hemminger
    Acked-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

01 Aug, 2011

1 commit

  • Convert array index from the loop bound to the loop index.

    A simplified version of the semantic patch that fixes this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    expression e1,e2,ar;
    @@

    for(e1 = 0; e1 < e2; e1++) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

25 May, 2011

1 commit

  • In igmp_group_dropped() we call ip_mc_clear_src(), which resets the number
    of source filters per mulitcast. However, igmp_group_dropped() is also
    called on NETDEV_DOWN, NETDEV_PRE_TYPE_CHANGE and NETDEV_UNREGISTER, which
    means that the group might get added back on NETDEV_UP, NETDEV_REGISTER and
    NETDEV_POST_TYPE_CHANGE respectively, leaving us with broken source
    filters.

    To fix that, we must clear the source filters only when there are no users
    in the ip_mc_list, i.e. in ip_mc_dec_group() and on device destroy.

    Acked-by: David L Stevens
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     

21 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     

08 May, 2011

3 commits


04 May, 2011

2 commits


28 Apr, 2011

1 commit

  • Output route resolution never returns a route with rt_src set to zero
    (which is INADDR_ANY).

    Even if the flow key for the output route lookup specifies INADDR_ANY
    for the source address, the output route resolution chooses a real
    source address to use in the final route.

    This test has existed forever in igmp_send_report() and David Stevens
    simply copied over the erroneous test when implementing support for
    IGMPv3.

    Signed-off-by: David S. Miller
    Reviewed-by: Eric Dumazet

    David S. Miller
     

13 Mar, 2011

1 commit


11 Mar, 2011

1 commit


03 Mar, 2011

1 commit


19 Nov, 2010

2 commits

  • IGMP allocates MTU sized skbs. This may fail for large MTU (order-2
    allocations), so add a fallback to try lower sizes.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Instead of iterating in_dev->mc_list from bonding driver, its better
    to call a helper function provided by igmp.c
    Details of implementation (locking) are private to igmp code.

    ip_mc_rejoin_group(struct ip_mc_list *im) becomes
    ip_mc_rejoin_groups(struct in_device *in_dev);

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

18 Nov, 2010

1 commit


16 Nov, 2010

1 commit

  • net/ipv4/igmp.c: In function 'ip_mc_inc_group':
    net/ipv4/igmp.c:1228: error: implicit declaration of function 'for_each_pmc_rtnl'
    net/ipv4/igmp.c:1228: error: expected ';' before '{' token
    net/ipv4/igmp.c: In function 'ip_mc_unmap':
    net/ipv4/igmp.c:1333: error: expected ';' before 'igmp_group_dropped'
    ...

    Move for_each_pmc_rcu and for_each_pmc_rtnl macro definitions
    outside of multicast ifdef protection.

    Reported-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    David S. Miller
     

15 Nov, 2010

1 commit


13 Nov, 2010

1 commit

  • in_dev->mc_list is protected by one rwlock (in_dev->mc_list_lock).

    This can easily be converted to a RCU protection.

    Writers hold RTNL, so mc_list_lock is removed, not replaced by a
    spinlock.

    Signed-off-by: Eric Dumazet
    Cc: Cypher Wu
    Cc: Américo Wang
    Signed-off-by: David S. Miller

    Eric Dumazet
     

12 Nov, 2010

1 commit


10 Nov, 2010

1 commit

  • commit 8723e1b4ad9be4444 (inet: RCU changes in inetdev_by_index())
    forgot one call site in ip_mc_drop_socket()

    We should not decrease idev refcount after inetdev_by_index() call,
    since refcount is not increased anymore.

    Reported-by: Markus Trippelsdorf
    Reported-by: Miles Lane
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

19 Oct, 2010

2 commits


06 Oct, 2010

1 commit

  • The IGMP specs states that if the system receives a
    membership report, it shouldn't send another for the
    next minute. However, if a link failure happens right
    after that, the backup slave and the switch connected
    to this slave will not know about the multicast and
    the traffic will hang for about a minute.

    This patch fixes it to rejoin multicast groups immediately
    after a failover restoring the multicast traffic.

    Signed-off-by: Flavio Leitner
    Signed-off-by: David S. Miller

    Flavio Leitner
     

04 Oct, 2010

1 commit

  • A recent patch to allow IGMPv2 responses to IGMPv3 queries
    bypasses length checks for valid query lengths, incorrectly
    resets the v2_seen timer, and does not support IGMPv1.

    The following patch responds with a v2 report as required
    by IGMPv2 while correcting the other problems introduced
    by the patch.

    Signed-Off-By: David L Stevens

    Signed-off-by: David S. Miller

    David Stevens
     

14 Sep, 2010

1 commit

  • After all these years, it turns out that the
    /proc/sys/net/ipv4/conf/*/force_igmp_version
    parameter isn't fully implemented.

    *Symptom*:
    When set force_igmp_version to a value of 2, the kernel should only perform
    multicast IGMPv2 operations (IETF rfc2236). An host-initiated Join message
    will be sent as a IGMPv2 Join message. But if a IGMPv3 query message is
    received, the host responds with a IGMPv3 join message. Per rfc3376 and
    rfc2236, a IGMPv2 host should treat a IGMPv3 query as a IGMPv2 query and
    respond with an IGMPv2 Join message.

    *Consequences*:
    This is an issue when a IGMPv3 capable switch is the querier and will only
    issue IGMPv3 queries (which double as IGMPv2 querys) and there's an
    intermediate switch that is only IGMPv2 capable. The intermediate switch
    processes the initial v2 Join, but fails to recognize the IGMPv3 Join responses
    to the Query, resulting in a dropped connection when the intermediate v2-only
    switch times it out.

    *Identifying issue in the kernel source*:
    The issue is in this section of code (in net/ipv4/igmp.c), which is called when
    an IGMP query is received (from mainline 2.6.36-rc3 gitweb):
    ...
    A IGMPv3 query has a length >= 12 and no sources. This routine will exit after
    line 880, setting the general query timer (random timeout between 0 and query
    response time). This calls igmp_gq_timer_expire():
    ...
    .. which only sends a v3 response. So if a v3 query is received, the kernel
    always sends a v3 response.

    IGMP queries happen once every 60 sec (per vlan), so the traffic is low. A
    IGMPv3 query *is* a strict superset of a IGMPv2 query, so this patch properly
    short circuit's the v3 behaviour.

    One issue is that this does not address force_igmp_version=1. Then again, I've
    never seen any IGMPv1 multicast equipment in the wild. However there is a lot
    of v2-only equipment. If it's necessary to support the IGMPv1 case as well:

    837 if (len == 8 || IGMP_V2_SEEN(in_dev) || IGMP_V1_SEEN(in_dev)) {

    Signed-off-by: David S. Miller

    Bob Arendt
     

13 Jul, 2010

1 commit


11 Jun, 2010

1 commit


08 Jun, 2010

1 commit


01 Jun, 2010

1 commit


12 Apr, 2010

1 commit


04 Apr, 2010

1 commit

  • Converts the list and the core manipulating with it to be the same as uc_list.

    +uses two functions for adding/removing mc address (normal and "global"
    variant) instead of a function parameter.
    +removes dev_mcast.c completely.
    +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
    manipulation with lists on a sandbox (used in bonding and 80211 drivers)

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

15 Feb, 2010

1 commit


13 Feb, 2010

1 commit

  • Currently we treat IGMPv3 reports as if it were an IGMPv2/v1 report.
    This is broken as IGMPv3 reports are formatted differently. So we
    end up suppressing a bogus multicast group (which should be harmless
    as long as the leading reserved field is zero).

    In fact, IGMPv3 does not allow membership report suppression so
    we should simply ignore IGMPv3 membership reports as a host.

    This patch does exactly that. I kept the case statement for it
    so people won't accidentally add it back thinking that we overlooked
    this case.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu