Bart Van Assche
68ab66d75a
ib_srpt: Introduce ARRAY_SIZE() in srpt_add_one()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-10 12:30:40 +00:00
Bart Van Assche
f55b8d2fd0
ib_srpt: Avoid using __WARN()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4041 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-29 14:05:02 +00:00
Bart Van Assche
a8ddbf4545
ib_srpt: Correct version number
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4040 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-29 13:32:57 +00:00
Bart Van Assche
831fe6de2f
ib_srpt: Follow-up for r4035
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4036 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-29 12:06:44 +00:00
Bart Van Assche
d6318a0092
ib_srpt: Reorder statements in Makefile
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4033 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-29 10:39:18 +00:00
Bart Van Assche
393fed29d2
ib_srpt: Log a message when closing a channel because of relogin
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-21 09:24:45 +00:00
Bart Van Assche
31403966b6
ib_srpt: Avoid that very rapidly successive logins from the same initiator cause a crash
...
Fixes this bug report:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000518
IP: [<ffffffff81080112>] __lock_acquire+0x62/0x1d40
PGD 1b226f067 PUD 1b2241067 PMD 0
Oops: 0000 [#1 ] SMP
CPU 0
Modules linked in: ib_srpt scst_vdisk crc32c libcrc32c scst netconsole configfs snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device af_packet rdma_ucm rdma_cm iw_cm ib_addr ib_ipoib ib_cm ib_sa ib_uverbs ib_umad mlx4_ib ib_mad ib_core microcode cpufreq_co
nservative cpufreq_userspace cpufreq_powersave acpi_cpufreq mperf dm_mod snd_hda_codec_hdmi snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd intel_agp sr_mod mlx4_core sg intel_gtt cdrom i2c_i801 agpgart soundcore i2c_co
re snd_page_alloc pcspkr button uhci_hcd ehci_hcd sd_mod crc_t10dif usbcore edd ext3 mbcache jbd fan ata_generic ata_piix pata_marvell ahci libahci libata scsi_mod thermal processor thermal_sys hwmon
Pid: 4, comm: kworker/0:0 Not tainted 3.1.5-debug+ #1 System manufacturer P5Q DELUXE/P5Q DELUXE
RIP: 0010:[<ffffffff81080112>] [<ffffffff81080112>] __lock_acquire+0x62/0x1d40
RSP: 0018:ffff8801b50c9950 EFLAGS: 00010046
RAX: 0000000000000046 RBX: 0000000000000518 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000518
RBP: ffff8801b50c9a40 R08: 0000000000000002 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801b50aae20
R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8801bfc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000518 CR3: 00000001b1a4d000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kworker/0:0 (pid: 4, threadinfo ffff8801b50c8000, task ffff8801b50aae20)
Stack:
0000000000000006 0000000000000001 ffffffff8191ca20 ffff8801b50c99b8
ffffffff81082cae 0000000000000003 ffff8801b50aae20 0000000000000003
0000000000000002 0000000000000000 ffff8801b50c9aa0 0000000000000046
Call Trace:
[<ffffffff81082cae>] ? mark_held_locks+0x6e/0x130
[<ffffffff810823c5>] lock_acquire+0x95/0x130
[<ffffffff8103d4ee>] ? try_to_wake_up+0x2e/0x2b0
[<ffffffff813d618c>] ? _raw_spin_lock_irqsave+0x1c/0x60
[<ffffffff813d61bb>] _raw_spin_lock_irqsave+0x4b/0x60
[<ffffffff8103d4ee>] ? try_to_wake_up+0x2e/0x2b0
[<ffffffff8103d4ee>] try_to_wake_up+0x2e/0x2b0
[<ffffffff8103d7a5>] wake_up_process+0x15/0x20
[<ffffffffa0463fda>] srpt_set_ch_state_to_disc+0x5a/0x80 [ib_srpt]
[<ffffffffa0464016>] __srpt_close_ch+0x16/0xa0 [ib_srpt]
[<ffffffffa04698e6>] srpt_cm_req_recv+0x806/0xbe0 [ib_srpt]
[<ffffffffa046ac0d>] srpt_cm_handler+0x7d/0x160 [ib_srpt]
[<ffffffffa0315c85>] cm_process_work+0x25/0x110 [ib_cm]
[<ffffffffa031716c>] cm_req_handler+0x67c/0xa00 [ib_cm]
[<ffffffffa031761d>] cm_work_handler+0x12d/0x1480 [ib_cm]
[<ffffffff810629c8>] process_one_work+0x198/0x520
[<ffffffff81062959>] ? process_one_work+0x129/0x520
[<ffffffffa03174f0>] ? cm_req_handler+0xa00/0xa00 [ib_cm]
[<ffffffff810646aa>] worker_thread+0x16a/0x350
[<ffffffff81064540>] ? manage_workers+0x250/0x250
[<ffffffff81069656>] kthread+0x96/0xa0
[<ffffffff813e0b74>] kernel_thread_helper+0x4/0x10
[<ffffffff813d6d9d>] ? retint_restore_args+0xe/0xe
[<ffffffff810695c0>] ? __init_kthread_worker+0x70/0x70
[<ffffffff813e0b70>] ? gs_change+0xb/0xb
Code: 25 00 b6 00 00 4c 89 7d f8 85 c9 48 89 fb 45 0f 45 f0 41 89 f5 85 d2 0f 84 44 0d 00 00 8b 05 5a 3a 6f 00 85 c0 0f 84 c6 01 00 00
8b 03 ba 01 00 00 00 48 3d c0 75 7b 81 44 0f 44 f2 41 83 fd
RIP [<ffffffff81080112>] __lock_acquire+0x62/0x1d40
RSP <ffff8801b50c9950>
CR2: 0000000000000518
---[ end trace efbb413a57b805cb ]---
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-20 20:39:20 +00:00
Bart Van Assche
3630f4ba6c
ib_srpt: Send a reject message with non-zero reason code if session creation fails
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 19:30:21 +00:00
Bart Van Assche
c9f9f6d9b8
ib_srpt: Avoid that session registration failure causes trouble / send a reject if the transition to RTR fails.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3953 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 19:08:14 +00:00
Bart Van Assche
7ac9532359
ib_srpt: Reduce the I/O overhead slightly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3920 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-15 19:06:36 +00:00
Bart Van Assche
622d3145f7
ib_srpt: Increase default value of srp_max_req_size from 2116 to 4148 bytes.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-13 10:04:55 +00:00
Bart Van Assche
cd563e1fb7
ib_srpt: Change one occurrence of WARN_ON() into __WARN().
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-08 19:50:31 +00:00
Bart Van Assche
016798ef64
ib_srpt: Make srpt_srq_size writable
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-07 20:09:42 +00:00
Bart Van Assche
d393914d3d
ib_srpt: Make max_rsp_size writable
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3914 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-07 20:04:26 +00:00
Bart Van Assche
aad2d7cb80
ib_srpt: Simplify last WQE processing
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-06 10:35:24 +00:00
Bart Van Assche
3f9451bab8
ib_srpt: Make srpt_alloc_ioctx_ring() return NULL instead of a dangling
...
pointer if allocation fails. Reported by Dan Carpenter
<dan.carpenter@oracle.com > on the linux-rdma@vger.kernel.org mailing list.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-04 18:35:37 +00:00
Bart Van Assche
d79d58e467
ib_srpt: Further reduce number of kmalloc() calls per I/O
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3905 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-30 13:41:46 +00:00
Bart Van Assche
75fa117690
ib_srpt: Reduce number of kmalloc() calls per I/O
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-30 12:33:42 +00:00
Bart Van Assche
4847e48523
ib_srpt: Remove an unused struct member
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3903 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-30 12:29:45 +00:00
Bart Van Assche
05caa249b5
ib_srpt: Avoid a sporadic 160s delay when a session is unregistered or when removing the ib_srpt kernel module during I/O
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-26 17:42:37 +00:00
Bart Van Assche
9ea2e26aaa
ib_srpt: Avoid stopping polling too early for IB completions.
...
This resulted in unnecessary complaints about IB completions not being
received in time when removing the ib_srpt kernel module during I/O. Note:
it is still possible that such complaints occur, but much less frequent.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3899 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-25 18:05:57 +00:00
Bart Van Assche
aa12492349
ib_srpt: Make the error message about rejected login more clear
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-20 16:59:15 +00:00
Bart Van Assche
24a453bc16
ib_srpt: Avoid that the cleanup code invoked after rejecting a new initiator connection triggers a race condition
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-22 17:51:19 +00:00
Bart Van Assche
f3425ccf02
ib_srpt: Remove an outdated comment
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-22 17:49:45 +00:00
Bart Van Assche
80a0c069de
ib_srpt: Clean up two PRINT_ERROR() statements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3875 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-22 17:49:04 +00:00
Bart Van Assche
ce85be1595
ib_srpt: Remove a superfluous __srpt_close_ch() call
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-18 12:23:13 +00:00
Bart Van Assche
1c358f4222
ib_srpt: Fix "rejected SRP_LOGIN_REQ because creating a new RDMA channel failed"
...
Fix two race conditions that could trigger this failure:
- Completion thread not woken up after channel state change.
- Reception of Last WQE event before the channel queue pair was reset.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-18 11:15:17 +00:00
Bart Van Assche
afe7e9c6ec
ib_srpt: Show the state name in debug messages
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-18 11:04:10 +00:00
Bart Van Assche
407f5b0c64
Follow-up for r3866
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3867 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-18 08:01:29 +00:00
Bart Van Assche
8afd4e9d4e
ib_srpt: Reduce the Last WQE wait time
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3866 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-18 07:38:37 +00:00
Bart Van Assche
aa7647b0bb
Fix a typo introduced in r3858
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:38:09 +00:00
Bart Van Assche
191f40304d
ib_srpt: Make sure that rmmod finishes
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3858 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:24:37 +00:00
Bart Van Assche
ff60ad9a52
ib_srpt: Don't wait forever for the Last WQE event
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3857 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:23:36 +00:00
Bart Van Assche
c3c23dcb7e
ib_srpt: Make srpt_release_sdev() logging more informative
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:22:13 +00:00
Bart Van Assche
97547c2f1d
ib_srpt: Relax a WARN_ON() statement such that it doesn't fire needlessly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:21:07 +00:00
Bart Van Assche
5f0326aa3d
ib_srpt: Mask off AGN_MASK bits before invoking ib_cm_listen()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:19:45 +00:00
Bart Van Assche
40c8c3ae0a
ib_srpt: Make error reporting more detailed
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-17 15:17:41 +00:00
Bart Van Assche
c9bd29a8b9
ib_srpt: Clean up tracing statements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3821 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-18 09:08:22 +00:00
Bart Van Assche
832968b65e
ib_srpt: Builds again on 32-bit systems
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-17 08:21:08 +00:00
Bart Van Assche
0e26a6c7a5
ib_srpt: Change __constant_cpu_... into cpu_... since the latter are also evaluated at compile time
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3803 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-14 08:48:42 +00:00
Bart Van Assche
47170d1578
ib_srpt: Function tracing output format fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3798 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-03 12:46:13 +00:00
Bart Van Assche
15d2609293
ib_srpt: Avoid that removing ib_srpt while I/O is ongoing sometimes triggers a hang
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3796 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-03 12:34:31 +00:00
Bart Van Assche
84f56dfa67
srpt: Change default build mode from release to debug. Add support for "make 2debug" / "make 2release" / "make 2perf".
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3759 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-26 09:26:17 +00:00
Bart Van Assche
0e3325b705
ib_srpt: Fix an RHEL-specific compiler warning.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3750 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-24 10:56:57 +00:00
Bart Van Assche
40d862c972
ib_srpt: Update author information
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3719 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-22 11:50:11 +00:00
Bart Van Assche
6a353597eb
ib_srpt: Remove a trailing tab
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3650 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-02 11:54:14 +00:00
Bart Van Assche
42c151b01c
ib_srpt: Increase RDMA completion time from 60s to 80s such that it is above the maximum time it can take for the HCA to deliver a completion (which is 60.129s with local ack timeout = 18 and retry_cnt = 7)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3649 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-02 11:36:44 +00:00
Bart Van Assche
fa232d0c22
ib_srpt: Log QP timeout if debugging is enabled
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3648 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-01 19:26:11 +00:00
Bart Van Assche
32f5924e18
ib_srpt: Zero-initialize QP attributes before invoking ib_modify_qp()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-01 19:19:20 +00:00
Bart Van Assche
8681a0124a
ib_srpt: Avoid that failed multipart RDMA transfers cause havoc.
...
Multipart RDMA transfers can fail after one or more but not all RDMA transfers
have been initiated because either an IB cable has been pulled or the ib_srpt
kernel module has been unloaded while an RDMA transfer is being set up.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3632 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-26 14:46:23 +00:00