~timg-tpi/ubuntu/+source/linux/+git/jammy:jammy-azure-mana-pf-lp1980766

Last commit made on 2022-07-05
Get this branch:
git clone -b jammy-azure-mana-pf-lp1980766 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-mana-pf-lp1980766
Repository:
lp:~timg-tpi/ubuntu/+source/linux/+git/jammy

Recent commits

b78eb2e... by Dexuan Cui

net: mana: Add the Linux MANA PF driver

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

This minimal PF driver runs on bare metal.
Currently Ethernet TX/RX works. SR-IOV management is not supported yet.

Signed-off-by: Dexuan Cui <email address hidden>
Co-developed-by: Haiyang Zhang <email address hidden>
Signed-off-by: Haiyang Zhang <email address hidden>
Signed-off-by: Paolo Abeni <email address hidden>
(cherry picked from commit 1566e7d6206fed959258a17c694834a4b801a3b5 linux-next)
Signed-off-by: Tim Gardner <email address hidden>

da4b0d4... by Haiyang Zhang

net: mana: Reuse XDP dropped page

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

Reuse the dropped page in RX path to save page allocation
overhead.

Signed-off-by: Haiyang Zhang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit a6bf5703f17bdbd775c0e6837dd2d5b1c344e28c)
Signed-off-by: Tim Gardner <email address hidden>

7d4b7ee... by Haiyang Zhang

net: mana: Add counter for XDP_TX

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

This counter will show up in ethtool stat. It is the
number of packets received and forwarded by XDP program.

Signed-off-by: Haiyang Zhang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit d356abb95b9883198b1ba0db678659369701e17d)
Signed-off-by: Tim Gardner <email address hidden>

4491214... by Haiyang Zhang

net: mana: Add counter for packet dropped by XDP

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

This counter will show up in ethtool stat data.

Signed-off-by: Haiyang Zhang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit f90f84201edde2bca25a73226ff0ebe765273890)
Signed-off-by: Tim Gardner <email address hidden>

3f4fd69... by "Gustavo A. R. Silva" <email address hidden>

net: mana: Use struct_size() helper in mana_gd_create_dma_region()

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

Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.

Also, address the following sparse warnings:
drivers/net/ethernet/microsoft/mana/gdma_main.c:677:24: warning: using sizeof on a flexible structure

Link: https://github.com/KSPP/linux/issues/174
Signed-off-by: Gustavo A. R. Silva <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 10cdc794dae890fb3149e90854e8440cf5bf615e)
Signed-off-by: Tim Gardner <email address hidden>

9a21395... by Jakub Kicinski <email address hidden>

net: Add includes masked by netdevice.h including uapi/bpf.h

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

Add missing includes unmasked by the subsequent change.

Mostly network drivers missing an include for XDP_PACKET_HEADROOM.

Signed-off-by: Jakub Kicinski <email address hidden>
Signed-off-by: Alexei Starovoitov <email address hidden>
Link: https://<email address hidden>
(cherry picked from commit 3b80b73a4b3de38f72cd79e1a157449917f2bcb5)
Signed-off-by: Tim Gardner <email address hidden>

d024e33... by Haiyang Zhang

net: mana: Add XDP support

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

Add support of XDP for the MANA driver.

Supported XDP actions:
 XDP_PASS, XDP_TX, XDP_DROP, XDP_ABORTED

XDP actions not yet supported:
 XDP_REDIRECT

Signed-off-by: Haiyang Zhang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit ed5356b53f070dea5dff5a01b740561cb8222199)
Signed-off-by: Tim Gardner <email address hidden>

26a5395... by Colin Ian King <email address hidden>

net: mana: Fix spelling mistake "calledd" -> "called"

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

There is a spelling mistake in a dev_info message. Fix it.

Signed-off-by: Colin Ian King <email address hidden>
Reviewed-by: Dexuan Cui <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 8f1bc38bbb516826ede8c96cb73a884221f1a314)
Signed-off-by: Tim Gardner <email address hidden>

212b9fa... by Dexuan Cui

net: mana: Support hibernation and kexec

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

Implement the suspend/resume/shutdown callbacks for hibernation/kexec.

Add mana_gd_setup() and mana_gd_cleanup() for some common code, and
use them in the mand_gd_* callbacks.

Reuse mana_probe/remove() for the hibernation path.

Signed-off-by: Dexuan Cui <email address hidden>
Reviewed-by: Haiyang Zhang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 635096a86edb067d55a1e04b4a918f5c6dac0c51)
Signed-off-by: Tim Gardner <email address hidden>

7f5ec9c... by Dexuan Cui

net: mana: Improve the HWC error handling

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

Currently when the HWC creation fails, the error handling is flawed,
e.g. if mana_hwc_create_channel() -> mana_hwc_establish_channel() fails,
the resources acquired in mana_hwc_init_queues() is not released.

Enhance mana_hwc_destroy_channel() to do the proper cleanup work and
call it accordingly.

Signed-off-by: Dexuan Cui <email address hidden>
Reviewed-by: Haiyang Zhang <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 62ea8b77ed3b7086561765df0226ebc7bb442020)
Signed-off-by: Tim Gardner <email address hidden>