xsk: prepare 'options' in xdp_desc for multi-buffer use
authorTirthendu Sarkar <tirthendu.sarkar@intel.com>
Wed, 19 Jul 2023 13:23:58 +0000 (15:23 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Jul 2023 16:56:48 +0000 (09:56 -0700)
commit63a64a56bc3f77c74085047ee45356ac850da3e8
tree38b4a906c0eb73640bb4f8c0fcc811ed37b9d878
parent492e797fdab25f2d8eb1b6bb3236f4aac474f878
xsk: prepare 'options' in xdp_desc for multi-buffer use

Use the 'options' field in xdp_desc as a packet continuity marker. Since
'options' field was unused till now and was expected to be set to 0, the
'eop' descriptor will have it set to 0, while the non-eop descriptors
will have to set it to 1. This ensures legacy applications continue to
work without needing any change for single-buffer packets.

Add helper functions and extend xskq_prod_reserve_desc() to use the
'options' field.

Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
Link: https://lore.kernel.org/r/20230719132421.584801-2-maciej.fijalkowski@intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/if_xdp.h
net/xdp/xsk.c
net/xdp/xsk_queue.h