~timg-tpi/ubuntu/+source/linux/+git/jammy:jammy-azure-Features-Support-and-InfiniBand-for-MANA-sf00358953

Last commit made on 2023-07-13
Get this branch:
git clone -b jammy-azure-Features-Support-and-InfiniBand-for-MANA-sf00358953 https://git.launchpad.net/~timg-tpi/ubuntu/+source/linux/+git/jammy
Only Tim Gardner can upload to this branch. If you are Tim Gardner please log in for upload directions.

Branch merges

Branch information

Name:
jammy-azure-Features-Support-and-InfiniBand-for-MANA-sf00358953
Repository:
lp:~timg-tpi/ubuntu/+source/linux/+git/jammy

Recent commits

aa55eea... by Tim Gardner

5.15.0-1043.50~sf00358953.1

Signed-off-by: Tim Gardner <email address hidden>

55b79be... by Tim Gardner

UBUNTU: Ubuntu-azure-5.15.0-1043.50

Signed-off-by: Tim Gardner <email address hidden>

eb001df... by Tim Gardner

UBUNTU: Start new release

Ignore: yes
Signed-off-by: Tim Gardner <email address hidden>

468d0c1... by Long Li

UBUNTU: SAUCE: net: mana: Use the correct WQE count for ringing RQ doorbell

BugLink: https://bugs.launchpad.net/bugs/2027615

The hardware specification specifies that WQE_COUNT should set to 0 for
the Receive Queue. Although currently the hardware doesn't enforce the
check, in the future releases it may check on this value.

Cc: <email address hidden>
Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Reviewed-by: Haiyang Zhang <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: Long Li <email address hidden>

cd00217... by Long Li

UBUNTU: SAUCE: net: mana: Batch ringing RX queue doorbell on receiving packets

BugLink: https://bugs.launchpad.net/bugs/2027615

It's inefficient to ring the doorbell page every time a WQE is posted to
the received queue. Excessive MMIO writes result in CPU spending more
time waiting on LOCK instructions (atomic operations), resulting in
poor scaling performance.

Move the code for ringing doorbell page to where after we have posted all
WQEs to the receive queue during a callback from napi_poll().

With this change, tests showed an improvement from 120G/s to 160G/s on a
200G physical link, with 16 or 32 hardware queues.

Tests showed no regression in network latency benchmarks on single
connection.

Cc: <email address hidden>
Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Reviewed-by: Haiyang Zhang <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: Long Li <email address hidden>

d0365a8... by Tim Gardner

UBUNTU: [Config] azure: Enable MANA_INFINIBAND

BugLink: https://bugs.launchpad.net/bugs/2024917

Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: John Cabaj <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>

923a835... by Haiyang Zhang

net: mana: Fix accessing freed irq affinity_hint

BugLink: https://bugs.launchpad.net/bugs/2024917

After calling irq_set_affinity_and_hint(), the cpumask pointer is
saved in desc->affinity_hint, and will be used later when reading
/proc/irq/<num>/affinity_hint. So the cpumask variable needs to be
persistent. Otherwise, we are accessing freed memory when reading
the affinity_hint file.

Also, need to clear affinity_hint before free_irq(), otherwise there
is a one-time warning and stack trace during module unloading:

 [ 243.948687] WARNING: CPU: 10 PID: 1589 at kernel/irq/manage.c:1913 free_irq+0x318/0x360
 ...
 [ 243.948753] Call Trace:
 [ 243.948754] <TASK>
 [ 243.948760] mana_gd_remove_irqs+0x78/0xc0 [mana]
 [ 243.948767] mana_gd_remove+0x3e/0x80 [mana]
 [ 243.948773] pci_device_remove+0x3d/0xb0
 [ 243.948778] device_remove+0x46/0x70
 [ 243.948782] device_release_driver_internal+0x1fe/0x280
 [ 243.948785] driver_detach+0x4e/0xa0
 [ 243.948787] bus_remove_driver+0x70/0xf0
 [ 243.948789] driver_unregister+0x35/0x60
 [ 243.948792] pci_unregister_driver+0x44/0x90
 [ 243.948794] mana_driver_exit+0x14/0x3fe [mana]
 [ 243.948800] __do_sys_delete_module.constprop.0+0x185/0x2f0

To fix the bug, use the persistent mask, cpumask_of(cpu#), and set
affinity_hint to NULL before freeing the IRQ, as required by free_irq().

Cc: <email address hidden>
Fixes: 71fa6887eeca ("net: mana: Assign interrupts to CPUs based on NUMA nodes")
Signed-off-by: Haiyang Zhang <email address hidden>
Reviewed-by: Michael Kelley <email address hidden>
Reviewed-by: Leon Romanovsky <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(backported from commit 18a048370b06a3a521219e9e5b10bdc2178ef19c)
[rtg - irq_set_affinity_and_hint --> irq_set_affinity_hint]
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: John Cabaj <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>

b4908e6... by error27

RDMA/mana_ib: Prevent array underflow in mana_ib_create_qp_raw()

BugLink: https://bugs.launchpad.net/bugs/2024917

The "port" comes from the user and if it is zero then the:

 ndev = mc->ports[port - 1];

assignment does an out of bounds read. I have changed the if
statement to fix this and to mirror how it is done in
mana_ib_create_qp_rss().

Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
Signed-off-by: Dan Carpenter <email address hidden>
Link: https://lore.kernel.org/r/Y8/3Vn8qx00kE9Kk@kili
Acked-by: Long Li <email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(cherry picked from commit 563ca0e9eab8acc8a1309e8b440108ff8d23e951)
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: John Cabaj <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>

6d7d9c1... by Leon Romanovsky <email address hidden>

RDMA/mana: Remove redefinition of basic u64 type

BugLink: https://bugs.launchpad.net/bugs/2024917

gdma_obj_handle_t is no more than redefinition of basic
u64 type. Remove such obfuscation.

Link: https://lore.kernel.org/<email address hidden>
Acked-by: Long Li <email address hidden>
Signed-off-by: Leon Romanovsky <email address hidden>
(cherry picked from commit 3574cfdca28543e2e8db649297cd6659ea8e4bb8)
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: John Cabaj <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>

94d62aa... by Long Li

RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter

BugLink: https://bugs.launchpad.net/bugs/2024917

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, irq_set_affinity_and_hint --> irq_set_affinity_hint]
Signed-off-by: Tim Gardner <email address hidden>
Acked-by: Philip Cox <email address hidden>
Acked-by: John Cabaj <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>