24 Oct, 2009

1 commit

  • While playing with pktgen, I realized IP ID was not filled and a
    random value was taken, possibly leaking 2 bytes of kernel memory.

    We can use an increasing ID, this can help diagnostics anyway.

    Also clear packet payload, instead of leaking kernel memory.

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

    Eric Dumazet
     

05 Oct, 2009

3 commits

  • A number of drivers (recently including cfg80211-based ones)
    assume that all wireless handlers, including statistics, can
    sleep and they often also implicitly assume that the rtnl is
    held around their invocation. This is almost always true now
    except when reading from sysfs:

    BUG: sleeping function called from invalid context at kernel/mutex.c:280
    in_atomic(): 1, irqs_disabled(): 0, pid: 10450, name: head
    2 locks held by head/10450:
    #0: (&buffer->mutex){+.+.+.}, at: [] sysfs_read_file+0x24/0xf4
    #1: (dev_base_lock){++.?..}, at: [] wireless_show+0x1a/0x4c
    Pid: 10450, comm: head Not tainted 2.6.32-rc3 #1
    Call Trace:
    [] __might_sleep+0xf0/0xf7
    [] mutex_lock_nested+0x1a/0x33
    [] wdev_lock+0xd/0xf [cfg80211]
    [] cfg80211_wireless_stats+0x45/0x12d [cfg80211]
    [] get_wireless_stats+0x16/0x1c
    [] wireless_show+0x2a/0x4c

    Fix this by using the rtnl instead of dev_base_lock.

    Reported-by: Miles Lane
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Commit fd29cf72 (pktgen: convert to use ktime_t)
    inadvertantly converted "delay" parameter from nanosec to microsec.

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

    Eric Dumazet
     
  • It is not currently possible to instruct pktgen to use one selected tx queue.

    When Robert added multiqueue support in commit 45b270f8, he added
    an interval (queue_map_min, queue_map_max), and his code doesnt take
    into account the case of min = max, to select one tx queue exactly.

    I suspect a high performance setup on a eight txqueue device wants
    to use exactly eight cpus, and assign one tx queue to each sender.

    This patchs makes pktgen select the right tx queue, not the first one.

    Also updates Documentation to reflect Robert changes.

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

    Eric Dumazet
     

02 Oct, 2009

1 commit

  • After last pktgen changes, delay handling is wrong.

    pktgen actually sends packets at full line speed.

    Fix is to update pkt_dev->next_tx even if spin() returns early,
    so that next spin() calls have a chance to see a positive delay.

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

    Eric Dumazet
     

01 Oct, 2009

3 commits

  • Since commit 9b22ea560957de1484e6b3e8538f7eef202e3596
    ( net: fix packet socket delivery in rx irq handler )

    We lost rx timestamping of packets received on accelerated vlans.

    Effect is that tcpdump on real dev can show strange timings, since it gets rx timestamps
    too late (ie at skb dequeueing time, not at skb queueing time)

    14:47:26.986871 IP 192.168.20.110 > 192.168.20.141: icmp 64: echo request seq 1
    14:47:26.986786 IP 192.168.20.141 > 192.168.20.110: icmp 64: echo reply seq 1

    14:47:27.986888 IP 192.168.20.110 > 192.168.20.141: icmp 64: echo request seq 2
    14:47:27.986781 IP 192.168.20.141 > 192.168.20.110: icmp 64: echo reply seq 2

    14:47:28.986896 IP 192.168.20.110 > 192.168.20.141: icmp 64: echo request seq 3
    14:47:28.986780 IP 192.168.20.141 > 192.168.20.110: icmp 64: echo reply seq 3

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

    Eric Dumazet
     
  • Commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
    (net: No more expensive sock_hold()/sock_put() on each tx)
    opens a window in sock_wfree() where another cpu
    might free the socket we are working on.

    A fix is to call sk->sk_write_space(sk) while still
    holding a reference on sk.

    Reported-by: Jike Song
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This provides safety against negative optlen at the type
    level instead of depending upon (sometimes non-trivial)
    checks against this sprinkled all over the the place, in
    each and every implementation.

    Based upon work done by Arjan van de Ven and feedback
    from Linus Torvalds.

    Signed-off-by: David S. Miller

    David S. Miller
     

29 Sep, 2009

1 commit

  • The move away from having drivers assign wireless handlers,
    in favour of making cfg80211 assign them, broke the sysfs
    registration (the wireless/ dir went missing) because the
    handlers are now assigned only after registration, which is
    too late.

    Fix this by special-casing cfg80211-based devices, all
    of which are required to have an ieee80211_ptr, in the
    sysfs code, and also using get_wireless_stats() to have
    the same values reported as in procfs.

    Signed-off-by: Johannes Berg
    Reported-by: Hugh Dickins
    Tested-by: Hugh Dickins
    Signed-off-by: John W. Linville

    Johannes Berg
     

25 Sep, 2009

2 commits

  • Previous update did not resched in inner loop causing watchdogs.
    Rewrite inner loop to:
    * account for delays better with less clock calls
    * more accurate timing of delay:
    - only delay if packet was successfully sent
    - if delay is 100ns and it takes 10ns to build packet then
    account for that
    * use wait_event_interruptible_timeout rather than open coding it.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Get rid of unused flag bit.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

22 Sep, 2009

1 commit

  • Sizing of memory allocations shouldn't depend on the number of physical
    pages found in a system, as that generally includes (perhaps a huge amount
    of) non-RAM pages. The amount of what actually is usable as storage
    should instead be used as a basis here.

    Some of the calculations (i.e. those not intending to use high memory)
    should likely even use (totalram_pages - totalhigh_pages).

    Signed-off-by: Jan Beulich
    Acked-by: Rusty Russell
    Acked-by: Ingo Molnar
    Cc: Dave Airlie
    Cc: Kyle McMartin
    Cc: Jeremy Fitzhardinge
    Cc: Pekka Enberg
    Cc: Hugh Dickins
    Cc: "David S. Miller"
    Cc: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     

18 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
    be2net: fix some cmds to use mccq instead of mbox
    atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
    pkt_sched: Fix qstats.qlen updating in dump_stats
    ipv6: Log the affected address when DAD failure occurs
    wl12xx: Fix print_mac() conversion.
    af_iucv: fix race when queueing skbs on the backlog queue
    af_iucv: do not call iucv_sock_kill() twice
    af_iucv: handle non-accepted sockets after resuming from suspend
    af_iucv: fix race in __iucv_sock_wait()
    iucv: use correct output register in iucv_query_maxconn()
    iucv: fix iucv_buffer_cpumask check when calling IUCV functions
    iucv: suspend/resume error msg for left over pathes
    wl12xx: switch to %pM to print the mac address
    b44: the poll handler b44_poll must not enable IRQ unconditionally
    ipv6: Ignore route option with ROUTER_PREF_INVALID
    bonding: make ab_arp select active slaves as other modes
    cfg80211: fix SME connect
    rc80211_minstrel: fix contention window calculation
    ssb/sdio: fix printk format warnings
    p54usb: add Zcomax XG-705A usbid
    ...

    Linus Torvalds
     

16 Sep, 2009

1 commit


15 Sep, 2009

2 commits

  • This patch fixes commit e36b9d16c6a6d0f59803b3ef04ff3c22c3844c10. The approach
    there is to call dev_close()/dev_open() whenever the device type is changed in
    order to remap the device IP multicast addresses to HW multicast addresses.
    This approach suffers from 2 drawbacks:

    *. It assumes tha the device is UP when calling dev_close(), or otherwise
    dev_close() has no affect. It is worth to mention that initscripts (Redhat)
    and sysconfig (Suse) doesn't act the same in this matter.
    *. dev_close() has other side affects, like deleting entries from the routing
    table, which might be unnecessary.

    The fix here is to directly remap the IP multicast addresses to HW multicast
    addresses for a bonding device that changes its type, and nothing else.

    Reported-by: Jason Gunthorpe
    Signed-off-by: Moni Shoua
    Signed-off-by: David S. Miller

    Moni Shoua
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
    netxen: update copyright
    netxen: fix tx timeout recovery
    netxen: fix file firmware leak
    netxen: improve pci memory access
    netxen: change firmware write size
    tg3: Fix return ring size breakage
    netxen: build fix for INET=n
    cdc-phonet: autoconfigure Phonet address
    Phonet: back-end for autoconfigured addresses
    Phonet: fix netlink address dump error handling
    ipv6: Add IFA_F_DADFAILED flag
    net: Add DEVTYPE support for Ethernet based devices
    mv643xx_eth.c: remove unused txq_set_wrr()
    ucc_geth: Fix hangs after switching from full to half duplex
    ucc_geth: Rearrange some code to avoid forward declarations
    phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
    drivers/net/phy: introduce missing kfree
    drivers/net/wan: introduce missing kfree
    net: force bridge module(s) to be GPL
    Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
    ...

    Fixed up trivial conflicts:

    - arch/x86/include/asm/socket.h

    converted to in the x86 tree. The generic
    header has the same new #define's, so that works out fine.

    - drivers/net/tun.c

    fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
    switched over to using 'tun->socket.sk' instead of the redundantly
    available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
    to the TUN driver") which added a new 'tun->sk' use.

    Noted in 'next' by Stephen Rothwell.

    Linus Torvalds
     

12 Sep, 2009

1 commit

  • The only valid usage for the bridge frame hooks are by a
    GPL components (such as the bridge module).
    The kernel should not leave a crack in the door for proprietary
    networking stacks to slip in.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

11 Sep, 2009

1 commit


06 Sep, 2009

1 commit

  • Currently the multiqueue integration with the qdisc API suffers from
    a few problems:

    - with multiple queues, all root qdiscs use the same handle. This means
    they can't be exposed to userspace in a backwards compatible fashion.

    - all API operations always refer to queue number 0. Newly created
    qdiscs are automatically shared between all queues, its not possible
    to address individual queues or restore multiqueue behaviour once a
    shared qdisc has been attached.

    - Dumps only contain the root qdisc of queue 0, in case of non-shared
    qdiscs this means the statistics are incomplete.

    This patch reintroduces dev->qdisc, which points to the (single) root qdisc
    from userspace's point of view. Currently it either points to the first
    (non-shared) default qdisc, or a qdisc shared between all queues. The
    following patches will introduce a classful dummy qdisc, which will be used
    as root qdisc and contain the per-queue qdiscs as children.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

03 Sep, 2009

5 commits

  • Remove a debugging aid I accidently left in previous 'cleanup' patch

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

    Eric Dumazet
     
  • Pure style cleanup patch before surgery :)

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

    Eric Dumazet
     
  • This patch adds support to flash a firmware image to a device using ethtool.
    The driver gets the filename of the firmware image and flashes the image
    using the request firmware path.

    The region "on the chip" to be flashed can be specified by an option.
    It is upto the device driver to enumerate the region number passed by ethtool,
    to the region to be flashed.

    The default behavior is to flash all the regions on the chip.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • vlan devices are currently not multi-queue capable.

    We can do that with a new rtnl_link_ops method,
    get_tx_queues(), called from rtnl_create_link()

    This new method gets num_tx_queues/real_num_tx_queues
    from real device.

    register_vlan_device() is also handled.

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

    Eric Dumazet
     
  • It was recently pointed out to me that the last_rx field of the
    net_device structure wasn't updated regularly. In fact only the
    bonding driver really uses it currently. Since the drop_monitor code
    relies on the last_rx field to detect drops on recevie in hardware, We
    need to find a more reliable way to rate limit our drop checks (so
    that we don't check for drops on every frame recevied, which would be
    inefficient. This patch makes a last_rx timestamp that is private to
    the drop monitor code and is updated for every device that we track.

    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     

02 Sep, 2009

3 commits


01 Sep, 2009

1 commit


31 Aug, 2009

1 commit


29 Aug, 2009

11 commits