Re: [PATCH v10 06/10] io_uring: introduce attributes for read/write and PI support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/26/24 13:01, Pavel Begunkov wrote:
On 11/25/24 07:06, Anuj Gupta wrote:
...
+/* sqe->attr_type_mask flags */
+#define ATTR_FLAG_PI    (1U << ATTR_TYPE_PI)
+/* PI attribute information */
+struct io_uring_attr_pi {
+        __u16    flags;
+        __u16    app_tag;
+        __u32    len;
+        __u64    addr;
+        __u64    seed;
+        __u64    rsvd;
+};
+
+/* attribute information along with type */
+struct io_uring_attr {
+    enum io_uring_attr_type    attr_type;

Hmm, I think there will be implicit padding, we need to deal
with it.

And it's better to be explicitly sized, e.g.
s/enum io_uring_attr_type/__u16/

+    /* type specific struct here */
+    struct io_uring_attr_pi    pi;
+};

This also looks PI specific but with a generic name. Or are
attribute structures are supposed to be unionised?


--
Pavel Begunkov




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux