This patch series tries to refactor the functions used for exchange of FD in current code, provide common methods for it.
The series is based on the localhost migration with side channel for ram series as it was already a good shape. But if you want to merge this first, I'll get rid of the migration part. I just tested page flipping migration, and tap/bridge-helper a bit, but have some environment problem on proxy fs driver. So it'd be appreciated if someone could help on verifying whether it has impact on it. :) Please let me know if there is anything needs to be improved. Thanks. Lei Li (6): fd-exchange: provide common methods for exchange of fd qemu-bridge-helper: replace send_fd with qemu_send_with_fd net/tap: replace recv_fd with qemu_recv_with_fd virtfs-proxy-helper: replace send_fd with qemu_send_with_fd virtio-9p-proxy: replace v9fs_receivefd with qemu_recv_with_fd migration-local: replace send_pipefd with qemu_send_with_fd Makefile | 2 +- fsdev/virtfs-proxy-helper.c | 51 ++++------------------- hw/9pfs/virtio-9p-proxy.c | 60 +------------------------- hw/9pfs/virtio-9p-proxy.h | 5 -- include/qemu/fd-exchange.h | 25 +++++++++++ migration-local.c | 52 +---------------------- net/tap.c | 40 +---------------- qemu-bridge-helper.c | 31 +------------ util/Makefile.objs | 1 + util/qemu-fd-exchange.c | 97 +++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 144 insertions(+), 220 deletions(-) create mode 100644 include/qemu/fd-exchange.h create mode 100644 util/qemu-fd-exchange.c