aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-12-12i40iw: Fix double free of QPMustafa Ismail3-6/+20
A QP can be double freed if i40iw_cm_disconn() is called while it is currently being freed by i40iw_rem_ref(). The fix in i40iw_cm_disconn() will first check if the QP is already freed before making another request for the QP to be freed. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-12i40iw: Use correct src address in memcpy to rdma stats countersShiraz Saleem1-1/+1
hw_stats is a pointer to i40_iw_dev_stats struct in i40iw_get_hw_stats(). Use hw_stats and not &hw_stats in the memcpy to copy the i40iw device stats data into rdma_hw_stats counters. Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic") Cc: [email protected] # 4.7+ Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Faisal Latif <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-12i40iw: Remove macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAGThomas Huth1-6/+0
The macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG are apparently bad - they are using the logical "&&" operation which does not make sense here. It should have been a bitwise "&" instead. Since the macros seem to be completely unused, let's simply remove them so that nobody accidentially uses them in the future. And while we're at it, also remove the unused macro I40IW_CREATE_STAG. Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Acked-by: Faisal Latif <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Add request for reset on CQP timeoutHenry Orosco2-1/+10
When CQP times out, send a request to LAN driver for reset. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Code cleanup, remove check of PBLE pagesHenry Orosco1-4/+0
Remove check for zero 'pages' of unallocated pbles calculated in add_pble_pool(); as it can never be true. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Correctly fail loopback connection if no listenerShiraz Saleem1-27/+35
Fail the connect and return the proper error code if a client is started with local IP address and there is no corresponding loopback listener. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Faisal Latif <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Fill in IRD value when on connect requestShiraz Saleem1-0/+1
IRD is not populated on connect request and application is getting 0 for the value. Fill in the correct value on connect request. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Faisal Latif <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Set TOS field in IP headerShiraz Saleem2-6/+22
Set the TOS field in IP header with the value passed in from application. If there is mismatch between the remote client's TOS and listener, set the listener Tos to the higher of the two values. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Faisal Latif <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Add NULL check for ibqp event handlerShiraz Saleem1-1/+1
Add NULL check for ibqp event handler before calling it to report QP events, as it might not initialized. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Faisal Latif <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Replace list_for_each_entry macro with safe versionMustafa Ismail2-4/+4
Use list_for_each_entry_safe macro for the IPv6 addr list as IPv6 addresses can be deleted while going through the list. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Add IP addr handling on netdev eventsMustafa Ismail3-42/+156
Disable listeners and disconnect all connected QPs on a netdev interface down event. On an interface up event, the listeners are re-enabled. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Add missing cleanup on device closeMustafa Ismail7-0/+90
On i40iw device close, disconnect all connected QPs by moving them to error state; and block further QPs, PDs and CQs from being created. Additionally, make sure all resources have been freed before deallocating the ibdev as part of the device close. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Add 2MB page supportHenry Orosco2-10/+51
Add support to allow each independent memory region to be configured for 2MB page size in addition to 4KB page size. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Utilize physically mapped memory regionsHenry Orosco1-9/+93
Add support to use physically mapped WQ's and MR's if determined that the OS registered user-memory for the region is physically contiguous. This feature will eliminate the need for unnecessarily setting up and using PBL's when not required. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Fix incorrect assignment of SQ headHenry Orosco1-6/+4
The SQ head is incorrectly incremented when the number of WQEs required is greater than the number available. The fix is to use the I40IW_RING_MOV_HEAD_BY_COUNT macro. This checks for the SQ full condition first and only if SQ has room for the request, then we move the head appropriately. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Remove variable flush_code and check to set qp->sq_flushHenry Orosco1-4/+0
The flush_code variable in i40iw_bld_terminate_hdr() is obsolete and the check to set qp->sq_flush is unreachable. Currently flush code is populated in setup_term_hdr() and both SQ and RQ are flushed always as part of the tear down flow. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Remove check on return from device_init_pestat()Henry Orosco3-14/+4
Remove unnecessary check for return code from device_init_pestat() and change func to void. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Use runtime check for IS_ENABLED(CONFIG_IPV6)Henry Orosco1-2/+2
To be consistent, use the runtime check instead of conditional compile. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Use actual page sizeHenry Orosco1-4/+1
In i40iw_post_send, use the actual page size instead of encoded page size. This is to be consistent with the rest of the file. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Remove NULL check for cm_node->iwdevHenry Orosco1-1/+1
It is not necessary to check cm_node->iwdev in i40iw_rem_ref_cm_node() as it can never be NULL after a successful call out of i40iw_make_cm_node(). Signed-off-by: Chien Tin Tung <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Remove checks for more than 48 bytes inline dataHenry Orosco1-5/+1
Remove dead code, which isn't executed because we return error if the data size is greater than 48 bytes. Inline data size greater than 48 bytes isn't supported and the maximum WQE size is 64 bytes. Signed-off-by: Tatyana Nikolova <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Query device accounts for internal rsrcHenry Orosco5-6/+26
Some resources are consumed internally and not available to the user. After hw is initialized, figure out how many resources are consumed and subtract those numbers from the initial max device capability in i40iw_query_device(). Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Optimize inline data copyHenry Orosco1-14/+10
Use memcpy for inline data copy in sends and writes instead of byte by byte copy. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Fix for LAN handler removalHenry Orosco1-6/+4
If i40iw_open() fails for any reason, the LAN handler is not being removed. Modify i40iw_deinit_device() to always remove the handler. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Correct values for max_recv_sge, max_send_sgeHenry Orosco1-1/+5
When creating QPs, ensure init_attr->cap.max_recv_sge is clipped to MAX_FRAG_COUNT. Expose MAX_FRAG_COUNT for max_recv_sge and max_send_sge in i40iw_query_qp(). Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Reviewed-By: Leon Romanovsky <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Use vector when creating CQsHenry Orosco2-3/+10
Assign each CEQ vector to a different CPU when possible, then when creating a CQ, use the vector for the CEQ id. This allows completion work to be distributed over multiple cores. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-05i40iw: Convert page_size to encoded valueHenry Orosco2-3/+14
Passed in page_size was used as encoded value for writing the WQE and passed in value was usually 4096. This was working out since bit 0 was 0 and implies 4KB pages, but would not work for other page sizes. Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-03i40iw: Set MAX IRD, MAX ORD size to max supported valueHenry Orosco2-8/+2
Set the MAX_IRD and MAX_ORD size negotiated to the maximum supported values. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-03i40iw: Remove workaround for pre-production errataHenry Orosco3-26/+4
Pre-production silicon incorrectly truncates 4 bytes of the MPA packet in UDP loopback case. Remove the workaround as it is no longer necessary. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-03i40iw: Enable message packingHenry Orosco3-7/+2
Remove the parameter to disable message packing and always enable it. Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-12-03i40iw: Add Quality of Service supportHenry Orosco13-36/+325
Add support for QoS on QPs. Upon device initialization, a map is created from user priority to queue set handles. On QP creation, use ToS to look up the queue set handle for use with the QP. Signed-off-by: Faisal Latif <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Henry Orosco <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-10-30net/mlx5e: Add tc support for FWD rule with counterMark Bloch2-10/+13
When creating a FWD rule using tc create also a HW counter for this rule. Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Add option to add fwd rule with counterMark Bloch1-6/+18
Currently the code supports only drop rules to possess counters, add that ability also for fwd rules. Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Add multi dest supportMark Bloch14-254/+374
Currently when calling mlx5_add_flow_rule we accept only one flow destination, this commit allows to pass multiple destinations. This change forces us to change the return structure to a more flexible one. We introduce a flow handle (struct mlx5_flow_handle), it holds internally the number for rules created and holds an array where each cell points the to a flow rule. From the consumers (of mlx5_add_flow_rule) point of view this change is only cosmetic and requires only to change the type of the returned value they store. From the core point of view, we now need to use a loop when allocating and deleting rules (e.g given to us a flow handler). Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Group similer rules under the same fteMark Bloch1-6/+16
When adding a new rule, if we can match it with compare_match_value and flow tag we might be able to insert the rule to the same fte. In order to do that, there must be an overlap between the actions of the fte and the new rule. When updating the action of an existing fte, we must tell the firmware we are doing so. Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Refactor find_flow_ruleMark Bloch1-9/+20
The way we compare between two dests will need to be used in other places in the future, so we factor out the comparison logic between two dests into a separate function. Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Use fte status to decide on firmware commandMark Bloch1-1/+1
An fte status becomes FS_FTE_STATUS_EXISTING only after it was created in HW. We can use this in order to simplify the logic on what firmware command to use. If the status isn't FS_FTE_STATUS_EXISTING we need to create the fte, otherwise we need only to update it. Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Don't unlock fte while still using itMark Bloch1-2/+4
When adding a new rule to an fte, we need to hold the fte lock until we add that rule to the fte and increase the fte ref count. Fixes: 0c56b97503fd ("net/mlx5_core: Introduce flow steering API") Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Add SRIOV VF max rate configuration supportMohamad Haj Yahia3-0/+80
Implement the vf set rate ndo by modifying the TSAR vport rate limit. Signed-off-by: Mohamad Haj Yahia <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Introduce E-switch QoS managementMohamad Haj Yahia2-1/+124
Add TSAR to the eswitch which will act as the vports rate limiter. Create/Destroy TSAR on Enable/Dsiable SRIOV. Attach/Detach vport to eswitch TSAR on Enable/Disable vport. Signed-off-by: Mohamad Haj Yahia <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Introduce TSAR manipulation firmware commandsMohamad Haj Yahia4-5/+279
TSAR (stands for Transmit Scheduling ARbiter) is a hardware component that is responsible for selecting the next entity to serve on the transmit path. The arbitration defines the QoS policy between the agents connected to the TSAR. The TSAR is a consist two main features: 1) BW Allocation between agents: The TSAR implements a defecit weighted round robin between the agents. Each agent attached to the TSAR is assigned with a weight and it is awarded transmission tokens according to this weight. 2) Rate limer per agent: Each agent attached to the TSAR is (optionally) assigned with a rate limit. TSAR will not allow scheduling for an agent exceeding its defined rate limit. In this patch we implement the API of manipulating the TSAR. Signed-off-by: Mohamad Haj Yahia <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Add ConnectX-5 PCIe 4.0 VF device IDSaeed Mahameed1-0/+1
For the mlx5 driver to support ConnectX-5 PCIe 4.0 VFs, we add the device ID "0x101a" to mlx5_core_pci_table. Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Fix length of async_event_maskEugenia Emantayev1-1/+1
According to PRM async_event_mask have to be 64 bits long. Signed-off-by: Eugenia Emantayev <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Ensure SRQ physical address structure endiannessArtemy Kovalyov1-1/+1
SRQ physical address structure field should be in big-endian format. Signed-off-by: Artemy Kovalyov <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30net/mlx5: Update struct mlx5_ifc_xrqc_bitsArtemy Kovalyov1-1/+1
Update struct mlx5_ifc_xrqc_bits according to last specification Signed-off-by: Artemy Kovalyov <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-30IB/mlx5: Skip handling unknown eventsSaeed Mahameed1-0/+2
Do not dispatch unknown mlx5 core events on mlx5_ib_event. Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Eugenia Emantayev <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
2016-10-29Linux 4.9-rc3Linus Torvalds1-1/+1
2016-10-29Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds1-1/+6
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 bugfix from Thomas Gleixner: "A single bugfix for the recent changes related to registering the boot cpu when this has not happened before prefill_possible_map(). The main problem with this change got fixed already, but we missed the case where the local APIC is not yet mapped, when prefill_possible_map() is invoked, so the registration of the boot cpu which has the APIC bit set in CPUID will explode. I should have seen that issue earlier, but all I can do now is feeling embarassed" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/smpboot: Init apic mapping before usage
2016-10-29Merge tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifsLinus Torvalds2-5/+13
Pull ubi/ubifs fixes from Richard Weinberger: "This contains fixes for issues in both UBI and UBIFS: - A regression wrt overlayfs, introduced in -rc2. - An UBI issue, found by Dan Carpenter's static checker" * tag 'upstream-4.9-rc3' of git://git.infradead.org/linux-ubifs: ubifs: Fix regression in ubifs_readdir() ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()
2016-10-29Merge tag 'armsoc-fixes' of ↵Linus Torvalds21-67/+87
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "We haven't seen a whole lot of fixes for the first two weeks since the merge window, but here is the batch that we have at the moment. Nothing sticks out as particularly bad or scary, it's mostly a handful of smaller fixes to several platforms. The Uniphier reset controller changes could probably have been delayed to 4.10, but they're not scary and just plumbing up driver changes that went in during the merge window. We're also adding another maintainer to Marvell Berlin platforms, to help out when Sebastian is too busy. Yay teamwork!" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: imx: mach-imx6q: Fix the PHY ID mask for AR8031 ARM: dts: vf610: fix IRQ flag of global timer ARM: imx: gpc: Fix the imx_gpc_genpd_init() error path ARM: imx: gpc: Initialize all power domains arm64: dts: Updated NAND DT properties for NS2 SVK arm64: dts: uniphier: change MIO node to SD control node ARM: dts: uniphier: change MIO node to SD control node reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER ARM: uniphier: select ARCH_HAS_RESET_CONTROLLER arm64: dts: Add timer erratum property for LS2080A and LS1043A arm64: dts: rockchip: remove the abuse of keep-power-in-suspend ARM: multi_v7_defconfig: Enable Intel e1000e driver MAINTAINERS: add myself as Marvell berlin SoC maintainer bus: qcom-ebi2: depend on ARCH_QCOM or COMPILE_TEST ARM: dts: fix the SD card on the Snowball arm64: dts: rockchip: remove always-on and boot-on from vcc_sd arm64: dts: marvell: fix clocksource for CP110 master SPI0 ARM: mvebu: Select corediv clk for all mvebu v7 SoC