Re: [PATCH v5 1/2] lapi: Add io_uring_clone_buffers and RDS_CMSG_ZCOPY_COOKIE fallbacks

Cyril Hrubis <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Hi!
> --- a/include/lapi/io_uring.h
> +++ b/include/lapi/io_uring.h
> @@ -265,6 +265,23 @@ struct io_uring_probe {
>  
>  #endif /* IOSQE_FIXED_FILE */
>  
> +/* linux/io_uring.h: IORING_REGISTER_CLONE_BUFFERS = 30 */
> +#ifndef IORING_REGISTER_CLONE_BUFFERS
> +# define IORING_REGISTER_CLONE_BUFFERS	30
> +#endif
> +
> +/* Argument for IORING_REGISTER_CLONE_BUFFERS (linux/io_uring.h) */
> +#ifndef HAVE_STRUCT_IO_URING_CLONE_BUFFERS
> +struct io_uring_clone_buffers {
> +	uint32_t src_fd;
> +	uint32_t flags;
> +	uint32_t src_off;
> +	uint32_t dst_off;
> +	uint32_t nr;
> +	uint32_t pad[3];
> +};
> +#endif
> +
>  #ifndef IOSQE_IO_HADRLINK
>  /* like LINK, but stronger */
>  #define IOSQE_IO_HARDLINK_BIT	3
> diff --git a/include/lapi/rds.h b/include/lapi/rds.h
> new file mode 100644
> index 000000000..7405a7f37
> --- /dev/null
> +++ b/include/lapi/rds.h
> @@ -0,0 +1,16 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) 2026 SUSE LLC Sebastian Chlad <sebastian.chlad-IBi9RG/[email protected]>
> + */
> +
> +#ifndef LAPI_RDS_H__
> +#define LAPI_RDS_H__
> +
> +#include <linux/rds.h>
> +
> +/* Fallback for older userspace headers (e.g. openSUSE Leap 42.2). */

Generally we do not add such comments that mostly state the obvious.
The less comments like this we add the better, apart from adding visual
noise they also tend to go out of sync with the code.

Please add only the fallbacks without the comments.

> +#ifndef RDS_CMSG_ZCOPY_COOKIE
> +# define RDS_CMSG_ZCOPY_COOKIE	12
> +#endif
> +
> +#endif /* LAPI_RDS_H__ */
> -- 
> 2.51.0
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.