diff options
| author | Paolo Abeni <pabeni@redhat.com> | 2025-09-22 16:18:15 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-10-04 10:50:36 -0400 |
| commit | e5fd02d8253abdc25c0eb145765734890c256b71 (patch) | |
| tree | c81c46d90061229858738288723282fb790819a4 /net/tap.c | |
| parent | 81e3121bef89bcd3ccb261899e5a36246199065d (diff) | |
| download | focaccia-qemu-e5fd02d8253abdc25c0eb145765734890c256b71.tar.gz focaccia-qemu-e5fd02d8253abdc25c0eb145765734890c256b71.zip | |
net: bundle all offloads in a single struct
The set_offload() argument list is already pretty long and we are going to introduce soon a bunch of additional offloads. Replace the offload arguments with a single struct and update all the relevant call-sites. No functional changes intended. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <a9d4dd043b8c71b791e9ff05e17ef06072d9714e.1758549625.git.pabeni@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net/tap.c')
| -rw-r--r-- | net/tap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tap.c b/net/tap.c index f37133e301..df23283744 100644 --- a/net/tap.c +++ b/net/tap.c @@ -285,15 +285,14 @@ static int tap_set_vnet_be(NetClientState *nc, bool is_be) return tap_fd_set_vnet_be(s->fd, is_be); } -static void tap_set_offload(NetClientState *nc, int csum, int tso4, - int tso6, int ecn, int ufo, int uso4, int uso6) +static void tap_set_offload(NetClientState *nc, const NetOffloads *ol) { TAPState *s = DO_UPCAST(TAPState, nc, nc); if (s->fd < 0) { return; } - tap_fd_set_offload(s->fd, csum, tso4, tso6, ecn, ufo, uso4, uso6); + tap_fd_set_offload(s->fd, ol); } static void tap_exit_notify(Notifier *notifier, void *data) @@ -391,6 +390,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer, int fd, int vnet_hdr) { + NetOffloads ol = {}; NetClientState *nc; TAPState *s; @@ -404,7 +404,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer, s->has_ufo = tap_probe_has_ufo(s->fd); s->has_uso = tap_probe_has_uso(s->fd); s->enabled = true; - tap_set_offload(&s->nc, 0, 0, 0, 0, 0, 0, 0); + tap_set_offload(&s->nc, &ol); /* * Make sure host header length is set correctly in tap: * it might have been modified by another instance of qemu. |