Jon Kohler wrote:
Add helper for calling skb_{put|reserve} to reduce repetitive pattern
across various drivers.
Plumb into tap and tun to start.
No functional change intended.
Signed-off-by: Jon Kohler <jon@xxxxxxxxxxx>
---
drivers/net/tap.c | 3 +--
drivers/net/tun.c | 3 +--
include/net/xdp.h | 8 ++++++++
net/core/xdp.c | 3 +--
4 files changed, 11 insertions(+), 6 deletions(-)
Subjective, but I prefer the existing code. I understand what
skb_reserve and skb_put do. While xdp_skb_reserve_put adds a layer of
indirection that I'd have to follow.
Sometimes deduplication makes sense, sometimes the indirection adds
more mental load than it's worth. In this case the code savings are
small. As said, subjective. Happy to hear other opinions.