Commit 7ffbcd88 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

event: clarify how fields can be added to spdk_app_opts



If new members can use reserved bytes after opts_size,
and their default values will be 0, then it is ok to
use those reserved bytes. Clarify that in the comments.

Signed-off-by: default avatarJim Harris <jim.harris@gmail.com>
Change-Id: I0c5f05de8de16d1c20aae4c55de8383a79c752da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19672


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
parent 055de83a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -129,7 +129,10 @@ struct spdk_app_opts {
	 * The size of spdk_app_opts according to the caller of this library is used for ABI
	 * compatibility. The library uses this field to know how many fields in this
	 * structure are valid. And the library will populate any remaining fields with default values.
	 * After that, new added fields should be put after opts_size.
	 *
	 * New fields should usually be added at the end of this structure. The only exception is
	 * if using bytes from a reserved byte array after opts_size. In that case it is OK to use
	 * some of those bytes, as long as the default value is specified as 0.
	 */
	size_t opts_size;