Message ID | 20240402142431.70700-16-philmd@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBA2CCD1284 for <qemu-devel@archiver.kernel.org>; Tue, 2 Apr 2024 14:28:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rrf6K-0003nk-6G; Tue, 02 Apr 2024 10:27:00 -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 <philmd@linaro.org>) id 1rrf5q-0002ZS-Cb for qemu-devel@nongnu.org; Tue, 02 Apr 2024 10:26:30 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1rrf5j-0000Xo-PM for qemu-devel@nongnu.org; Tue, 02 Apr 2024 10:26:26 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-415446af364so26340145e9.0 for <qemu-devel@nongnu.org>; Tue, 02 Apr 2024 07:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712067976; x=1712672776; 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=LiQNL8qlUJUwVLo8ka7ZFh5OPYv1xBVi+fy9VmqgzRE=; b=lYzBQOB5xsn43gK0Cwk6kH7vdBEUOyARdDJv+GMWThn/j/uprIrJ+5xDju6+k2h9Yd OZzvBai9M9LUsBu+p/qQTBAYIwmrK0xAr1RqlFheoZB9IAOklLpbacaXK6nbDNoseX2d 8ChOnaUEEj7LnIeh40pHlzak5qUE2/HW9x46VYr2c2FhVammZ69x2nGyBo94aGh/lqA1 W6GYkYedEHSch55Gk/CFSiD99h6Xd3I1fP9CPcoJdltKqbfMvqw5MtIwzgNL44VDZ0ji eFM7mZ6Y8+uEIlrAEI0xPQsi6Yt1cAwXxj4XP65JW71FPoBsBeAjIh/9l9zTRf9vn/2m Nepg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712067976; x=1712672776; 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=LiQNL8qlUJUwVLo8ka7ZFh5OPYv1xBVi+fy9VmqgzRE=; b=mFmjew4SO5/N7ZvdaVZEWHzD9FhZkL0LtQA0EmPaqkyL00I+g1nmRJLhUZ1E1I3SFE cGOPCs1mlBVFfeG0VbOi/B6lmMzXqAz1+0CaY703P2ztzOFau/Yenh6MvvrNnEopLc0U tzN6zAMYpv6wBMnwQ4RlNk8S8xDXAZSREvp4PBMbiHWrJZjauPUNsOl9rmOK3P3XemvI m1Em8W3LJ2KQOnCcMLBqgBmT4UAm2CxgCGXAkQwQcX/sRFkkG7pQbMcClJR7WWHwcz9g 2z/Db4bkr9RPMr5O1zoAQF4nB65PNv96AZG28i0lUDmS2zxVG+bfkUUMy9OE3S4AAnMg YP2w== X-Gm-Message-State: AOJu0YxpQ8a6kus4E9VEzKpvzrt2pQxLLYcwTjDJVwacn0hpeI6hjqwy xBExYTxcB00G4nTB92XHiZDWdiMEy+0xpPwuIljNm0LFQkCuyuzrlnFPtFMoG8eMT2NJT9WqI0N dWbg= X-Google-Smtp-Source: AGHT+IE6saWf+oB/j8EBTqEFwDKJJ227HWQfzru1atRapCKVrnKsUxhdQi/s7wh3tKOXEde21OYylQ== X-Received: by 2002:adf:f108:0:b0:33e:c68d:d536 with SMTP id r8-20020adff108000000b0033ec68dd536mr10768328wro.15.1712067975793; Tue, 02 Apr 2024 07:26:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.202.91]) by smtp.gmail.com with ESMTPSA id dn13-20020a0560000c0d00b00341b7d5054bsm14389989wrb.72.2024.04.02.07.26.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 02 Apr 2024 07:26:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, Yajun Wu <yajunw@nvidia.com>, Jiri Pirko <jiri@nvidia.com>, "Michael S . Tsirkin" <mst@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org>, Jason Wang <jasowang@redhat.com> Subject: [PULL 15/15] hw/net/virtio-net: fix qemu set used ring flag even vhost started Date: Tue, 2 Apr 2024 16:24:30 +0200 Message-ID: <20240402142431.70700-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240402142431.70700-1-philmd@linaro.org> References: <20240402142431.70700-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org |
Series |
[PULL,01/15] accel/tcg/plugin: Remove CONFIG_SOFTMMU_GATE definition
|
expand
|
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index a6ff000cd9..58014a92ad 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -2865,6 +2865,10 @@ static void virtio_net_handle_tx_bh(VirtIODevice *vdev, VirtQueue *vq) VirtIONet *n = VIRTIO_NET(vdev); VirtIONetQueue *q = &n->vqs[vq2q(virtio_get_queue_index(vq))]; + if (unlikely(n->vhost_started)) { + return; + } + if (unlikely((n->status & VIRTIO_NET_S_LINK_UP) == 0)) { virtio_net_drop_tx_queue_data(vdev, vq); return;