=== NXP DPAA2 support

Links: +
link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006[Bug 292006 - dpni doesn't behave properly in a bridge] URL: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006[] +
link:https://reviews.freebsd.org/D53436[dpaa2: Setup interface caps on attach] URL: https://reviews.freebsd.org/D53436[] +
link:https://reviews.freebsd.org/D54809[dpnaa2: announce transmit checksum support] URL: https://reviews.freebsd.org/D54809[] +
link:https://reviews.freebsd.org/D56144[dpaa2: Perform bus_dma pre-write sync before enqueue operation] URL: https://reviews.freebsd.org/D56144[] +
link:https://reviews.freebsd.org/D55320[dpaa2: dpaa2_ni_rx() RX checksum EN/ERR information for L3/4] URL: https://reviews.freebsd.org/D55320[] +
link:https://reviews.freebsd.org/D56315[dpaa2: Extract frame-specific routines to dpaa2_frame.[h,c]] URL: https://reviews.freebsd.org/D56315[] +
link:https://reviews.freebsd.org/D56383[dpaa2: Extract checksum statuses on ingress] URL: https://reviews.freebsd.org/D56383[] +
link:https://reviews.freebsd.org/D55321[dpaa2: ni: add more stats and link information] URL: https://reviews.freebsd.org/D55321

Contact: Michael Tuexen <tuexen@FreeBSD.org> +
Contact: Bjoern A. Zeeb <bz@FreeBSD.org> +
Contact: Dmitry Salychev <dsl@FreeBSD.org>

==== What is DPAA2?

DPAA2 (Data Path Acceleration Architecture Gen2) is a hardware-level networking architecture found in some NXP SoCs which contains hardware blocks including Management Complex (MC, a command interface to manipulate DPAA2 objects), Wire Rate I/O processor (WRIOP, packets distribution, queuing, drop decisions), Queues and Buffers Manager (QBMan, Rx/Tx queues control, Rx buffer pools) and others.
The Management Complex runs NXP-supplied firmware which provides DPAA2 objects as an abstraction layer over those blocks to simplify access to the underlying hardware.

==== Done

link:https://cgit.freebsd.org/src/commit/?id=39d4094173f9[39d4094173f9] ("epair: add support for checksum offloading") revealed several issues in the DPAA2 drivers, sparked investigations conducted by tuexen@ and dsl@ and eventually led to the changes accumulated under the bug link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006[292006]:

* HW checksum offloading was not properly enabled when the dpaa2_ni driver was attached despite being declared and enabled on the dpni interface (fixed in link:https://cgit.freebsd.org/src/commit/?id=a731cb93a662[a731cb93a662])
* dpni (DPAA2 network interface) did not properly announce TX checksum offloading (fixed in link:https://cgit.freebsd.org/src/commit/?id=f31336b3e314[f31336b3e314])
* Without a proper synchronization payload of the egress TCP segments can be corrupted as tuexen@ described in link:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292006#c31[292006#c31] (fixed in link:https://cgit.freebsd.org/src/commit/?id=5812415bee55[5812415bee55])

==== Work in Progress

* bz@ prepared code to extract information about calculated checksums from the hardware annotations of the ingress frames in link:https://reviews.freebsd.org/D55320[D55320], but dsl@ asked to properly define structures needed for the frame annotations which led to dpaa2_frame.[h,c] introduced in link:https://reviews.freebsd.org/D56315[D56315] and refined in link:https://reviews.freebsd.org/D56383[D56383]
* bz@ significantly extended dpni sysctl(9) including new interface counters and link state information in link:https://reviews.freebsd.org/D55321[D55321]

Sponsor: Traverse Technologies (providing Ten64 HW for testing)
