aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-24IB/mlx4: Convert kmalloc to kmalloc_array for checkpatchLeon Romanovsky2-3/+3
Convert kmalloc to be kmalloc_array to fix warnings below: WARNING: Prefer kmalloc_array over kmalloc with multiply + qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64), WARNING: Prefer kmalloc_array over kmalloc with multiply + qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof(u64), WARNING: Prefer kmalloc_array over kmalloc with multiply + srq->wrid = kmalloc(srq->msrq.max * sizeof(u64), Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Or Gerlitz <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-24IB/mlx4: Suppress non-fatal memory allocationsLeon Romanovsky2-3/+6
Failure in kmalloc memory allocations will throw a warning about it. Such warnings are not needed anymore, since in commit 0ef2f05c7e02 ("IB/mlx4: Use vmalloc for WR buffers when needed"), fallback mechanism from kmalloc() to __vmalloc() was added. Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Or Gerlitz <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-24IB/mlx5: Advertise atomic capabilities in query deviceEran Ben Elisha2-1/+32
In order to ensure IB spec atomic correctness in atomic operations, if HW is configured to host endianness, advertise IB_ATOMIC_HCA. if not, advertise IB_ATOMIC_NONE. Signed-off-by: Eran Ben Elisha <[email protected]> Reviewed-by: Yishai Hadas <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-24net/mlx5_core: Add setting ATOMIC endian modeEran Ben Elisha2-9/+70
HW is capable of 2 requestor endianness modes for standard 8 Bytes atomic: BE (0x0) and host endianness (0x1). Read the supported modes from hca atomic capabilities and configure HW to host endianness mode if supported. Signed-off-by: Eran Ben Elisha <[email protected]> Reviewed-by: Yishai Hadas <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-24iw_cxgb3: Fix incorrectly returning error on successHariprasad S1-2/+2
The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <[email protected]> Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-24iw_cxgb4: Pass qid range to user space driverHariprasad S3-1/+12
Enhances the t4_dev_status_page to pass the qid start and size attributes from iw_cxgb4 to libcxgb4. Bump the ABI Version to 3 -> To allow libcxgb4 to detect old drivers and revert to the old way of computing the qid ranges. Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-24IB/mad: Ensure fairness in ib_mad_completion_handlerDean Luick1-0/+18
It was found that when a process was rapidly sending MADs other processes could be hung in their unregister calls. This would happen when process A was injecting packets fast enough that the single threaded workqueue was never exiting ib_mad_completion_handler. Therefore when process B called flush_workqueue via the unregister call it would hang until process A stopped sending MADs. The fix is to periodically reschedule ib_mad_completion_handler after processing a large number of completions. The number of completions chosen was decided based on the defaults for the recv queue size. However, it was kept fixed such that increasing those queue sizes would not adversely affect fairness in the future. Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dean Luick <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Add driver cross-channel supportLeon Romanovsky5-11/+72
Add support of cross-channel functionality to mlx5 driver. This includes ability to ignore overrun for CQ which intended for cross-channel, export device capability and configure the QP to be sync master/slave queues. The cross-channel enabled QP supports combination of three possible properties: * WQE processing on the receive queue of this QP * WQE processing on the send queue of this QP * WQE are supported on the send queue Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/core: Add cross-channel supportLeon Romanovsky2-1/+15
The cross-channel feature allows to execute WQEs that involve synchronization of I/O operations’ on different QPs. This capability enables to program complex flows with a single function call, hereby significantly reducing overhead associated with I/O processing. Cross-channel operations support is indicated by HCA capability information. The queue pairs can be configured to work as a “sync master queue” or “sync slave queues”. The added flags are: 1. Device capability flag IB_DEVICE_CROSS_CHANNEL for the devices that can perform cross-channel operations. 2. CQ property flag IB_CQ_FLAGS_IGNORE_OVERRUN to disable CQ overrun check. This check is useless in cross-channel scenario. 3. QP property flags to indicate if queues are slave or master: * IB_QP_CREATE_MANAGED_SEND indicates that posted send work requests will not be executed immediately and requires enabling. * IB_QP_CREATE_MANAGED_RECV indicates that posted receive work requests will not be executed immediately and requires enabling. * IB_QP_CREATE_CROSS_CHANNEL declares the QP to work in cross-channel mode. If IB_QP_CREATE_MANAGED_SEND and IB_QP_CREATE_MANAGED_RECV are not provided, this QP will be sync master queue, else it will be sync slave. Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/core: Align coding style of ib_device_cap_flags structureLeon Romanovsky1-30/+30
Modify enum ib_device_cap_flags such that other patches which add new enum values pass strict checkpatch.pl checks. Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Mmap the HCA's core clock register to user-spaceMatan Barak2-1/+31
In order to read the HCA's current cycles register, we need to map it to user-space. Add support to map this register via mmap command. Signed-off-by: Matan Barak <[email protected]> Reviewed-by: Moshe Lazer <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Add hca_core_clock_offset to udata in init_ucontextMatan Barak4-12/+47
Pass hca_core_clock_offset to user-space is mandatory in order to let the user-space read the free-running clock register from the right offset in the memory mapped page. Passing this value is done by changing the vendor's command and response of init_ucontext to be in extensible form. Signed-off-by: Matan Barak <[email protected]> Reviewed-by: Moshe Lazer <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Add support for hca_core_clock and timestamp_maskMatan Barak2-3/+8
Reporting the hca_core_clock (in kHZ) and the timestamp_mask in query_device extended verb. timestamp_mask is used by users in order to know what is the valid range of the raw timestamps, while hca_core_clock reports the clock frequency that is used for timestamps. Signed-off-by: Matan Barak <[email protected]> Reviewed-by: Moshe Lazer <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/core: Add ib_is_udata_clearedMatan Barak1-0/+27
Extending core and vendor verb commands require us to check that the unknown part of the user's given command is all zeros. Adding ib_is_udata_cleared in order to do so. Signed-off-by: Matan Barak <[email protected]> Reviewed-by: Haggai Eran <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Add create_cq extended commandMatan Barak1-0/+7
In order to create a CQ that supports timestamp, mlx5 needs to support the extended create CQ command with the timestamp flag. Signed-off-by: Matan Barak <[email protected]> Reviewed-by: Eli Cohen <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/core: Display extended counter set if availableChristoph Lameter2-3/+108
Check if the extended counters are available and if so create the proper extended and additional counters. Signed-off-by: Christoph Lameter <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Hal Rosenstock <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/core: Specify attribute_id in port_table_attributeChristoph Lameter1-2/+5
Add the attr_id on port_table_attribute since we will have to add a different port_table_attribute for the extended attribute soon. Reviewed-by: Hal Rosenstock <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/core: Create get_perf_mad function in sysfs.cChristoph Lameter1-22/+40
Create a new function to retrieve performance management data from the existing code in get_pma_counter(). Reviewed-by: Hal Rosenstock <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23MAINTAINERS: Assign maintainer to Mellanox mlx4 core and IB driversOr Gerlitz1-0/+19
The driver was written originally by Roland Dreier, currently there's no official maintainer. Yishai steps in as maintainer. Signed-off-by: Or Gerlitz <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23MAINTAINERS: Assign new maintainers to Mellanox mlx5 core and IB driversOr Gerlitz1-8/+7
Matan and Leon step in as co-maintainers to replace Eli Cohen who wrote and maintained the core and IB drivers. Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB: remove the write-only usecnt field from struct ib_mrChristoph Hellwig6-21/+1
Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB: remove the struct ib_phys_buf definitionChristoph Hellwig1-5/+0
Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23ehca: stop using struct ib_phys_bufChristoph Hellwig2-53/+46
And simplify the calling convention for full-memory registrations. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23amso1100: fold c2_reg_phys_mr into c2_get_dma_mrChristoph Hellwig1-57/+14
Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23nes: simplify nes_reg_phys_mr calling conventionsChristoph Hellwig3-116/+37
Just pass and address/size pair instead of an ib_phys_buf array. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23cxgb3: simplify iwch_get_dma_wrChristoph Hellwig3-126/+26
Fold simplified versions of build_phys_page_list and iwch_register_phys_mem into iwch_get_dma_wr now that no other callers are left. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB: remove in-kernel support for memory windowsChristoph Hellwig27-381/+16
Remove the unused ib_allow_mw and ib_bind_mw functions, remove the unused IB_WR_BIND_MW and IB_WC_BIND_MW opcodes and move ib_dealloc_mw into the uverbs module. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB: remove support for phys MRsChristoph Hellwig28-1144/+15
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: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-By: Devesh Sharma<[email protected]> [ocrdma] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB: remove ib_query_mrChristoph Hellwig5-77/+0
This functionality has no users and was only supported by the staged out EHCA driver. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> [core] Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB: start documenting device capabilitiesChristoph Hellwig1-0/+18
Just IB_DEVICE_LOCAL_DMA_LKEY and IB_DEVICE_MEM_MGT_EXTENSIONS for now as I'm most familar with those. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-By: Jason Gunthorpe <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/IPoIB: Move multicast specific code out of ipoib_main.cChristoph Lameter3-14/+23
Code cleanup to move multicast specific code that checks for a sendonly join to ipoib_multicast.c. This allows the removal of the export of __ipoib_mcast_find(). Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/IPoIB: factor out common multicast list removal codeChristoph Lameter3-17/+17
Code cleanup to remove multicast specific code from ipoib_main.c The removal of a list of multicast groups occurs in three places. Create a new function ipoib_mcast_remove_list(). Use this new function in ipoib_main.c too. That in turn allows the dropping of two functions that were exported from ipoib_multicast.c for expiration of mc groups. Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Support RoCEAchiad Shochat1-4/+44
Advertise RoCE support for IB/core layer and set the hardware to work in RoCE mode. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Add RoCE fields to Address VectorAchiad Shochat5-25/+96
Set the address handle and QP address path fields according to the link layer type (IB/Eth). Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Support IB device's callbacks for adding/deleting GIDsAchiad Shochat2-0/+109
These callbacks write into the mlx5 RoCE address table. Upon del_gid we write a zero'd GID. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Set network_hdr_type upon RoCE responder completionAchiad Shochat2-0/+23
When handling a responder completion, if the link layer is Ethernet, set the work completion network_hdr_type field according to CQE's info and the IB_WC_WITH_NETWORK_HDR_TYPE flag. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Extend query_device/port to support RoCEAchiad Shochat2-13/+69
Using the vport access functions to retrieve the Ethernet specific information and return this information in ib_query_device and ib_query_port. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23net/mlx5_core: Introduce access functions to query vport RoCE fieldsAchiad Shochat3-1/+76
Introduce access functions to query NIC vport system_image_guid, node_guid and qkey_viol_cntr. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23net/mlx5_core: Introduce access functions to enable/disable RoCEAchiad Shochat2-0/+55
A mlx5 Ethernet port must be explicitly enabled for RoCE. When RoCE is not enabled on the port, the NIC will refuse to create QPs attached to it and incoming RoCE packets will be considered by the NIC as plain Ethernet packets. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23net/mlx5_core: Break down the vport mac address query functionAchiad Shochat1-10/+17
Introduce a new function called mlx5_query_nic_vport_context(). This function gets all the NIC vport attributes from the device. The MAC address is just one of the NIC vport attributes, so mlx5_query_nic_vport_mac_address() is now just a wrapper function above mlx5_query_nic_vport_context(). More NIC vport attributes will be used in following commits. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Support IB device's callback for getting its netdevAchiad Shochat2-1/+73
For Eth ports only: Maintain a net device pointer in mlx5_ib_device and update it upon NETDEV_REGISTER and NETDEV_UNREGISTER events if the net-device and IB device have the same PCI parent device. Implement the get_netdev callback to return this net device. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/mlx5: Support IB device's callback for getting the link layerAchiad Shochat1-6/+19
Make the existing mlx5_ib_port_link_layer() signature match the ib device callback signature (add port_num parameter). Refactor it to use a sub function so that the link layer could be queried also before the ibdev is created. Signed-off-by: Achiad Shochat <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: delete unneeded IS_ERR testJulia Lawall1-2/+2
kzalloc doesn't return ERR_PTR, so there is no need to test for it. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,e; @@ * x = kzalloc(...) ... when != x = e * IS_ERR_OR_NULL(x) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Reviewed-by: Dave Goodell <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Handle 0 counts in resource allocationNelson Escobar1-25/+29
Signed-off-by: Dave Goodell <[email protected]> Reviewed-by: Reese Faucette <[email protected]> Reviewed-by: Xuyang Wang <[email protected]> Signed-off-by: Nelson Escobar <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Fix resource leak in error caseNelson Escobar1-1/+1
Signed-off-by: Dave Goodell <[email protected]> Reviewed-by: Reese Faucette <[email protected]> Reviewed-by: Xuyang Wang <[email protected]> Signed-off-by: Nelson Escobar <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Support more QP state transitionsNelson Escobar1-9/+9
They were already implemented at a lower layer, but the upper level routine placed arbitrary restrictions on which transitions were permitted. Simplify the state machine logic to live wholly in usnic_ib_qp_grp_modify. Signed-off-by: Dave Goodell <[email protected]> Reviewed-by: Reese Faucette <[email protected]> Reviewed-by: Xuyang Wang <[email protected]> Signed-off-by: Nelson Escobar <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Fix message typoNelson Escobar1-1/+1
Signed-off-by: Dave Goodell <[email protected]> Reviewed-by: Reese Faucette <[email protected]> Reviewed-by: Xuyang Wang <[email protected]> Signed-off-by: Nelson Escobar <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Fix incorrect cast in usnic_ib_fw_string_to_u64Nelson Escobar1-1/+1
Signed-off-by: Christian Benvenuti <[email protected]> Signed-off-by: Nelson Escobar <[email protected]> Reviewed-by: Dave Goodell <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Improve a failure messageNelson Escobar1-2/+3
Signed-off-by: Nelson Escobar <[email protected]> Reviewed-by: Dave Goodell <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2015-12-23IB/usnic: Remove unused prototypeNelson Escobar1-2/+0
query_protocol() was added in commit 6b90a6d66b17 ("IB/Verbs: Implement new callback query_protocol()") and then removed in commit f9b22e355d38 ("IB/core: Convert core to use bitfield for caps"). This left behind an unused prototype. Signed-off-by: Nelson Escobar <[email protected]> Reviewed-by: Dave Goodell <[email protected]> Signed-off-by: Doug Ledford <[email protected]>