13 Jan, 2012

2 commits

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • For historical reasons, we allow module_param(bool) to take an int (or
    an unsigned int). That's going away.

    A few drivers really want an int: they set it to -1 and a parameter
    will set it to 0 or 1. This sucks: reading them from sysfs will give
    'Y' for both -1 and 1, but if we change it to an int, then the users
    might be broken (if they did "param" instead of "param=1").

    Use a new 'bint' parser for them.

    (ntfs has a different problem: it needs an int for debug_msgs because
    it's also exposed via sysctl.)

    Cc: Steve Glendinning
    Cc: Jean Delvare
    Cc: Guenter Roeck
    Cc: Hoang-Nam Nguyen
    Cc: Christoph Raisch
    Cc: Roland Dreier
    Cc: Sean Hefty
    Cc: Hal Rosenstock
    Cc: linux390@de.ibm.com
    Cc: Anton Altaparmakov
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: lm-sensors@lm-sensors.org
    Cc: linux-rdma@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-ntfs-dev@lists.sourceforge.net
    Cc: alsa-devel@alsa-project.org
    Acked-by: Takashi Iwai (For the sound part)
    Acked-by: Guenter Roeck (For the hwmon driver)
    Signed-off-by: Rusty Russell

    Rusty Russell
     

09 Jan, 2012

2 commits

  • infiniband changes for 3.3 merge window

    * tag 'infiniband-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    rdma/core: Fix sparse warnings
    RDMA/cma: Fix endianness bugs
    RDMA/nes: Fix terminate during AE
    RDMA/nes: Make unnecessarily global nes_set_pau() static
    RDMA/nes: Change MDIO bus clock to 2.5MHz
    IB/cm: Fix layout of APR message
    IB/mlx4: Fix SL to 802.1Q priority-bits mapping for IBoE
    IB/qib: Default some module parameters optimally
    IB/qib: Optimize locking for get_txreq()
    IB/qib: Fix a possible data corruption when receiving packets
    IB/qib: Eliminate 64-bit jiffies use
    IB/qib: Fix style issues
    IB/uverbs: Protect QP multicast list

    Linus Torvalds
     
  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

05 Jan, 2012

6 commits


04 Jan, 2012

11 commits

  • Add a missing 16-bit reserved field between ap_status and info fields.

    Signed-off-by: Eli Cohen
    Acked-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Eli Cohen
     
  • For IBoE, SLs 0-7 are mapped to Ethernet 802.1Q user priority bits
    (pbits) which are part of the VLAN tag, SLs 8-15 are reserved.

    Under Ethernet, the ConnectX firmware treats (decode/encode) the four
    bit SL field in various constructs such as QPC / UD WQE / CQE as PPP0
    and not as 0PPP. This correlates well to the fact that within the
    vlan tag the pbits are located in bits 15-13 and not 12-14.

    The current code wasn't consistent around that area - the
    encoding was correct for the IBoE QPC.path.schedule_queue field,
    but was wrong for IBoE CQEs and when MLX header was built.

    These inconsistencies resulted in wrong SL wire 802.1Q pbits
    mapping, which is fixed by using SL PPP0 all around the place.

    Signed-off-by: Oren Duer
    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Or Gerlitz
     
  • Minimize the need for users to have to set module parameters to get
    good performance.

    The following two parameters are changed:
    - rcvhdrcnt to twice the rcvegrcnt
    - pcie_caps=0x51

    The rcvhdrcnt at twice the egrcount allows the preemptive NAK code
    during reception to function in 100% of the cases rather than a sender
    jiffies-based timeout.

    The pcie_caps default of 0x51 will set the proposed MaxPayload and
    MaxReceiveReqest to 256 and 4096 respectively. The capabilities on
    the root complex will be used to limit those values.

    Reviewed-by: Ram Vepa
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Roland Dreier

    Mike Marciniszyn
     
  • The current code locks the QP s_lock, followed by the pending_lock, I
    guess to to protect against the allocate failing.

    This patch only locks the pending_lock, assuming that the empty case
    is an exeception, in which case the pending_lock is dropped, and the
    original code is executed. This will save a lock of s_lock in the
    normal case.

    The observation is that the sdma descriptors will deplete at twice the
    rate of txreq's, so this should be rare.

    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Roland Dreier

    Mike Marciniszyn
     
  • Prevent a receive data corruption by ensuring that the write to update
    the rcvhdrheadn register to generate an interrupt is at the very end
    of the receive processing.

    Signed-off-by: Ramkrishna Vepa
    Signed-off-by: Mike Marciniszyn
    Cc:
    Signed-off-by: Roland Dreier

    Ram Vepa
     
  • The qib driver makes use of the the 64-bit jiffies API.

    Code inspection reveals that that version of the API is not really
    required. This patch converts to use the "normal" jiffies.

    Reviewed-by: Ram Vepa
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Roland Dreier

    Mike Marciniszyn
     
  • More style issues revealed with checkpatch.pl -f.

    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Roland Dreier

    Mike Marciniszyn
     
  • Userspace verbs multicast attach/detach operations on a QP are done
    while holding the rwsem of the QP for reading. That's not sufficient
    since a reader lock allows more than one reader to acquire the
    lock. However, multicast attach/detach does list manipulation that
    can corrupt the list if multiple threads run in parallel.

    Fix this by acquiring the rwsem as a writer to serialize attach/detach
    operations. Add idr_write_qp() and put_qp_write() to encapsulate
    this.

    This fixes oops seen when running applications that perform multicast
    joins/leaves.

    Reported by: Mike Dubman
    Signed-off-by: Eli Cohen
    Cc:
    Signed-off-by: Roland Dreier

    Eli Cohen
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • both callers of device_get_devnode() are only interested in lower 16bits
    and nobody tries to return anything wider than 16bit anyway.

    Signed-off-by: Al Viro

    Al Viro
     

24 Dec, 2011

1 commit


20 Dec, 2011

3 commits


14 Dec, 2011

3 commits


07 Dec, 2011

1 commit

  • Commit cfcde11c3d7a ("IB/mlx4: Use flow counters on IBoE ports") added
    code that sets elements of counters[] to -1 if no counter is allocated,
    but then goes ahead and passes every entry to mlx4_counter_free() on
    shutdown. This is a bad idea, especially if MLX4_DEV_CAP_FLAG_COUNTERS
    isn't set so there isn't even an underlying bitmap to free from.

    Tested-by: Sean Hefty
    Cc:
    Signed-off-by: Roland Dreier

    Roland Dreier
     

06 Dec, 2011

6 commits


03 Dec, 2011

1 commit


01 Dec, 2011

1 commit


30 Nov, 2011

3 commits

  • Roland Dreier
     
  • Commit f2c31e32b37 ("net: fix NULL dereferences in check_peer_redir()")
    forgot to take care of infiniband uses of dst neighbours.

    Many thanks to Marc Aurele who provided a nice bug report and feedback.

    Reported-by: Marc Aurele La France
    Signed-off-by: Eric Dumazet
    Cc: David Miller
    Cc:
    Signed-off-by: Roland Dreier

    Eric Dumazet
     
  • This following can occur with ipoib when processing a multicast reponse:

    BUG: soft lockup - CPU#0 stuck for 67s! [ib_mad1:982]
    Modules linked in: ...
    CPU 0:
    Modules linked in: ...
    Pid: 982, comm: ib_mad1 Not tainted 2.6.32-131.0.15.el6.x86_64 #1 ProLiant DL160 G5
    RIP: 0010:[] [] _spin_unlock_irqrestore+0x17/0x20
    RSP: 0018:ffff8802119ed860 EFLAGS: 00000246
    0000000000000004 RBX: ffff8802119ed860 RCX: 000000000000a299
    RDX: ffff88021086c700 RSI: 0000000000000246 RDI: 0000000000000246
    RBP: ffffffff8100bc8e R08: ffff880210ac229c R09: 0000000000000000
    R10: ffff88021278aab8 R11: 0000000000000000 R12: ffff8802119ed860
    R13: ffffffff8100be6e R14: 0000000000000001 R15: 0000000000000003
    FS: 0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
    CR2: 00000000006d4840 CR3: 0000000209aa5000 CR4: 00000000000406f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Call Trace:
    [] ? ipoib_mcast_send+0x157/0x480 [ib_ipoib]
    [] ? apic_timer_interrupt+0xe/0x20
    [] ? apic_timer_interrupt+0xe/0x20
    [] ? ipoib_path_lookup+0x124/0x2d0 [ib_ipoib]
    [] ? ipoib_start_xmit+0x17c/0x430 [ib_ipoib]
    [] ? dev_hard_start_xmit+0x2c8/0x3f0
    [] ? sch_direct_xmit+0x15a/0x1c0
    [] ? dev_queue_xmit+0x388/0x4d0
    [] ? ipoib_mcast_join_finish+0x2c7/0x510 [ib_ipoib]
    [] ? ipoib_mcast_sendonly_join_complete+0x1b8/0x1f0 [ib_ipoib]
    [] ? mcast_work_handler+0x1a6/0x710 [ib_sa]
    [] ? ib_send_mad+0xfe/0x3c0 [ib_mad]
    [] ? ib_get_cached_lmc+0xa3/0xb0 [ib_core]
    [] ? join_handler+0xeb/0x200 [ib_sa]
    [] ? ib_sa_mcmember_rec_callback+0x5c/0xa0 [ib_sa]
    [] ? recv_handler+0x3c/0x70 [ib_sa]
    [] ? ib_mad_completion_handler+0x844/0x9d0 [ib_mad]
    [] ? ib_mad_completion_handler+0x0/0x9d0 [ib_mad]
    [] ? worker_thread+0x170/0x2a0
    [] ? autoremove_wake_function+0x0/0x40
    [] ? worker_thread+0x0/0x2a0
    [] ? kthread+0x96/0xa0
    [] ? child_rip+0xa/0x20

    Coinciding with stack trace is the following message:

    ib0: ib_address_create failed

    The code below in ipoib_mcast_join_finish() will note the above
    failure in the address handle but otherwise continue:

    ah = ipoib_create_ah(dev, priv->pd, &av);
    if (!ah) {
    ipoib_warn(priv, "ib_address_create failed\n");
    } else {

    The while loop at the bottom of ipoib_mcast_join_finish() will attempt
    to send queued multicast packets in mcast->pkt_queue and eventually
    end up in ipoib_mcast_send():

    if (!mcast->ah) {
    if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE)
    skb_queue_tail(&mcast->pkt_queue, skb);
    else {
    ++dev->stats.tx_dropped;
    dev_kfree_skb_any(skb);
    }

    My read is that the code will requeue the packet and return to the
    ipoib_mcast_join_finish() while loop and the stage is set for the
    "hung" task diagnostic as the while loop never sees a non-NULL ah, and
    will do nothing to resolve.

    There are GFP_ATOMIC allocates in the provider routines, so this is
    possible and should be dealt with.

    The test that induced the failure is associated with a host SM on the
    same server during a shutdown.

    This patch causes ipoib_mcast_join_finish() to exit with an error
    which will flush the queued mcast packets. Nothing is done to unwind
    the QP attached state so that subsequent sends from above will retry
    the join.

    Reviewed-by: Ram Vepa
    Reviewed-by: Gary Leshner
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Roland Dreier

    Mike Marciniszyn