kunit: add a convenience allocation wrapper for SKBs
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 20 Dec 2023 15:19:48 +0000 (16:19 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Jan 2024 14:35:07 +0000 (15:35 +0100)
commitb3231d353a51ddfb6ef7d17877d029790190f746
tree7dbfe1ec17d26eb88c983e3ea82859608dac3afb
parent292010ee509443a1383bb079a4fa80515aa89a7f
kunit: add a convenience allocation wrapper for SKBs

Add a simple convenience helper to allocate and zero fill an SKB for the
use by a kunit test. Also provide a way to free it again in case that
may be desirable.

This simply mirrors the kunit_kmalloc API.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: David Gow <davidgow@google.com>
Link: https://msgid.link/20231220151952.415232-3-benjamin@sipsolutions.net
[adjust file description as discussed]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/kunit/skbuff.h [new file with mode: 0644]