RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter
Add a RDMA VF driver for Microsoft Azure Network Adapter (MANA).
Co-developed-by: Ajay Sharma <email address hidden>
Signed-off-by: Ajay Sharma <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: Long Li <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(backported from commit 0266a177631d4c6b963b5b12dd986a8c5abdbf06)
rtg - context adjustments, RDMA_DRIVER_UNKNOWN goes in include/uapi/rdma/rdma_user_ioctl_cmds.h]
Signed-off-by: Tim Gardner <email address hidden>
aed1762...
by
Greg Kroah-Hartman <email address hidden>
driver core: auxiliary bus: make remove function return void
There's an effort to move the remove() callback in the driver core to
not return an int, as nothing can be done if this function fails. To
make that effort easier, make the aux bus remove function void to start
with so that no users have to be changed sometime in the future.
0a1dfb2...
by
Nathan Huckleberry <email address hidden>
net: mana: Fix return type of mana_start_xmit()
The ndo_start_xmit field in net_device_ops is expected to be of type
netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev).
The mismatched return type breaks forward edge kCFI since the underlying
function definition does not match the function hook definition. A new
warning in clang will catch this at compile time:
drivers/net/ethernet/microsoft/mana/mana_en.c:382:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = mana_start_xmit, ^~~~~~~~~~~~~~~
1 error generated.
The return type of mana_start_xmit should be changed from int to
netdev_tx_t.
Reported-by: Dan Carpenter <email address hidden>
Link: https://github.com/ClangBuiltLinux/linux/issues/1703
Link: https://github.com/ClangBuiltLinux/linux/issues/1750
Signed-off-by: Nathan Huckleberry <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
[nathan: Rebase on net-next and resolve conflicts
Add note about new clang warning]
Signed-off-by: Nathan Chancellor <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Paolo Abeni <email address hidden>
(backported from commit 0c9ef08a4d0fd6c5e6000597b506235d71a85a61)
[rtg - context adjustment]
Signed-off-by: Tim Gardner <email address hidden>
net: mana: Define data structures for protection domain and memory registration
The MANA hardware support protection domain and memory registration for use
in RDMA environment. Add those definitions and expose them for use by the
RDMA driver.
Signed-off-by: Ajay Sharma <email address hidden>
Signed-off-by: Long Li <email address hidden>
Link: https://<email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Acked-by: Haiyang Zhang <email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(cherry picked from commit 28c66cfa45388af1126985d1114e0ed762eb2abd)
Signed-off-by: Tim Gardner <email address hidden>
net: mana: Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES
When doing memory registration, the PF may respond with
GDMA_STATUS_MORE_ENTRIES to indicate a follow request is needed. This is
not an error and should be processed as expected.
Signed-off-by: Ajay Sharma <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: Long Li <email address hidden>
Link: https://<email address hidden>
Acked-by: Haiyang Zhang <email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(cherry picked from commit de372f2a9ca7ada2698ecac7df8f02407cd98fa0)
Signed-off-by: Tim Gardner <email address hidden>
The number of maximum SGl entries should be computed from the maximum
WQE size for the intended queue type and the corresponding OOB data
size. This guarantees the hardware queue can successfully queue requests
up to the queue depth exposed to the upper layer.
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: Long Li <email address hidden>
Link: https://<email address hidden>
Acked-by: Haiyang Zhang <email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(cherry picked from commit aa56549792fb348892fbbae67f6f0c71bb750b65)
Signed-off-by: Tim Gardner <email address hidden>
net: mana: Export Work Queue functions for use by RDMA driver
RDMA device may need to create Ethernet device queues for use by Queue
Pair type RAW. This allows a user-mode context accesses Ethernet hardware
queues. Export the supporting functions for use by the RDMA driver.
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: Long Li <email address hidden>
Link: https://<email address hidden>
Acked-by: Haiyang Zhang <email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(cherry picked from commit 4c0ff7a106e16ab63e0b597557255c012f179578)
Signed-off-by: Tim Gardner <email address hidden>