| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
If the HW indicates support of multiple ports for rdma, create an IB device
with a port per netdev in the ethernet mana driver.
CM is only available on port 1, but RC QPs are supported on all
ports.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add support for mana device level statistics.
Co-developed-by: Solom Tamawy <[email protected]>
Signed-off-by: Solom Tamawy <[email protected]>
Signed-off-by: Shiraz Saleem <[email protected]>
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Allow mana_ib to be created over ethernet gdma device and
over rnic gdma device. The HW has two devices with different
capabilities and different use-cases. Initialize required
resources depending on the used gdma device.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When running under Hyper-V, the master device to the RDMA device is always
bonded to this RDMA device. This is not user-configurable.
The master device can be unbind/bind from the kernel. During those events,
the RDMA device should set to the current netdev to reflect the change of
master device from those events.
Signed-off-by: Long Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change mana_get_primary_netdev_rcu() to mana_get_primary_netdev(), and
return the ndev with refcount held. The caller is responsible for dropping
the refcount.
Also drop the check for IFF_SLAVE as it is not necessary if the upper
device is present.
Signed-off-by: Long Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Add support of dmabuf MRs to mana_ib.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Return -ENOMEM if dma_pool_create() fails. Don't return success.
Fixes: df91c470d9e5 ("RDMA/mana_ib: create/destroy AH")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement alloc_hw_port_stats and get_hw_stats APIs to support querying
MANA VF port level statistics from rdma stat tool.
Example output from rdma stat tool:
$rdma statistic show link mana_0/1 -p
link mana_0/1
requester_timeout 45
requester_oos_nak 0
requester_rnr_nak 0
responder_rnr_nak 0
responder_oos 0
responder_dup_request 0
requester_implicit_nak 0
requester_readresp_psn_mismatch 0
nak_inv_req 0
nak_access_error 0
nak_opp_error 0
nak_inv_read 0
responder_local_len_error 0
requestor_local_prot_error 0
responder_rem_access_error 0
responder_local_qp_error 0
responder_malformed_wqe 0
general_hw_error 6
requester_rnr_nak_retries_exceeded 0
requester_retries_exceeded 5
total_fatal_error 6
received_cnps 0
num_qps_congested 0
rate_inc_events 0
num_qps_recovered 0
current_rate 100000
Signed-off-by: Shiraz Saleem <[email protected]>
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Add polling for the kernel CQs.
Process completion events for UD/GSI QPs.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Shiraz Saleem <[email protected]>
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Arm a CQ when req_notify_cq is called.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Shiraz Saleem <[email protected]>
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement post send and post recv for UD/GSI QPs.
Add information about posted requests into shadow queues.
Co-developed-by: Shiraz Saleem <[email protected]>
Signed-off-by: Shiraz Saleem <[email protected]>
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Implement create and destroy AH for kernel.
In mana_ib, AV is passed as an sge in WQE.
Allocate DMA memory and write an AV there.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Shiraz Saleem <[email protected]>
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Implement allocation of DMA-mapped memory regions.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Shiraz Saleem <[email protected]>
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.
Scripted using
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
do
awk -i inplace '
/^#define EXPORT_SYMBOL_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/^#define MODULE_IMPORT_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/MODULE_IMPORT_NS/ {
$0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
}
/EXPORT_SYMBOL_NS/ {
if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
$0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
$0 !~ /^my/) {
getline line;
gsub(/[[:space:]]*\\$/, "");
gsub(/[[:space:]]/, "", line);
$0 = $0 " " line;
}
$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
"\\1(\\2, \"\\3\")", "g");
}
}
{ print }' $file;
done
Requested-by: Masahiro Yamada <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add mana_get_primary_netdev_rcu helper to get a primary
netdevice for a given port. When mana is used with
netvsc, the VF netdev is controlled by an upper netvsc
device. In a baremetal case, the VF netdev is the
primary device.
Use the mana_get_primary_netdev_rcu() helper in the mana_ib
to get the correct device for querying network states.
Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Long Li <[email protected]>
Reviewed-by: Zhu Yanjun <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Process QP fatal events from the error event queue.
For that, find the QP, using QPN from the event, and then call its
event_handler. To find the QPs, store created RC QPs in an xarray.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Wei Hu <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Use the mac address for the node_guid of the IB device.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Set ret to -ENODEV when netdev_master_upper_dev_get_rcu returns NULL.
Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Konstantin Taranov <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
|
| |
|
|
|
|
|
|
| |
Set local mac address in RNIC, which is required by the HW.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Implement add_gid and del_gid for RNIC.
IPv4 and IPv6 addresses are supported.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Set netdev and RoCEv2 flag to enable GID population on port 1.
Use GIDs of the master netdev. As mc->ports[] stores slave devices,
use a helper to get the master netdev.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Implement port parameters for RNIC:
1) extend query_port() method
2) implement get_link_layer()
3) implement query_pkey()
Only port 1 can store GIDs.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Add functions for RNIC creation and destruction.
If creation fails, the ib_probe fails as well.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
| |
Create an error EQ for the RNIC adapter.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Use num_comp_vectors of struct ib_device instead of max_num_queues
from gdma_context.
Signed-off-by: Konstantin Taranov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Long Li <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
With RDMA device registered, use it to query on hardware capabilities and
cache this information for future query requests to the driver.
Signed-off-by: Long Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Software client needs to register with the RDMA management interface on
the SoC to access more features, including querying device capabilities
and RC queue pair.
Signed-off-by: Long Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|
|
|
Add a RDMA VF driver for Microsoft Azure Network Adapter (MANA).
Co-developed-by: Ajay Sharma <[email protected]>
Signed-off-by: Ajay Sharma <[email protected]>
Reviewed-by: Dexuan Cui <[email protected]>
Signed-off-by: Long Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
|