summary refs log tree commit diff stats
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2025-07-09 10:24:15 +0200
committerJason Wang <jasowang@redhat.com>2025-07-14 13:27:09 +0800
commitadf684ce6908e2d2883946ffe1790c4ddfcf3ce0 (patch)
tree07ecd475f65337104371aa9b7e6e173f455d0709 /hw/net/virtio-net.c
parentadda0ad56bd28d5a809051cbd190fda5798ec4e4 (diff)
downloadfocaccia-qemu-adf684ce6908e2d2883946ffe1790c4ddfcf3ce0.tar.gz
focaccia-qemu-adf684ce6908e2d2883946ffe1790c4ddfcf3ce0.zip
net: Refactor stream logic for reuse in '-net passt'
To prepare for the implementation of '-net passt', this patch moves
the generic stream handling functions from net/stream.c into new
net/stream_data.c and net/stream_data.h files.

This refactoring introduces a NetStreamData struct that encapsulates
the generic fields and logic previously in NetStreamState. The
NetStreamState now embeds NetStreamData and delegates the core
stream operations to the new generic functions.

To maintain flexibility for different users of this generic code,
callbacks for send and listen operations are now passed via
function pointers within the NetStreamData struct. This allows
callers to provide their own specific implementations while reusing
the common connection and data transfer logic.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions