- 17 2月, 2016 1 次提交
-
-
由 Devesh Sharma 提交于
Today ocrdma driver defer arming the CQ till poll is called. This was used to prevent calling poll-cq on an armed CQ. Recently a set of new CQ API has been introduced into the linux kernel. The implementation of this API guarantees that a given CQ is never armed before calling poll on it. Most of the kernel ULPs have already moved to use this new API or have a code where poll is called before arming the CQ. Thus, the above workaround in ocrdma is not needed anymore. This patch removes the additional logic to deffer arm till poll is called. This patch adds a simple scheme where ib_req_notify_cq() will actually arm the cq. Signed-off-by: NDevesh Sharma <devesh.sharma@broadcom.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 06 2月, 2016 2 次提交
-
-
由 Selvin Xavier 提交于
Currently returning the pkey value instead of pkey index. pkey index is always zero since ocrdma supports only default pkey. Signed-off-by: NSelvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Selvin Xavier 提交于
max_sge_rd is used by some of the ULPs to calculate the maximum number of SGEs that can be used for RDMA READ. Populating this value in the response of query_device verb. Also, avoid checking the max_srq_sge while populating max_sge. Signed-off-by: NSelvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 20 1月, 2016 1 次提交
-
-
由 Devesh Sharma 提交于
Recently Dough Ledford reported a deadlock happening between ocrdma-load sequence and NetworkManager service issuing "open" on be2net interface. The deadlock happens when any be2net hook (e.g. open/close) is called in parallel to insmod ocrdma.ko. A. be2net is sending administrative open/close event to ocrdma holding device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net. So sequence of locks is rtnl_lock---> device_list lock B. When new ocrdma roce device gets registered, infiniband stack now takes rtnl_lock in ib_register_device() in GID initialization routines. So sequence of locks in this path is device_list lock ---> rtnl_lock. This improper locking sequence causes deadlock. With this patch we stop using administrative open and close events injected by be2net driver. These events were used to dispatch PORT_ACTIVE and PORT_ERROR events to the IB-stack. This patch implements a logic to receive async-link-events generated from CNA whenever link-state-change is detected. Now on, these async-events will be used to dispatch PORT_ACTIVE and PORT_ERROR events to IB-stack. Depending on async-events from CNA removes the need to hold device-list-mutex and thus breaks the busy-wait scenario. Reported-by: NDoug Ledford <dledford@redhat.com> CC: Sathya Perla <sathya.perla@avagotech.com> Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: NSelvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 29 12月, 2015 1 次提交
-
-
由 Devesh Sharma 提交于
Recently Dough Ledford reported a deadlock happening between ocrdma-load sequence and NetworkManager service issuing "open" on be2net interface. The deadlock happens when any be2net hook (e.g. open/close) is called in parallel to insmod ocrdma.ko. A. be2net is sending administrative open/close event to ocrdma holding device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net. So sequence of locks is rtnl_lock---> device_list lock B. When new ocrdma roce device gets registered, infiniband stack now takes rtnl_lock in ib_register_device() in GID initialization routines. So sequence of locks in this path is device_list lock ---> rtnl_lock. This improper locking sequence causes deadlock. With this patch we stop using administrative open and close events injected by be2net driver. These events were used to dispatch PORT_ACTIVE and PORT_ERROR events to the IB-stack. This patch implements a logic to receive async-link-events generated from CNA whenever link-state-change is detected. Now on, these async-events will be used to dispatch PORT_ACTIVE and PORT_ERROR events to IB-stack. Depending on async-events from CNA removes the need to hold device-list-mutex and thus breaks the busy-wait scenario. Reported-by: NDoug Ledford <dledford@redhat.com> CC: Sathya Perla <sathya.perla@avagotech.com> Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: NSelvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 24 12月, 2015 1 次提交
-
-
由 Christoph Hellwig 提交于
We have stopped using phys MRs in the kernel a while ago, so let's remove all the cruft used to implement them. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NSagi Grimberg <sagig@mellanox.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> [core] Reviewed-By: Devesh Sharma<devesh.sharma@avagotech.com> [ocrdma] Reviewed-by: NSteve Wise <swise@opengridcomputing.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 29 10月, 2015 2 次提交
-
-
由 Sagi Grimberg 提交于
No ULP uses it anymore, go ahead and remove it. Signed-off-by: NSagi Grimberg <sagig@mellanox.com> Acked-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Sagi Grimberg 提交于
Support the new memory registration API by allocating a private page list array in ocrdma_mr and populate it when ocrdma_map_mr_sg is invoked. Also, support IB_WR_REG_MR by duplicating IB_WR_FAST_REG_MR, but take the needed information from different places: - page_size, iova, length, access flags (ib_mr) - page array (ocrdma_mr) - key (ib_reg_wr) The IB_WR_FAST_REG_MR handlers will be removed later when all the ULPs will be converted. Signed-off-by: NSagi Grimberg <sagig@mellanox.com> Acked-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 22 10月, 2015 2 次提交
-
-
由 Matan Barak 提交于
Adding an ability to query the IB cache by a netdev and get the attributes of a GID. These parameters are necessary in order to successfully resolve the required GID (when the netdevice is known) and get the Ethernet L2 attributes from a GID. Signed-off-by: NMatan Barak <matanb@mellanox.com> Reviewed-By: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Devesh Sharma 提交于
Changing CQ-Doorbell(DB) logic to prevent DB floods, it is supposed to be pressed only if any hw CQE is polled. If cq-arm was requested previously then don't bother about number of hw CQEs polled and arm the CQ. Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NSelvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 08 10月, 2015 1 次提交
-
-
由 Christoph Hellwig 提交于
This patch split up struct ib_send_wr so that all non-trivial verbs use their own structure which embedds struct ib_send_wr. This dramaticly shrinks the size of a WR for most common operations: sizeof(struct ib_send_wr) (old): 96 sizeof(struct ib_send_wr): 48 sizeof(struct ib_rdma_wr): 64 sizeof(struct ib_atomic_wr): 96 sizeof(struct ib_ud_wr): 88 sizeof(struct ib_fast_reg_wr): 88 sizeof(struct ib_bind_mw_wr): 96 sizeof(struct ib_sig_handover_wr): 80 And with Sagi's pending MR rework the fast registration WR will also be down to a reasonable size: sizeof(struct ib_fastreg_wr): 64 Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> [srp, srpt] Reviewed-by: Chuck Lever <chuck.lever@oracle.com> [sunrpc] Tested-by: NHaggai Eran <haggaie@mellanox.com> Tested-by: NSagi Grimberg <sagig@mellanox.com> Tested-by: NSteve Wise <swise@opengridcomputing.com>
-
- 31 8月, 2015 2 次提交
-
-
由 Somnath Kotur 提交于
1.Change query_gid hook to return value from IB/Core GID management APIs. 2.Get rid of all the netdev notifier chain subscription code as well as maintenance of SGID Table in memory. 3.Implement get_netdev hook in driver. Signed-off-by: NSomnath Kotur <somnath.kotur@avagotech.com> Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Sagi Grimberg 提交于
Signed-off-by: NSagi Grimberg <sagig@mellanox.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 24 7月, 2015 1 次提交
-
-
由 Devesh Sharma 提交于
Change of license from GPLv2 to dual-license (GPLv2 and BSD 2-Clause) All contributors were contacted off-list and permission to make this change was received. The complete list of contributors are Cc:ed here. Cc: Tejun Heo <tj@kernel.org> Cc: Duan Jiong <duanj.fnst@cn.fujitsu.com> Cc: Roland Dreier <roland@purestorage.com> Cc: Jes Sorensen <Jes.Sorensen@redhat.com> Cc: Sasha Levin <levinsasha928@gmail.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Colin Ian King <colin.king@canonical.com> Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Cc: Moni Shoua <monis@mellanox.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Li RongQing <roy.qing.li@gmail.com> Cc: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 13 6月, 2015 2 次提交
-
-
由 Matan Barak 提交于
Vendors should be able to pass vendor specific data to/from user-space via query_device uverb. In order to do this, we need to pass the vendors' specific udata. Signed-off-by: NMatan Barak <matanb@mellanox.com> Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Matan Barak 提交于
Add a new ib_cq_init_attr structure which contains the previous cqe (minimum number of CQ entries) and comp_vector (completion vector) in addition to a new flags field. All vendors' create_cq callbacks are changed in order to work with the new API. This commit does not change any functionality. Signed-off-by: NMatan Barak <matanb@mellanox.com> Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com> Reviewed-By: Devesh Sharma <devesh.sharma@avagotech.com> to patch #2Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 11 6月, 2015 1 次提交
-
-
由 Colin Ian King 提交于
A reorganisation of the PD allocation and deallocation in commit 9ba1377d ("RDMA/ocrdma: Move PD resource management to driver.") introduced a double free on pd, as detected by static analysis by smatch: drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:682 ocrdma_alloc_pd() error: double free of 'pd'^ The original call to ocrdma_mbx_dealloc_pd() (which does not kfree pd) was replaced with a call to _ocrdma_dealloc_pd() (which does kfree pd). The kfree following this call causes the double free, so just remove it to fix the problem. Fixes: 9ba1377d ("RDMA/ocrdma: Move PD resource management to driver.") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-By: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 02 6月, 2015 1 次提交
-
-
由 Roland Dreier 提交于
If ocrdma_get_pd_num() fails, then we need to free the pd struct we allocated. This was detected by Coverity (CID 1271245). Signed-off-by: NRoland Dreier <roland@purestorage.com> Acked-By: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 21 5月, 2015 1 次提交
-
-
由 Ira Weiny 提交于
Remove query_protocol callback Use the new Core Capability bits for: rdma_protocol_* rdma_cap_ib_mad rdma_cap_ib_smi rdma_cap_ib_cm rdma_cap_iw_cm rdma_cap_ib_sa rdma_cap_ib_mcast rdma_cap_af_ib rdma_cap_eth_ah Signed-off-by: NIra Weiny <ira.weiny@intel.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 19 5月, 2015 1 次提交
-
-
由 Michael Wang 提交于
Add new callback query_protocol() and implement for each HW. Mapping List: node-type link-layer transport protocol nes RNIC ETH IWARP IWARP amso1100 RNIC ETH IWARP IWARP cxgb3 RNIC ETH IWARP IWARP cxgb4 RNIC ETH IWARP IWARP usnic USNIC_UDP ETH USNIC_UDP USNIC_UDP ocrdma IB_CA ETH IB IBOE mlx4 IB_CA IB/ETH IB IB/IBOE mlx5 IB_CA IB IB IB ehca IB_CA IB IB IB ipath IB_CA IB IB IB mthca IB_CA IB IB IB qib IB_CA IB IB IB Signed-off-by: NMichael Wang <yun.wang@profitbricks.com> Reviewed-by: NIra Weiny <ira.weiny@intel.com> Tested-by: NIra Weiny <ira.weiny@intel.com> Reviewed-by: NSean Hefty <sean.hefty@intel.com> Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: NDoug Ledford <dledford@redhat.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 18 5月, 2015 2 次提交
-
-
由 Mitesh Ahuja 提交于
If DPP PDs are not supported by the FW, allocate only normal PDs. Signed-off-by: NMitesh Ahuja <mitesh.ahuja@avagotech.com> Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: NSelvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
由 Devesh Sharma 提交于
Don't move QP to error state, if QP is in reset state during QP destroy operation. Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: NSelvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
-
- 19 2月, 2015 10 次提交
-
-
由 Dan Carpenter 提交于
The ->sgid_tbl[] array has OCRDMA_MAX_SGID number of elements so this test is off by one. ->sgid_tbl is allocated in ocrdma_alloc_resources(). Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Rasmus Villemoes 提交于
In the expressions idx/32 and idx%32, both idx and 32 have signed type, and unfortunately the C standard prescribes rounding to 0, so unless gcc can prove that idx is non-negative, these cannot be implemented as simple shift respectively mask operations. Help gcc by changing the type of idx to unsigned - this cuts another few instructions from the generated code. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Rasmus Villemoes 提交于
gcc emits a surprising amount of code in order to flip a bit. One would think that a single instruction is enough. $ scripts/bloat-o-meter /tmp/ocrdma_verbs.o drivers/infiniband/hw/ocrdma/ocrdma_verbs.o add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-142 (-142) function old new delta ocrdma_post_srq_recv 498 460 -38 ocrdma_poll_cq 2010 1962 -48 ocrdma_discard_cqes 495 439 -56 All three calls of ocrdma_srq_toggle_bit happen within spinlocks, so saving a few useless instructions might be worthwhile. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Devesh Sharma 提交于
For the AH that describs a VLAN interface details, vlan present bit needs to be set during posting a WQE. This patch adds the code to allow it happening. Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Mitesh Ahuja 提交于
Use get_ocrdma_dev(ocrdma_qp->ibqp.device) function to access ocrdma device pointer. Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Devesh Sharma 提交于
Remove support for RDMA-READ-WITH-INVALIDATE from ocrdma driver. Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Mitesh Ahuja 提交于
1. Cleanup sequence in ocrdma_remove(). The device should be unregistered from IB stack before any device specific cleanup. 2. Always return success in the resource destroy path. In case destroy command returns error, IB stack will trigger cleanup again while closing the uverbs device causing kernel panic BUG_ON(). Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Padmanabh Ratnakar 提交于
Fix ocrdma_query_qp to refelect correct qp state based on FW. Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Selvin Xavier 提交于
1. Add statistics counters for error cqes. 2. Add file ("reset_stats") to reset rdma stats in Debugfs. Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Mitesh Ahuja 提交于
Move PD allocation and deallocation from firmware to driver. At driver load time all the PDs will be requested from firmware and their management will be handled by driver to reduce mailbox commands overhead at runtime. Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
- 16 12月, 2014 2 次提交
-
-
由 Haggai Eran 提交于
In order to allow umems that do not pin memory, we need the umem to keep track of its region's address. This makes the offset field redundant, and so this patch removes it. Signed-off-by: NHaggai Eran <haggaie@mellanox.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Mitesh Ahuja 提交于
Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
- 11 10月, 2014 1 次提交
-
-
由 Devesh Sharma 提交于
In some platforms, when iommu is enabled, the bus address returned by dma_alloc_coherent is different than the physical address. ocrdma should use physical address for mmap-ing the queue memory for the applications. This patch adds the use of virt_to_phys() at all such places where kernel buffer is mapped to user process context. Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
- 20 9月, 2014 2 次提交
-
-
由 Devesh Sharma 提交于
When ib_request_notify_cq() is called for the first time, ocrdma tries to skip setting deffered_arm flag. This may lead CQ to an un-armed state thus never generating a CQ event and leaving consumer hung. This patch removes the part of code that skips setting deferred_arm. Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
由 Devesh Sharma 提交于
Fix ocrdma_query_device() to report correct value of max_fast_reg_page_list_len. Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
- 01 9月, 2014 1 次提交
-
-
由 Masanari Iida 提交于
This patch fix spelling typo in printk. Signed-off-by: NMasanari Iida <standby24x7@gmail.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Acked-by: NRandy Dunlap <rdunlap@infradead.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 8月, 2014 1 次提交
-
-
由 Mitesh Ahuja 提交于
Ocrdma does not report hw_ver when query_device is issued. This patch adds a meaningful value to this field. Signed-off-by: NDevesh Sharma <devesh.sharma@emulex.com> Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-
- 02 8月, 2014 1 次提交
-
-
由 Mitesh Ahuja 提交于
Update the max_mr_size with proper value. Corrected the response structure of query config mailbox command. Signed-off-by: NMitesh Ahuja <mitesh.ahuja@emulex.Com> Signed-off-by: NSelvin Xavier <selvin.xavier@emulex.com> Signed-off-by: NRoland Dreier <roland@purestorage.com>
-