[PATCH 0/8] Endpoint timeout fix, SQ flush and other misc. fixes for iw_cxgb4

2014-03-26 Thread Hariprasad Shenai
Hariprasad Shenai (1): iw_cxgb4: Use pr_warn_ratelimited Steve Wise (7): iw_cxgb4: endpoint timeout fixes iw_cxgb4: rmb() after reading valid gen bit iw_cxgb4: SQ flush fix iw_cxgb4: Max fastreg depth depends on DSGL support iw_cxgb4: Initialize reserved fields in a FW work request

[PATCH 5/8] iw_cxgb4: Use pr_warn_ratelimited

2014-03-26 Thread Hariprasad Shenai
Signed-off-by: Hariprasad Shenai haripra...@chelsio.com --- drivers/infiniband/hw/cxgb4/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c index cdef4d7..94b5fd9 100644 --- a/drivers

[PATCH 8/8] iw_cxgb4: Use uninitialized_var()

2014-03-26 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index e17b155..cfaa56a

[PATCH 2/8] iw_cxgb4: fix possible memory leak in RX_PKT processing

2014-03-21 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com If cxgb4_ofld_send() returns 0, then send_fw_pass_open_req() must free the request skb and the saved skb with the tcp header. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 9 - 1 file changed, 8

[PATCH 0/8] Mem leak, locking and other misc. fixes for iw_cxgb4

2014-03-21 Thread Hariprasad Shenai
Hi All, This patch series provides fixes related to memory leak, one fix related to locking and other miscelleneous fixes for Chelsio T4/T5 adapters on iw_cxgb4. The patches series is created against 'infiniband' tree, 'for-next' branch. And includes patches on iw_cxgb4 driver. These patches

[PATCH 5/8] iw_cxgb4: update snd_seq when sending MPA messages

2014-03-21 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 6bfef31..a1bc41d 100644 ---

[PATCH 1/8] iw_cxgb4: don't leak skb in c4iw_uld_rx_handler()

2014-03-21 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/device.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index

[PATCH 8/8] iw_cxgb4: rx_data() needs to hold the ep mutex

2014-03-21 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com To avoid racing with other threads doing close/flush/whatever, rx_data() should hold the endpoint mutex. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 16 +--- 1 file changed, 9

[PATCH 7/8] iw_cxgb4: drop RX_DATA packets if the endpoint is gone

2014-03-21 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index b8f9e75..57344a3 100644 ---

[PATCH 6/8] iw_cxgb4: lock around accept/reject downcalls

2014-03-21 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com There is a race between ULP threads doing an accept/reject, and the ingress processing thread handling close/abort for the same connection. The accept/reject path needs to hold the lock to serialize these paths. Signed-off-by: Steve Wise

[PATCH 0/8] Misc. fixes for iw_cxgb4

2014-03-19 Thread Hariprasad Shenai
Hi All, This patch series provides miscelleneous fixes for Chelsio T4/T5 adapters related to iw_cxgb4. The patches series is created against 'linux-next' tree. And includes patches on iw_cxgb4 driver. Also, these patches are dependent on following two commits present in linux-next tree:

[PATCH 7/8] iw_cxgb4: default peer2peer mode to 1

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index

[PATCH 6/8] iw_cxgb4: Mind the sq_sig_all/sq_sig_type QP attributes

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 + drivers/infiniband/hw/cxgb4/qp.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH 3/8] iw_cxgb4: release neigh entry

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Always release the neigh entry in rx_pkt(). Based on original work by Santosh Rastapur sant...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 8/8] iw_cxgb4: save the correct map length for fast_reg_page_lists

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com We cannot save the mapped length using the rdma max_page_list_len field of the ib_fast_reg_page_list struct because the core code uses it. This results in an incorrect unmap of the page list in c4iw_free_fastreg_pbl(). I found this with dma map

[PATCH 1/8] iw_cxgb4: cap CQ size at T4_MAX_IQ_SIZE

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 88de3aa..c0673ac

[PATCH 5/8] iw_cxgb4: Fix incorrect BUG_ON conditions

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Based on original work from Jay Hernandez j...@chelsio.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 2/8] iw_cxgb4: Allow loopback connections

2014-03-19 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com find_route() must treat loopback as a valid egress interface. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 1/2] cxgb4/iw_cxgb4: Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice

2014-03-14 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Based on original work by Anand Priyadarshee ana...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c| 24 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 1 +

[PATCH net-next 0/2] Doorbell drop Avoidance Bug fix for iw_cxgb4

2014-03-14 Thread Hariprasad Shenai
Hi All, This patch series provides fixes for Chelsio T4/T5 adapters related to DB Drop avoidance and other small fix related to keepalive on iw-cxgb4. The patches series is created against David Miller's 'net-next' tree. And includes patches on cxgb4 and iw_cxgb4 driver. We would like to

[PATCH net-next 2/2] cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes

2014-03-14 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com The current logic suffers from a slow response time to disable user DB usage, and also fails to avoid DB FIFO drops under heavy load. This commit fixes these deficiencies and makes the avoidance logic more optimal. This is done by more efficiently

[PATCHv6 net-next 00/31] Misc. fixes for cxgb4 and iw_cxgb4

2014-03-12 Thread Hariprasad Shenai
. V3: Fixed warnings reported by checkpatch.pl --strict use networking code multi-line comments. Also includes fixes based on review comments given by Sergei Shtylyov. V2: Dont drop existing module parameters. (cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes.) Hariprasad Shenai

[PATCHv6 net-next 06/31] iw_cxgb4: cap CQ size at T4_MAX_IQ_SIZE

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 88de3aa..c0673ac

[PATCHv6 net-next 08/31] iw_cxgb4: release neigh entry

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Always release the neigh entry in rx_pkt(). Based on original work by Santosh Rastapur sant...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCHv6 net-next 03/31] cxgb4: Rectify emitting messages about SGE Ingress DMA channels being potentially stuck

2014-03-12 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 9 ++- drivers/net/ethernet/chelsio/cxgb4/sge.c | 90 -- 2 files

[PATCHv6 net-next 09/31] iw_cxgb4: Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Based on original work by Anand Priyadarshee ana...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c| 24 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 1 +

[PATCHv6 net-next 27/31] iw_cxgb4: wc_wmb() needed after DB writes

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Need to do an sfence after both the WC and regular PIDX DB write. Otherwise the host might reorder things and cause work request corruption (seen with NFSRDMA). Signed-off-by: Steve Wise sw...@opengridcomputing.com ---

[PATCHv6 net-next 18/31] iw_cxgb4: ignore read reponse type 1 CQEs

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com These are generated by HW in some error cases and need to be silently discarded. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 24 1 file changed, 20 insertions(+), 4

[PATCHv6 net-next 12/31] iw_cxgb4: Fix incorrect BUG_ON conditions

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Based on original work from Jay Hernandez j...@chelsio.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCHv6 net-next 21/31] iw_cxgb4: update snd_seq when sending MPA messages

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 0663fc4..87bd3c8 100644 ---

[PATCHv6 net-next 20/31] iw_cxgb4: adjust tcp snd/rcv window based on link speed

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com 40G devices need a bigger windows, so default 40G devices to snd 512K rcv 1024K. Fixed a bug that shows up with recv window sizes that exceed the size of the RCV_BUFSIZ field in opt0 (= 1024K :). If the recv window exceeds this, then we specify the

[PATCHv6 net-next 31/31] iw_cxgb4: Use pr_warn_ratelimited

2014-03-12 Thread Hariprasad Shenai
Signed-off-by: Hariprasad Shenai haripra...@chelsio.com --- drivers/infiniband/hw/cxgb4/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c index d9bc9ba..67df71a 100644 --- a/drivers

[PATCHv6 net-next 15/31] iw_cxgb4: save the correct map length for fast_reg_page_lists

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com We cannot save the mapped length using the rdma max_page_list_len field of the ib_fast_reg_page_list struct because the core code uses it. This results in an incorrect unmap of the page list in c4iw_free_fastreg_pbl(). I found this with dma map

[PATCHv6 net-next 07/31] iw_cxgb4: Allow loopback connections

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com find_route() must treat loopback as a valid egress interface. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCHv6 net-next 04/31] cxgb4: Updates for T5 SGE's Egress Congestion Threshold

2014-03-12 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/sge.c | 18 +- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 6 ++ 2 files changed,

[PATCHv6 net-next 10/31] cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com The current logic suffers from a slow response time to disable user DB usage, and also fails to avoid DB FIFO drops under heavy load. This commit fixes these deficiencies and makes the avoidance logic more optimal. This is done by more efficiently

[PATCHv6 net-next 16/31] iw_cxgb4: don't leak skb in c4iw_uld_rx_handler()

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/device.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index

[PATCHv6 net-next 13/31] iw_cxgb4: Mind the sq_sig_all/sq_sig_type QP attributes

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 + drivers/infiniband/hw/cxgb4/qp.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCHv6 net-next 05/31] cxgb4: Calculate len properly for LSO path

2014-03-12 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Commit 0034b29 (cxgb4: Don't assume LSO only uses SGL path in t4_eth_xmit()) introduced a regression where-in length was calculated wrongly for LSO path, causing chip hangs. So, correct the calculation of len. Fixes: 0034b29 (cxgb4: Don't assume LSO only

[PATCHv6 net-next 14/31] iw_cxgb4: default peer2peer mode to 1

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index

[PATCHv6 net-next 30/31] iw_cxgb4: Max fastreg depth depends on DSGL support

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com The max depth of a fastreg mr depends on whether the device supports DSGL or not. So compute it dynamically based on the device support and the module use_dsgl option. Signed-off-by: Steve Wise sw...@opengridcomputing.com ---

[PATCHv6 net-next 11/31] iw_cxgb4: use the BAR2/WC path for kernel QPs and T5 devices

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/device.c | 41 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 ++ drivers/infiniband/hw/cxgb4/qp.c | 59 +---

[PATCHv6 net-next 24/31] iw_cxgb4: rx_data() needs to hold the ep mutex

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com To avoid racing with other threads doing close/flush/whatever, rx_data() should hold the endpoint mutex. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 16 +--- 1 file changed, 9

[PATCHv6 net-next 17/31] iw_cxgb4: fix possible memory leak in RX_PKT processing

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com If cxgb4_ofld_send() returns 0, then send_fw_pass_open_req() must free the request skb and the saved skb with the tcp header. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 9 - 1 file changed, 8

[PATCHv6 net-next 28/31] iw_cxgb4: SQ flush fix

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com There is a race when moving a QP from RTS-CLOSING where a SQ work request could be posted after the FW receives the RDMA_RI/FINI WR. The SQ work request will never get processed, and should be completed with FLUSHED status. Function c4iw_flush_sq(),

[PATCHv6 net-next 25/31] iw_cxgb4: endpoint timeout fixes

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com 1) timedout endpoint processing can be starved. If there is continual CPL messages flowing into the driver, the endpoint timeout processing can be starved. This condition exposed the other bugs below. Solution: In process_work(), call

[PATCHv6 net-next 26/31] iw_cxgb4: rmb() after reading valid gen bit

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Some HW platforms can reorder read operations, so we must rmb() after we see a valid gen bit in a CQE but before we read any other fields from the CQE. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/t4.h | 1 +

[PATCHv6 net-next 23/31] iw_cxgb4: drop RX_DATA packets if the endpoint is gone

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 9708987..f62801a 100644 ---

[PATCHv6 net-next 29/31] iw_cxgb4: minor fixes

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Added some missing debug stats. Use uninitialized_var(). Initialize reserved fields in a FW work request. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- drivers/infiniband/hw/cxgb4/mem.c

[PATCHv6 net-next 02/31] cxgb4: Add code to dump SGE registers when hitting idma hangs

2014-03-12 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 106 +++

[PATCHv6 net-next 22/31] iw_cxgb4: lock around accept/reject downcalls

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com There is a race between ULP threads doing an accept/reject, and the ingress processing thread handling close/abort for the same connection. The accept/reject path needs to hold the lock to serialize these paths. Signed-off-by: Steve Wise

[PATCHv6 net-next 01/31] cxgb4: Fix some small bugs in t4_sge_init_soft() when our Page Size is 64KB

2014-03-12 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com We'd come in with SGE_FL_BUFFER_SIZE[0] and [1] both equal to 64KB and the extant logic would flag that as an error. Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com ---

[PATCHv6 net-next 19/31] iw_cxgb4: connect_request_upcall fixes

2014-03-12 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com When processing an MPA Start Request, if the listening endpoint is DEAD, then abort the connection. If the IWCM returns an error, then we must abort the connection and release resources. Also abort_connection() should not post a CLOSE event, so clean

[PATCHv5 net-next 23/31] iw_cxgb4: drop RX_DATA packets if the endpoint is gone

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index f4a9ebe..e7c6dfd 100644 ---

[PATCHv5 net-next 18/31] iw_cxgb4: ignore read reponse type 1 CQEs

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com These are generated by HW in some error cases and need to be silently discarded. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 24 1 file changed, 20 insertions(+), 4

[PATCHv5 net-next 16/31] iw_cxgb4: don't leak skb in c4iw_uld_rx_handler()

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/device.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index

[PATCHv5 net-next 04/31] cxgb4: Updates for T5 SGE's Egress Congestion Threshold

2014-03-10 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/sge.c | 18 +- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 6 ++ 2 files changed,

[PATCHv5 net-next 06/31] iw_cxgb4: cap CQ size at T4_MAX_IQ_SIZE

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 88de3aa..c0673ac

[PATCHv5 net-next 08/31] iw_cxgb4: release neigh entry in error paths

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Always release the neigh entry in rx_pkt(). Based on original work by Santosh Rastapur sant...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCHv5 net-next 29/31] iw_cxgb4: minor fixes

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Added some missing debug stats. Use uninitialized_var(). Initialize reserved fields in a FW work request. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- drivers/infiniband/hw/cxgb4/mem.c

[PATCHv5 net-next 28/31] iw_cxgb4: SQ flush fix

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com There is a race when moving a QP from RTS-CLOSING where a SQ work request could be posted after the FW receives the RDMA_RI/FINI WR. The SQ work request will never get processed, and should be completed with FLUSHED status. Function c4iw_flush_sq(),

[PATCHv5 net-next 13/31] iw_cxgb4: Mind the sq_sig_all/sq_sig_type QP attributes

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 + drivers/infiniband/hw/cxgb4/qp.c | 6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCHv5 net-next 19/31] iw_cxgb4: connect_request_upcall fixes

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com When processing an MPA Start Request, if the listening endpoint is DEAD, then abort the connection. If the IWCM returns an error, then we must abort the connection and release resources. Also abort_connection() should not post a CLOSE event, so clean

[PATCHv5 net-next 24/31] iw_cxgb4: rx_data() needs to hold the ep mutex

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com To avoid racing with other threads doing close/flush/whatever, rx_data() should hold the endpoint mutex. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 16 +--- 1 file changed, 9

[PATCHv5 net-next 14/31] iw_cxgb4: default peer2peer mode to 1

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index

[PATCHv5 net-next 12/31] iw_cxgb4: Fix incorrect BUG_ON conditions

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Based on original work from Jay Hernandez j...@chelsio.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCHv5 net-next 30/31] iw_cxgb4: Max fastreg depth depends on DSGL support

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com The max depth of a fastreg mr depends on whether the device supports DSGL or not. So compute it dynamically based on the device support and the module use_dsgl option. Signed-off-by: Steve Wise sw...@opengridcomputing.com ---

[PATCHv5 net-next 15/31] iw_cxgb4: save the correct map length for fast_reg_page_lists

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com We cannot save the mapped length using the rdma max_page_list_len field of the ib_fast_reg_page_list struct because the core code uses it. This results in an incorrect unmap of the page list in c4iw_free_fastreg_pbl(). I found this with dma map

[PATCHv5 net-next 26/31] iw_cxgb4: rmb() after reading valid gen bit

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Some HW platforms can reorder read operations, so we must rmb() after we see a valid gen bit in a CQE but before we read any other fields from the CQE. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/t4.h | 1 +

[PATCHv5 net-next 11/31] iw_cxgb4: use the BAR2/WC path for kernel QPs and T5 devices

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/device.c | 41 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 ++ drivers/infiniband/hw/cxgb4/qp.c | 59 +---

[PATCHv5 net-next 21/31] iw_cxgb4: update snd_seq when sending MPA messages

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index f6891b8..95b3c01 100644 ---

[PATCHv5 net-next 25/31] iw_cxgb4: endpoint timeout fixes

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com 1) timedout endpoint processing can be starved. If there is continual CPL messages flowing into the driver, the endpoint timeout processing can be starved. This condition exposed the other bugs below. Solution: In process_work(), call

[PATCHv5 net-next 10/31] cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com The current logic suffers from a slow response time to disable user DB usage, and also fails to avoid DB FIFO drops under heavy load. This commit fixes these deficiencies and makes the avoidance logic more optimal. This is done by more efficiently

[PATCHv5 net-next 07/31] iw_cxgb4: Allow loopback connections

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com find_route() must treat loopback as a valid egress interface. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCHv5 net-next 17/31] iw_cxgb4: fix possible memory leak in RX_PKT processing

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com If cxgb4_ofld_send() returns 0, then send_fw_pass_open_req() must free the request skb and the saved skb with the tcp header. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 9 - 1 file changed, 8

[PATCHv5 net-next 05/31] cxgb4: Calculate len properly for LSO path

2014-03-10 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Commit 0034b29 (cxgb4: Don't assume LSO only uses SGL path in t4_eth_xmit()) introduced a regression where-in length was calculated wrongly for LSO path, causing chip hangs. So, correct the calculation of len. Fixes: 0034b29 (cxgb4: Don't assume LSO only

[PATCHv5 net-next 03/31] cxgb4: Rectify emitting messages about SGE Ingress DMA channels being potentially stuck

2014-03-10 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 9 ++- drivers/net/ethernet/chelsio/cxgb4/sge.c | 90 -- 2 files

[PATCHv5 net-next 22/31] iw_cxgb4: lock around accept/reject downcalls

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com There is a race between ULP threads doing an accept/reject, and the ingress processing thread handling close/abort for the same connection. The accept/reject path needs to hold the lock to serialize these paths. Signed-off-by: Steve Wise

[PATCHv5 net-next 31/31] iw_cxgb4: Use pr_warn_ratelimited

2014-03-10 Thread Hariprasad Shenai
Signed-off-by: Hariprasad Shenai haripra...@chelsio.com --- drivers/infiniband/hw/cxgb4/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c index d9bc9ba..67df71a 100644 --- a/drivers

[PATCHv5 net-next 00/31] Misc. fixes for cxgb4 and iw_cxgb4

2014-03-10 Thread Hariprasad Shenai
. (cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes.) Hariprasad Shenai (1): iw_cxgb4: Use pr_warn_ratelimited Kumar Sanghvi (5): cxgb4: Fix some small bugs in t4_sge_init_soft() when our Page Size is 64KB cxgb4: Add code to dump SGE registers when hitting idma hangs cxgb4: Rectify

[PATCHv5 net-next 01/31] cxgb4: Fix some small bugs in t4_sge_init_soft() when our Page Size is 64KB

2014-03-10 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com We'd come in with SGE_FL_BUFFER_SIZE[0] and [1] both equal to 64KB and the extant logic would flag that as an error. Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com ---

[PATCHv5 net-next 27/31] iw_cxgb4: wc_wmb() needed after DB writes

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Need to do an sfence after both the WC and regular PIDX DB write. Otherwise the host might reorder things and cause work request corruption (seen with NFSRDMA). Signed-off-by: Steve Wise sw...@opengridcomputing.com ---

[PATCHv5 net-next 20/31] iw_cxgb4: adjust tcp snd/rcv window based on link speed

2014-03-10 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com 40G devices need a bigger windows, so default 40G devices to snd 512K rcv 1024K. Fixed a bug that shows up with recv window sizes that exceed the size of the RCV_BUFSIZ field in opt0 (= 1024K :). If the recv window exceeds this, then we specify the

[PATCHv5 net-next 02/31] cxgb4: Add code to dump SGE registers when hitting idma hangs

2014-03-10 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 106 +++

[PATCHv4 net-next 00/32] Misc. fixes for cxgb4 and iw_cxgb4

2014-03-07 Thread Hariprasad Shenai
comments. Also includes fixes based on review comments given by Sergei Shtylyov. V2: Dont drop existing module parameters. (cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes.) Hariprasad Shenai (1): iw_cxgb4: Use pr_warn_ratelimited Kumar Sanghvi (6): cxgb4: Fix some small bugs

[PATCHv4 net-next 06/32] cxgb4: Calculate len properly for LSO path

2014-03-07 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Commit 0034b29 (cxgb4: Don't assume LSO only uses SGL path in t4_eth_xmit()) introduced a regression where-in length was calculated wrongly for LSO path, causing chip hangs. So, correct the calculation of len. Fixes: 0034b29 (cxgb4: Don't assume LSO only

[PATCHv4 net-next 02/32] cxgb4: Add code to dump SGE registers when hitting idma hangs

2014-03-07 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 106 +++

[PATCHv4 net-next 10/32] iw_cxgb4: Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Based on original work by Anand Priyadarshee ana...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c| 24 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 1 +

[PATCHv4 net-next 09/32] iw_cxgb4: release neigh entry in error paths

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Always release the neigh entry in rx_pkt(). Based on original work by Santosh Rastapur sant...@chelsio.com. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCHv4 net-next 05/32] cxgb4: use spinlock_irqsave/spinlock_irqrestore for db lock

2014-03-07 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Currently ring_tx_db() can deadlock if a db_full interrupt fires and is run on the same while ring_tx_db() has the db lock held. It needs to disable interrupts since it serializes with an interrupt handler. Based on original work by Steve Wise

[PATCHv4 net-next 01/32] cxgb4: Fix some small bugs in t4_sge_init_soft() when our Page Size is 64KB

2014-03-07 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com We'd come in with SGE_FL_BUFFER_SIZE[0] and [1] both equal to 64KB and the extant logic would flag that as an error. Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com ---

[PATCHv4 net-next 03/32] cxgb4: Rectify emitting messages about SGE Ingress DMA channels being potentially stuck

2014-03-07 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 9 ++- drivers/net/ethernet/chelsio/cxgb4/sge.c | 90 -- 2 files

[PATCHv4 net-next 27/32] iw_cxgb4: rmb() after reading valid gen bit

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Some HW platforms can reorder read operations, so we must rmb() after we see a valid gen bit in a CQE but before we read any other fields from the CQE. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/t4.h | 1 +

[PATCHv4 net-next 28/32] iw_cxgb4: wc_wmb() needed after DB writes

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Need to do an sfence after both the WC and regular PIDX DB write. Otherwise the host might reorder things and cause work request corruption (seen with NFSRDMA). Signed-off-by: Steve Wise sw...@opengridcomputing.com ---

[PATCHv4 net-next 04/32] cxgb4: Updates for T5 SGE's Egress Congestion Threshold

2014-03-07 Thread Hariprasad Shenai
From: Kumar Sanghvi kuma...@chelsio.com Based on original work by Casey Leedom lee...@chelsio.com Signed-off-by: Kumar Sanghvi kuma...@chelsio.com --- drivers/net/ethernet/chelsio/cxgb4/sge.c | 18 +- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 6 ++ 2 files changed,

[PATCHv4 net-next 07/32] iw_cxgb4: cap CQ size at T4_MAX_IQ_SIZE

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 88de3aa..c0673ac

[PATCHv4 net-next 18/32] iw_cxgb4: fix possible memory leak in RX_PKT processing

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com If cxgb4_ofld_send() returns 0, then send_fw_pass_open_req() must free the request skb and the saved skb with the tcp header. Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 9 - 1 file changed, 8

[PATCHv4 net-next 23/32] iw_cxgb4: lock around accept/reject downcalls

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com There is a race between ULP threads doing an accept/reject, and the ingress processing thread handling close/abort for the same connection. The accept/reject path needs to hold the lock to serialize these paths. Signed-off-by: Steve Wise

[PATCHv4 net-next 24/32] iw_cxgb4: drop RX_DATA packets if the endpoint is gone

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index f4a9ebe..e7c6dfd 100644 ---

[PATCHv4 net-next 12/32] iw_cxgb4: use the BAR2/WC path for kernel QPs and T5 devices

2014-03-07 Thread Hariprasad Shenai
From: Steve Wise sw...@opengridcomputing.com Signed-off-by: Steve Wise sw...@opengridcomputing.com --- drivers/infiniband/hw/cxgb4/device.c | 41 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 ++ drivers/infiniband/hw/cxgb4/qp.c | 59 +---

<    1   2   3   4   >