03 Mar, 2009

1 commit

  • It turns out that net_alive is unnecessary, and the original problem
    that led to it being added was simply that the icmp code thought
    it was a network device and wound up being unable to handle packets
    while there were still packets in the network namespace.

    Now that icmp and tcp have been fixed to properly register themselves
    this problem is no longer present and we have a stronger guarantee
    that packets will not arrive in a network namespace then that provided
    by net_alive in netif_receive_skb. So remove net_alive allowing
    packet reception run a little faster.

    Additionally document the strong reason why network namespace cleanup
    is safe so that if something happens again someone else will have
    a chance of figuring it out.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

18 Feb, 2009

2 commits


13 Feb, 2009

1 commit

  • The problem is that in_atomic() will return false inside spinlocks if
    CONFIG_PREEMPT=n. This will lead to deadlockable GFP_KERNEL allocations
    from spinlocked regions.

    Secondly, if CONFIG_PREEMPT=y, this bug solves itself because networking
    will instead use GFP_ATOMIC from this callsite. Hence we won't get the
    might_sleep() debugging warnings which would have informed us of the buggy
    callsites.

    Solve both these problems by switching to in_interrupt(). Now, if someone
    runs a gfp_any() allocation from inside spinlock we will get the warning
    if CONFIG_PREEMPT=y.

    I reviewed all callsites and most of them were too complex for my little
    brain and none of them documented their interface requirements. I have no
    idea what this patch will do.

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     

28 Jan, 2009

1 commit

  • In commit 9db66bdcc83749affe61c61eb8ff3cf08f42afec (net: convert
    TCP/DCCP ehash rwlocks to spinlocks), I forgot to change one
    occurrence of rwlock_t to spinlock_t

    I believe sizeof(raw_spinlock_t) might be > 0 on !CONFIG_SMP if
    CONFIG_DEBUG_SPINLOCK while sizeof(raw_rwlock_t) should be 0 in this
    case.

    Fortunatly, CONFIG_DEBUG_SPINLOCK adds fields to both spinlock_t and
    rwlock_t, but at this might change in the future (being able to debug
    spinlocks but not rwlocks for example), better to be safe.

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

    Eric Dumazet
     

23 Jan, 2009

1 commit

  • crc32c algorithm provides a byteswaped result. On little-endian
    arches, the result ends up in big-endian/network byte order.
    On big-endinan arches, the result ends up in little-endian
    order and needs to be byte swapped again. Thus calling cpu_to_le32
    gives the right output.

    Tested-by: Jukka Taimisto
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

17 Jan, 2009

1 commit

  • Fix (delete) more mac80211 kernel-doc:

    Warning(linux-2.6.28-git13//include/net/mac80211.h:375): Excess struct/union/enum/typedef member 'retry_count' description in 'ieee80211_tx_info'
    Warning(linux-2.6.28-git13//net/mac80211/sta_info.h:308): Excess struct/union/enum/typedef member 'last_txrate' description in 'sta_info'

    Signed-off-by: Randy Dunlap
    Signed-off-by: John W. Linville

    Randy Dunlap
     

11 Jan, 2009

1 commit

  • The kernel-doc was referring to member @debufs_dentry instead of
    @debugfs_dentry.

    Reported by Randy Dunlap http://marc.info/?l=linux-netdev&m=123147942302885&w=2

    As well, escape the colon in the field's text description, as it is
    causing the generated text to be erraticly broken up (with paragraphs
    moved down). Could not find a reason why it is happening so, even when
    other field descriptions use colons and work as expected.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: David S. Miller

    Inaky Perez-Gonzalez
     

10 Jan, 2009

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (22 commits)
    ioat: fix self test for multi-channel case
    dmaengine: bump initcall level to arch_initcall
    dmaengine: advertise all channels on a device to dma_filter_fn
    dmaengine: use idr for registering dma device numbers
    dmaengine: add a release for dma class devices and dependent infrastructure
    ioat: do not perform removal actions at shutdown
    iop-adma: enable module removal
    iop-adma: kill debug BUG_ON
    iop-adma: let devm do its job, don't duplicate free
    dmaengine: kill enum dma_state_client
    dmaengine: remove 'bigref' infrastructure
    dmaengine: kill struct dma_client and supporting infrastructure
    dmaengine: replace dma_async_client_register with dmaengine_get
    atmel-mci: convert to dma_request_channel and down-level dma_slave
    dmatest: convert to dma_request_channel
    dmaengine: introduce dma_request_channel and private channels
    net_dma: convert to dma_find_channel
    dmaengine: provide a common 'issue_pending_all' implementation
    dmaengine: centralize channel allocation, introduce dma_find_channel
    dmaengine: up-level reference counting to the module level
    ...

    Linus Torvalds
     

09 Jan, 2009

3 commits


08 Jan, 2009

1 commit


07 Jan, 2009

3 commits

  • James Morris
     
  • Use the general-purpose channel allocation provided by dmaengine.

    Reviewed-by: Andrew Morton
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Simply, if a client wants any dmaengine channel then prevent all dmaengine
    modules from being removed. Once the clients are done re-enable module
    removal.

    Why?, beyond reducing complication:
    1/ Tracking reference counts per-transaction in an efficient manner, as
    is currently done, requires a complicated scheme to avoid cache-line
    bouncing effects.
    2/ Per-transaction ref-counting gives the false impression that a
    dma-driver can be gracefully removed ahead of its user (net, md, or
    dma-slave)
    3/ None of the in-tree dma-drivers talk to hot pluggable hardware, but
    if such an engine were built one day we still would not need to notify
    clients of remove events. The driver can simply return NULL to a
    ->prep() request, something that is much easier for a client to handle.

    Reviewed-by: Andrew Morton
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Dan Williams
     

05 Jan, 2009

1 commit

  • 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
     

01 Jan, 2009

1 commit


29 Dec, 2008

2 commits

  • * 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
     
  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (85 commits)
    [S390] provide documentation for hvc_iucv kernel parameter.
    [S390] convert ctcm printks to dev_xxx and pr_xxx macros.
    [S390] convert zfcp printks to pr_xxx macros.
    [S390] convert vmlogrdr printks to pr_xxx macros.
    [S390] convert zfcp dumper printks to pr_xxx macros.
    [S390] convert cpu related printks to pr_xxx macros.
    [S390] convert qeth printks to dev_xxx and pr_xxx macros.
    [S390] convert sclp printks to pr_xxx macros.
    [S390] convert iucv printks to dev_xxx and pr_xxx macros.
    [S390] convert ap_bus printks to pr_xxx macros.
    [S390] convert dcssblk and extmem printks messages to pr_xxx macros.
    [S390] convert monwriter printks to pr_xxx macros.
    [S390] convert s390 debug feature printks to pr_xxx macros.
    [S390] convert monreader printks to pr_xxx macros.
    [S390] convert appldata printks to pr_xxx macros.
    [S390] convert setup printks to pr_xxx macros.
    [S390] convert hypfs printks to pr_xxx macros.
    [S390] convert time printks to pr_xxx macros.
    [S390] convert cpacf printks to pr_xxx macros.
    [S390] convert cio printks to pr_xxx macros.
    ...

    Linus Torvalds
     

26 Dec, 2008

2 commits

  • See commit 1045b03e07d85f3545118510a587035536030c1c ("netlink: fix
    overrun in attribute iteration") for a detailed explanation of why
    this patch is necessary.

    In short, nlmsg_next() can make "remaining" go negative, and the
    remaining >= sizeof(...) comparison will promote "remaining" to an
    unsigned type, which means that the expression will evaluate to
    true for negative numbers, even though it was not intended.

    I put "theoretical" in the title because I have no evidence that
    this can actually happen, but I suspect that a crafted netlink
    packet can trigger some badness.

    Note that the last test, which seemingly has the exact same
    problem (also true for nla_ok()), is perfectly OK, since we
    already know that remaining is positive.

    Signed-off-by: Vegard Nossum
    Signed-off-by: David S. Miller

    Vegard Nossum
     
  • Implement socket option SCTP_GET_ASSOC_NUMBER of the latest ietf socket
    extensions API draft.

    8.2.5. Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)

    This option gets the current number of associations that are attached
    to a one-to-many style socket. The option value is an uint32_t.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

25 Dec, 2008

2 commits


24 Dec, 2008

1 commit


22 Dec, 2008

1 commit

  • Data Center Bridging (DCB) had no way to know if setstate had failed in the
    driver. This patch enables dcb netlink code to handle the status for the DCB
    setstate interface. Likewise it allows the driver to return a failed status
    if MSI-X isn't enabled.

    Signed-off-by: Don Skidmore
    Signed-off-by: Eric W Multanen
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Don Skidmore
     

20 Dec, 2008

4 commits

  • This patch implements dynamic power save for mac80211. Basically it
    means enabling power save mode after an idle period. Implementing it
    dynamically gives a good compromise of low power consumption and low
    latency. Some hardware have support for this in firmware, but some
    require the host to do it.

    The dynamic power save is implemented by adding an timeout to
    ieee80211_subif_start_xmit(). The timeout can be enabled from userspace
    with Wireless Extensions. For example, the command below enables the
    dynamic power save and sets the time timeout to 500 ms:

    iwconfig wlan0 power timeout 500m

    Power save now only works with devices which handle power save in firmware.
    It's also disabled by default and the heuristics when and how to enable is
    considered as a policy decision and will be left for the userspace to handle.
    In case the firmware has support for this, drivers can disable this feature
    with IEEE80211_HW_NO_STACK_DYNAMIC_PS.

    Big thanks to Johannes Berg for the help with the design and code.

    Signed-off-by: Kalle Valo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • This patch adds option for HT-enabled drivers to report HT rates
    (HT20/HT40, short GI, MCS index) to mac80211. These rates are
    currently not in the rate table, so the rate_idx is used to indicate
    MCS index.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • HT management is done differently for AP and STA modes, unify
    to just the ->config() callback since HT is fundamentally a
    PHY property and cannot be per-BSS.

    Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
    the channel type ( NO_HT, HT20, HT40+, HT40- ).

    Signed-off-by: Johannes Berg
    Signed-off-by: Sujith
    Signed-off-by: John W. Linville

    Sujith
     
  • This patch adds signal strength and transmission bitrate
    to the station_info of nl80211.

    Signed-off-by: Henning Rogge
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Henning Rogge
     

18 Dec, 2008

2 commits


16 Dec, 2008

2 commits

  • This patch adds the TCP-specific portion of GRO. The criterion for
    merging is extremely strict (the TCP header must match exactly apart
    from the checksum) so as to allow refragmentation. Otherwise this
    is pretty much identical to LRO, except that we support the merging
    of ECN packets.

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

    Herbert Xu
     
  • This patch adds GRO support for IPv4.

    The criteria for merging is more stringent than LRO, in particular,
    we require all fields in the IP header to be identical except for
    the length, ID and checksum. In addition, the ID must form an
    arithmetic sequence with a difference of one.

    The ID requirement might seem overly strict, however, most hardware
    TSO solutions already obey this rule. Linux itself also obeys this
    whether GSO is in use or not.

    In future we could relax this rule by storing the IDs (or rather
    making sure that we don't drop them when pulling the aggregate
    skb's tail).

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

    Herbert Xu
     

13 Dec, 2008

4 commits


11 Dec, 2008

2 commits