Skip to content
Snippets Groups Projects
  1. Sep 29, 2022
  2. Sep 22, 2022
  3. Sep 02, 2022
  4. May 16, 2022
    • Leonardo Bras's avatar
      QIOChannel: Add flags on io_writev and introduce io_flush callback · b88651cb
      Leonardo Bras authored
      
      Add flags to io_writev and introduce io_flush as optional callback to
      QIOChannelClass, allowing the implementation of zero copy writes by
      subclasses.
      
      How to use them:
      - Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY),
      - Wait write completion with qio_channel_flush().
      
      Notes:
      As some zero copy write implementations work asynchronously, it's
      recommended to keep the write buffer untouched until the return of
      qio_channel_flush(), to avoid the risk of sending an updated buffer
      instead of the buffer state during write.
      
      As io_flush callback is optional, if a subclass does not implement it, then:
      - io_flush will return 0 without changing anything.
      
      Also, some functions like qio_channel_writev_full_all() were adapted to
      receive a flag parameter. That allows shared code between zero copy and
      non-zero copy writev, and also an easier implementation on new flags.
      
      Signed-off-by: default avatarLeonardo Bras <leobras@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Message-Id: <20220513062836.965425-3-leobras@redhat.com>
      Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      b88651cb
  5. May 11, 2022
  6. May 03, 2022
  7. Apr 06, 2022
  8. Jan 07, 2022
  9. Dec 21, 2021
  10. Nov 19, 2021
  11. Nov 04, 2021
  12. Oct 14, 2021
  13. Sep 27, 2021
    • Markus Armbruster's avatar
      qapi: Convert simple union SocketAddressLegacy to flat one · 935a867c
      Markus Armbruster authored
      
      Simple unions predate flat unions.  Having both complicates the QAPI
      schema language and the QAPI generator.  We haven't been using simple
      unions in new code for a long time, because they are less flexible and
      somewhat awkward on the wire.
      
      To prepare for their removal, convert simple union SocketAddressLegacy
      to an equivalent flat one, with existing enum SocketAddressType
      replacing implicit enum type SocketAddressLegacyKind.  Adds some
      boilerplate to the schema, which is a bit ugly, but a lot easier to
      maintain than the simple union feature.
      
      Cc: "Daniel P. Berrangé" <berrange@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20210917143134.412106-9-armbru@redhat.com>
      935a867c
  14. Sep 14, 2021
  15. Aug 05, 2021
  16. Aug 04, 2021
  17. Jul 22, 2021
  18. Jul 09, 2021
  19. Jun 29, 2021
  20. Jun 02, 2021
  21. May 21, 2021
  22. May 02, 2021
  23. Apr 01, 2021
    • Lukas Straub's avatar
      chardev: Fix yank with the chardev-change case · feb774ca
      Lukas Straub authored
      
      When changing from chardev-socket (which supports yank) to
      chardev-socket again, it fails, because the new chardev attempts
      to register a new yank instance. This in turn fails, as there
      still is the yank instance from the current chardev. Also,
      the old chardev shouldn't unregister the yank instance when it
      is freed.
      
      To fix this, now the new chardev only registers a yank instance if
      the current chardev doesn't support yank and thus hasn't registered
      one already. Also, when the old chardev is freed, it now only
      unregisters the yank instance if the new chardev doesn't need it.
      
      If the initialization of the new chardev fails, it still has
      chr->handover_yank_instance set and won't unregister the yank
      instance when it is freed.
      
      s->registered_yank is always true here, as chardev-change only works
      on user-visible chardevs and those are guraranteed to register a
      yank instance as they are initialized via
      chardev_new()
       qemu_char_open()
        cc->open() (qmp_chardev_open_socket()).
      
      Signed-off-by: default avatarLukas Straub <lukasstraub2@web.de>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Tested-by: default avatarLi Zhang <li.zhang@cloud.ionos.com>
      Message-Id: <9637888d7591d2971975188478bb707299a1dc04.1617127849.git.lukasstraub2@web.de>
      feb774ca
Loading