From nobody Wed Nov 27 21:38:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1697378692; cv=none; d=zohomail.com; s=zohoarc; b=Y6xTHnHVHRPQ81Px7L9fcZulIXQybNYnv9TujUiUMArkjmb+HtfyRltl1PPf+a+brMN/Yz6edmMnqRvyUA+by0gwnzRRYcRxRij3S4+s6csdaEo0/HOT1OdR5d+leEPOOEpb1Q1V9wQ8beB/mVpDGxVIIsknfkBPCib4u78G+t4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697378692; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:Message-Id:Reply-To:To; bh=Fob2z9PYJugS1fKvXUGDDWk1PaFWvj02mELtsPew0jM=; b=QpOKFvQkj2lD6GsyaJUPQAyZfYQFWLFII4hp6kwMRbEsrP6CYjXzo9Qj66oveNxGBHkYiWur0+4Yw31nmVeJ3Ksgtq03jS9pRxis1TMEWjMFo/C2+0rrlDIPRosS6/K1kpdUd8KcSzbfsxieQAYkOg1dGkQn4HzzqqkTL4F4728= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697378692484248.2304875708321; Sun, 15 Oct 2023 07:04:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qs1iQ-0001Qz-0l; Sun, 15 Oct 2023 10:03:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qs1iO-0001Py-GE for qemu-devel@nongnu.org; Sun, 15 Oct 2023 10:03:32 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qs1iM-0007ih-4z for qemu-devel@nongnu.org; Sun, 15 Oct 2023 10:03:32 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-68fb85afef4so2822741b3a.1 for ; Sun, 15 Oct 2023 07:03:29 -0700 (PDT) Received: from localhost ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with UTF8SMTPSA id cb18-20020a056a02071200b005b18c53d73csm2092640pgb.16.2023.10.15.07.03.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Oct 2023 07:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1697378608; x=1697983408; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Fob2z9PYJugS1fKvXUGDDWk1PaFWvj02mELtsPew0jM=; b=srFC+0CZ25Pi4o2Bpbd3lrB+P4MhsMYLYAx2AAG5oVr5EP3mCPH72lkdqksHxcFexM 5VgbWhdVyp4aLSliqB+cWqSu6sz+tQMap2gDTv85RqkqrYKBpFjKOvxq3Nz5tJpMRvjV 6t9wTYkDNjQJ8bGjxE+7igpYcN1TsNh01Vwy2iGi7l3kDcbEpyTrw2mLBhlhUXkSXzVA oBnJkTLbEAkJoLQ5/k0gviSoXo/d74FNEB9AWLyt5Z5KZyVecv48tvUM9kfxKWRU7pJU DW9Jp2gOwkQfUwY5wpDlWT0s+QqmR3AwZ8mRB2zTh6DQ86yOWZ+Bm5Rtp80bZMRfVkat mB2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697378608; x=1697983408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fob2z9PYJugS1fKvXUGDDWk1PaFWvj02mELtsPew0jM=; b=fm2Ro5ZfMyNd1LAjMtHL4jkmY285JQVhdrAIlrap8j6IraX9grdL+buOfJQJUaMHBB 5TcaC8+5w6iQAOAOf1O5ooapFvJxGkw6otHJRrTlYepXHpWEIy1PW1OXeDinOzgMmK6i XQZ/mRtF4HAgvrsMzlZKYn/qiAo1r0VnL4AfuMNNvlanZxWjeUiZsOk6uQdE5TruYMnv bPFEW3WlKK2h/JcOuNOHAEhAidRAJIYlL133apFlC9MQy8PGt/sx8XLZM8QxwKUDcW95 c/M2HPydE9Ek6KiP7NGmtHyZfg897hi9/cV5nk6KUjEDLpaBoTz/EywWHC8w/cRG+Gyx 5geQ== X-Gm-Message-State: AOJu0YwbeTpnroTfHYN3rxZON2B0d6O1rWct7nRksyVHyvqoKHkElmUw 5bAQz7v3aVYrmdJSii8TkA1SG1RNRWZkv5Zb4s8Rog== X-Google-Smtp-Source: AGHT+IGO5/4jRcECVMYC0xkMLpIFKAhyqAcwZ1o0bEHn6+KHPL0hWzJPSEyuzFqh+KEsL+JwVpMnsA== X-Received: by 2002:a05:6a00:a8e:b0:6b1:704f:2078 with SMTP id b14-20020a056a000a8e00b006b1704f2078mr7277392pfl.33.1697378608200; Sun, 15 Oct 2023 07:03:28 -0700 (PDT) From: Akihiko Odaki To: Cc: qemu-devel@nongnu.org, Yuri Benditovich , Andrew Melnychenko , "Michael S . Tsirkin" , Jason Wang , Akihiko Odaki , Pavel Dovgalyuk , Paolo Bonzini , Zhang Chen , Li Zhijian Subject: [PATCH v4 06/20] net: Remove flag propagation Date: Sun, 15 Oct 2023 23:02:38 +0900 Message-ID: <20231015140259.259434-7-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231015140259.259434-1-akihiko.odaki@daynix.com> References: <20231015140259.259434-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::42e; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x42e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1697378694291100007 Content-Type: text/plain; charset="utf-8" There is no defined flag now. Signed-off-by: Akihiko Odaki --- include/net/filter.h | 3 --- include/net/queue.h | 6 ------ include/sysemu/replay.h | 2 +- net/dump.c | 4 ++-- net/filter-buffer.c | 4 +--- net/filter-mirror.c | 6 ++---- net/filter-replay.c | 3 +-- net/filter-rewriter.c | 5 ++--- net/filter.c | 8 +++----- net/net.c | 43 ++++++++++++++--------------------------- replay/replay-net.c | 8 ++------ 11 files changed, 28 insertions(+), 64 deletions(-) diff --git a/include/net/filter.h b/include/net/filter.h index 27ffc630df..e523771e72 100644 --- a/include/net/filter.h +++ b/include/net/filter.h @@ -26,7 +26,6 @@ typedef void (FilterCleanup) (NetFilterState *nf); */ typedef ssize_t (FilterReceiveIOV)(NetFilterState *nc, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb); @@ -65,14 +64,12 @@ struct NetFilterState { ssize_t qemu_netfilter_receive(NetFilterState *nf, NetFilterDirection direction, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb); =20 /* pass the packet to the next filter */ ssize_t qemu_netfilter_pass_to_next(NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, void *opaque); diff --git a/include/net/queue.h b/include/net/queue.h index 7a43863be2..571f4e1436 100644 --- a/include/net/queue.h +++ b/include/net/queue.h @@ -30,15 +30,12 @@ typedef struct NetQueue NetQueue; =20 typedef void (NetPacketSent) (NetClientState *sender, ssize_t ret); =20 -#define QEMU_NET_PACKET_FLAG_NONE 0 - /* Returns: * >0 - success * 0 - queue packet for future redelivery * <0 - failure (discard packet) */ typedef ssize_t (NetQueueDeliverFunc)(NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, void *opaque); @@ -47,7 +44,6 @@ NetQueue *qemu_new_net_queue(NetQueueDeliverFunc *deliver= , void *opaque); =20 void qemu_net_queue_append_iov(NetQueue *queue, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb); @@ -64,14 +60,12 @@ ssize_t qemu_net_queue_receive_iov(NetQueue *queue, =20 ssize_t qemu_net_queue_send(NetQueue *queue, NetClientState *sender, - unsigned flags, const uint8_t *data, size_t size, NetPacketSent *sent_cb); =20 ssize_t qemu_net_queue_send_iov(NetQueue *queue, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb); diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 08aae5869f..67b2d3ac73 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -158,7 +158,7 @@ ReplayNetState *replay_register_net(NetFilterState *nfs= ); /*! Unregisters replay network filter. */ void replay_unregister_net(ReplayNetState *rns); /*! Called to write network packet to the replay log. */ -void replay_net_packet_event(ReplayNetState *rns, unsigned flags, +void replay_net_packet_event(ReplayNetState *rns, const struct iovec *iov, int iovcnt); =20 /* Audio */ diff --git a/net/dump.c b/net/dump.c index d2defe4ed9..968ac7a82a 100644 --- a/net/dump.c +++ b/net/dump.c @@ -150,8 +150,8 @@ struct NetFilterDumpState { }; =20 static ssize_t filter_dump_receive_iov(NetFilterState *nf, NetClientState = *sndr, - unsigned flags, const struct iovec = *iov, - int iovcnt, NetPacketSent *sent_cb) + const struct iovec *iov, int iovcnt, + NetPacketSent *sent_cb) { NetFilterDumpState *nfds =3D FILTER_DUMP(nf); =20 diff --git a/net/filter-buffer.c b/net/filter-buffer.c index 283dc9cbe6..6d8b581cd8 100644 --- a/net/filter-buffer.c +++ b/net/filter-buffer.c @@ -58,7 +58,6 @@ static void filter_buffer_release_timer(void *opaque) /* filter APIs */ static ssize_t filter_buffer_receive_iov(NetFilterState *nf, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) @@ -79,8 +78,7 @@ static ssize_t filter_buffer_receive_iov(NetFilterState *= nf, * the packets without caring about the receiver. This is suboptimal. * May need more thoughts (e.g keeping sent_cb). */ - qemu_net_queue_append_iov(s->incoming_queue, sender, flags, - iov, iovcnt, NULL); + qemu_net_queue_append_iov(s->incoming_queue, sender, iov, iovcnt, NULL= ); return iov_size(iov, iovcnt); } =20 diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 34a63b5dbb..752571a548 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirror.c @@ -145,12 +145,12 @@ static void redirector_to_filter(NetFilterState *nf, =20 if (nf->direction =3D=3D NET_FILTER_DIRECTION_ALL || nf->direction =3D=3D NET_FILTER_DIRECTION_TX) { - qemu_netfilter_pass_to_next(nf->netdev, 0, &iov, 1, nf); + qemu_netfilter_pass_to_next(nf->netdev, &iov, 1, nf); } =20 if (nf->direction =3D=3D NET_FILTER_DIRECTION_ALL || nf->direction =3D=3D NET_FILTER_DIRECTION_RX) { - qemu_netfilter_pass_to_next(nf->netdev->peer, 0, &iov, 1, nf); + qemu_netfilter_pass_to_next(nf->netdev->peer, &iov, 1, nf); } } =20 @@ -190,7 +190,6 @@ static void redirector_chr_event(void *opaque, QEMUChrE= vent event) =20 static ssize_t filter_mirror_receive_iov(NetFilterState *nf, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) @@ -212,7 +211,6 @@ static ssize_t filter_mirror_receive_iov(NetFilterState= *nf, =20 static ssize_t filter_redirector_receive_iov(NetFilterState *nf, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) diff --git a/net/filter-replay.c b/net/filter-replay.c index 54690676ef..ab132f6f24 100644 --- a/net/filter-replay.c +++ b/net/filter-replay.c @@ -31,7 +31,6 @@ struct NetFilterReplayState { =20 static ssize_t filter_replay_receive_iov(NetFilterState *nf, NetClientState *sndr, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_c= b) { @@ -39,7 +38,7 @@ static ssize_t filter_replay_receive_iov(NetFilterState *= nf, switch (replay_mode) { case REPLAY_MODE_RECORD: if (nf->netdev =3D=3D sndr) { - replay_net_packet_event(nfrs->rns, flags, iov, iovcnt); + replay_net_packet_event(nfrs->rns, iov, iovcnt); return iov_size(iov, iovcnt); } return 0; diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c index c18c4c2019..5da0b097db 100644 --- a/net/filter-rewriter.c +++ b/net/filter-rewriter.c @@ -251,7 +251,6 @@ static int handle_secondary_tcp_pkt(RewriterState *rf, =20 static ssize_t colo_rewriter_receive_iov(NetFilterState *nf, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) @@ -294,7 +293,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState= *nf, if (sender =3D=3D nf->netdev) { /* NET_FILTER_DIRECTION_TX */ if (!handle_primary_tcp_pkt(s, conn, pkt, &key)) { - qemu_net_queue_send(s->incoming_queue, sender, 0, + qemu_net_queue_send(s->incoming_queue, sender, (const uint8_t *)pkt->data, pkt->size, NULL); packet_destroy(pkt, NULL); pkt =3D NULL; @@ -307,7 +306,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState= *nf, } else { /* NET_FILTER_DIRECTION_RX */ if (!handle_secondary_tcp_pkt(s, conn, pkt, &key)) { - qemu_net_queue_send(s->incoming_queue, sender, 0, + qemu_net_queue_send(s->incoming_queue, sender, (const uint8_t *)pkt->data, pkt->size, NULL); packet_destroy(pkt, NULL); pkt =3D NULL; diff --git a/net/filter.c b/net/filter.c index 3fe88fa43f..14dfb6fa36 100644 --- a/net/filter.c +++ b/net/filter.c @@ -28,7 +28,6 @@ static inline bool qemu_can_skip_netfilter(NetFilterState= *nf) ssize_t qemu_netfilter_receive(NetFilterState *nf, NetFilterDirection direction, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) @@ -39,7 +38,7 @@ ssize_t qemu_netfilter_receive(NetFilterState *nf, if (nf->direction =3D=3D direction || nf->direction =3D=3D NET_FILTER_DIRECTION_ALL) { return NETFILTER_GET_CLASS(OBJECT(nf))->receive_iov( - nf, sender, flags, iov, iovcnt, sent_cb= ); + nf, sender, iov, iovcnt, sent_cb); } =20 return 0; @@ -62,7 +61,6 @@ static NetFilterState *netfilter_next(NetFilterState *nf, } =20 ssize_t qemu_netfilter_pass_to_next(NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, void *opaque) @@ -96,7 +94,7 @@ ssize_t qemu_netfilter_pass_to_next(NetClientState *sende= r, * to the sender, so sent_cb shouldn't be called later, just * pass NULL to next. */ - ret =3D qemu_netfilter_receive(next, direction, sender, flags, iov, + ret =3D qemu_netfilter_receive(next, direction, sender, iov, iovcnt, NULL); if (ret) { return ret; @@ -111,7 +109,7 @@ ssize_t qemu_netfilter_pass_to_next(NetClientState *sen= der, */ if (sender && sender->peer) { qemu_net_queue_send_iov(sender->peer->incoming_queue, - sender, flags, iov, iovcnt, NULL); + sender, iov, iovcnt, NULL); } =20 out: diff --git a/net/net.c b/net/net.c index 2d94d23c07..9334fd166e 100644 --- a/net/net.c +++ b/net/net.c @@ -250,7 +250,6 @@ static void qemu_net_client_destructor(NetClientState *= nc) g_free(nc); } static ssize_t qemu_deliver_packet_iov(NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, void *opaque); @@ -604,7 +603,6 @@ int qemu_can_send_packet(NetClientState *sender) static ssize_t filter_receive_iov(NetClientState *nc, NetFilterDirection direction, NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb) @@ -614,7 +612,7 @@ static ssize_t filter_receive_iov(NetClientState *nc, =20 if (direction =3D=3D NET_FILTER_DIRECTION_TX) { QTAILQ_FOREACH(nf, &nc->filters, next) { - ret =3D qemu_netfilter_receive(nf, direction, sender, flags, i= ov, + ret =3D qemu_netfilter_receive(nf, direction, sender, iov, iovcnt, sent_cb); if (ret) { return ret; @@ -622,7 +620,7 @@ static ssize_t filter_receive_iov(NetClientState *nc, } } else { QTAILQ_FOREACH_REVERSE(nf, &nc->filters, next) { - ret =3D qemu_netfilter_receive(nf, direction, sender, flags, i= ov, + ret =3D qemu_netfilter_receive(nf, direction, sender, iov, iovcnt, sent_cb); if (ret) { return ret; @@ -636,7 +634,6 @@ static ssize_t filter_receive_iov(NetClientState *nc, static ssize_t filter_receive(NetClientState *nc, NetFilterDirection direction, NetClientState *sender, - unsigned flags, const uint8_t *data, size_t size, NetPacketSent *sent_cb) @@ -646,7 +643,7 @@ static ssize_t filter_receive(NetClientState *nc, .iov_len =3D size }; =20 - return filter_receive_iov(nc, direction, sender, flags, &iov, 1, sent_= cb); + return filter_receive_iov(nc, direction, sender, &iov, 1, sent_cb); } =20 void qemu_purge_queued_packets(NetClientState *nc) @@ -683,10 +680,9 @@ void qemu_flush_queued_packets(NetClientState *nc) qemu_flush_or_purge_queued_packets(nc, false); } =20 -static ssize_t qemu_send_packet_async_with_flags(NetClientState *sender, - unsigned flags, - const uint8_t *buf, int s= ize, - NetPacketSent *sent_cb) +ssize_t qemu_send_packet_async(NetClientState *sender, + const uint8_t *buf, int size, + NetPacketSent *sent_cb) { NetQueue *queue; int ret; @@ -702,28 +698,20 @@ static ssize_t qemu_send_packet_async_with_flags(NetC= lientState *sender, =20 /* Let filters handle the packet first */ ret =3D filter_receive(sender, NET_FILTER_DIRECTION_TX, - sender, flags, buf, size, sent_cb); + sender, buf, size, sent_cb); if (ret) { return ret; } =20 ret =3D filter_receive(sender->peer, NET_FILTER_DIRECTION_RX, - sender, flags, buf, size, sent_cb); + sender, buf, size, sent_cb); if (ret) { return ret; } =20 queue =3D sender->peer->incoming_queue; =20 - return qemu_net_queue_send(queue, sender, flags, buf, size, sent_cb); -} - -ssize_t qemu_send_packet_async(NetClientState *sender, - const uint8_t *buf, int size, - NetPacketSent *sent_cb) -{ - return qemu_send_packet_async_with_flags(sender, QEMU_NET_PACKET_FLAG_= NONE, - buf, size, sent_cb); + return qemu_net_queue_send(queue, sender, buf, size, sent_cb); } =20 ssize_t qemu_send_packet(NetClientState *nc, const uint8_t *buf, int size) @@ -762,7 +750,7 @@ ssize_t qemu_send_packet_raw(NetClientState *nc, const = uint8_t *buf, int size) } =20 static ssize_t nc_sendv_compat(NetClientState *nc, const struct iovec *iov, - int iovcnt, unsigned flags) + int iovcnt) { uint8_t *buf =3D NULL; uint8_t *buffer; @@ -789,7 +777,6 @@ static ssize_t nc_sendv_compat(NetClientState *nc, cons= t struct iovec *iov, } =20 static ssize_t qemu_deliver_packet_iov(NetClientState *sender, - unsigned flags, const struct iovec *iov, int iovcnt, void *opaque) @@ -818,7 +805,7 @@ static ssize_t qemu_deliver_packet_iov(NetClientState *= sender, if (nc->info->receive_iov) { ret =3D nc->info->receive_iov(nc, iov, iovcnt); } else { - ret =3D nc_sendv_compat(nc, iov, iovcnt, flags); + ret =3D nc_sendv_compat(nc, iov, iovcnt); } =20 if (owned_reentrancy_guard) { @@ -850,22 +837,20 @@ ssize_t qemu_sendv_packet_async(NetClientState *sende= r, =20 /* Let filters handle the packet first */ ret =3D filter_receive_iov(sender, NET_FILTER_DIRECTION_TX, sender, - QEMU_NET_PACKET_FLAG_NONE, iov, iovcnt, sent_= cb); + iov, iovcnt, sent_cb); if (ret) { return ret; } =20 ret =3D filter_receive_iov(sender->peer, NET_FILTER_DIRECTION_RX, send= er, - QEMU_NET_PACKET_FLAG_NONE, iov, iovcnt, sent_= cb); + iov, iovcnt, sent_cb); if (ret) { return ret; } =20 queue =3D sender->peer->incoming_queue; =20 - return qemu_net_queue_send_iov(queue, sender, - QEMU_NET_PACKET_FLAG_NONE, - iov, iovcnt, sent_cb); + return qemu_net_queue_send_iov(queue, sender, iov, iovcnt, sent_cb); } =20 ssize_t diff --git a/replay/replay-net.c b/replay/replay-net.c index 3b70f71cf1..87e6d68f4e 100644 --- a/replay/replay-net.c +++ b/replay/replay-net.c @@ -24,7 +24,6 @@ struct ReplayNetState { =20 typedef struct NetEvent { uint8_t id; - uint32_t flags; uint8_t *data; size_t size; } NetEvent; @@ -50,11 +49,10 @@ void replay_unregister_net(ReplayNetState *rns) g_free(rns); } =20 -void replay_net_packet_event(ReplayNetState *rns, unsigned flags, +void replay_net_packet_event(ReplayNetState *rns, const struct iovec *iov, int iovcnt) { NetEvent *event =3D g_new(NetEvent, 1); - event->flags =3D flags; event->data =3D g_malloc(iov_size(iov, iovcnt)); event->size =3D iov_size(iov, iovcnt); event->id =3D rns->id; @@ -74,7 +72,7 @@ void replay_event_net_run(void *opaque) assert(event->id < network_filters_count); =20 qemu_netfilter_pass_to_next(network_filters[event->id]->netdev, - event->flags, &iov, 1, network_filters[event->id]); + &iov, 1, network_filters[event->id]); =20 g_free(event->data); g_free(event); @@ -85,7 +83,6 @@ void replay_event_net_save(void *opaque) NetEvent *event =3D opaque; =20 replay_put_byte(event->id); - replay_put_dword(event->flags); replay_put_array(event->data, event->size); } =20 @@ -94,7 +91,6 @@ void *replay_event_net_load(void) NetEvent *event =3D g_new(NetEvent, 1); =20 event->id =3D replay_get_byte(); - event->flags =3D replay_get_dword(); replay_get_array_alloc(&event->data, &event->size); =20 return event; --=20 2.42.0