From patchwork Tue May 30 02:43:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13259191 Return-Path: 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.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 CCC4FC77B73 for ; Tue, 30 May 2023 05:14:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.540723.842670 (Exim 4.92) (envelope-from ) id 1q3rgO-0006I6-AD; Tue, 30 May 2023 05:14:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 540723.842670; Tue, 30 May 2023 05:14:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q3rgO-0006Hy-5f; Tue, 30 May 2023 05:14:08 +0000 Received: by outflank-mailman (input) for mailman id 540723; Tue, 30 May 2023 02:43:32 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q3pKd-00089x-T4 for xen-devel@lists.xenproject.org; Tue, 30 May 2023 02:43:32 +0000 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [2607:f8b0:4864:20::42d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bfd13341-fe93-11ed-8611-37d641c3527e; Tue, 30 May 2023 04:43:28 +0200 (CEST) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-64d3578c25bso4579357b3a.3 for ; Mon, 29 May 2023 19:43:26 -0700 (PDT) Received: from alarm.. ([157.82.204.253]) by smtp.gmail.com with ESMTPSA id 63-20020a630542000000b0051baf3f1b3esm7801785pgf.76.2023.05.29.19.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 19:43:23 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bfd13341-fe93-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20221208.gappssmtp.com; s=20221208; t=1685414604; x=1688006604; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=swwLnIkzsF+teWY2PyMri5LA/E3FuwMRZkjgfo8Sf88=; b=Mk7dJszWz2jAD6FWi0cao85HuTooPQab6qm7QHzPUgs/YznOaSVoUH9MQcXHmnerZP hR1JtUquNXQLzoQle2nym9+2/UrkKMlqwAOJAlHXH8JOu8vd6du751KrQDltRrPAe9C5 i1VvizG0Bl3Nf1w+iysV9cthnw/1aAdUpjl9a1u7cX6ZAtNQwV7EGM9toZpV9T192QsT o0h6jomXg0eaMr7lSBclIWMo17OT0dP1IZg4szXD2PIilLzDOI3PuhuK1TGfGk/kvaVl KVHS+BTO5NgxEjKNvlVKL3EKGDw6qnxJICKErDGA00YBshaZ+29p1wqkgd3bzox0LFNV lBww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685414604; x=1688006604; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=swwLnIkzsF+teWY2PyMri5LA/E3FuwMRZkjgfo8Sf88=; b=LkRiddBMga5RiglUZRUnPQ/4ACIeZUFDKE6KRQVxPf1Gtdrc4bI2Of7o+OlTyHPYO8 U/psgCWic12kL1lnCRvxraJ7jMyk3vLIJBVEXwGaAXj1IYAlEEHkL1A4o7/4794v9oG0 kmj8v/om4EQw2PcT0cC0dwX9R7WRWf8ipXvbj7RApPOq9ia80EwrZXK1G17Di42D2QxC eJRPAlnfExdR0hkAjmBgm6rL1M/nWDJA8bRHwxf5ub8yKOR/QIvZBzwYSFKzSfDjE0Tv rsEqxr3+A/R49f8mpgqbxSK+4yJoFP7ZcKYuGucEbHe2OfkjupVWxWXIyxepOE95bSeS WP4A== X-Gm-Message-State: AC+VfDxWprrod1daLLOq3FXytiU1pDj/cjmrQoK5xYFI3iEUhU/iu17j wakNhQQ9+B1uQqW+MSMlgugbrQ== X-Google-Smtp-Source: ACHHUZ5YsC9cr+QFUOl5hhAO7DM8g16IxDu9WjEWSsTOketuhwKTj1vai2Ctzeoq8pHPAgrmQUbTCw== X-Received: by 2002:a05:6a20:ce4f:b0:10e:de4f:3437 with SMTP id id15-20020a056a20ce4f00b0010ede4f3437mr869413pzb.39.1685414604413; Mon, 29 May 2023 19:43:24 -0700 (PDT) From: Akihiko Odaki To: Cc: Mauro Matteo Cascella , P J P , Alexander Bulekov , Dmitry Fleytman , Beniamino Galvani , Peter Maydell , Strahinja Jankovic , Jason Wang , "Edgar E. Iglesias" , Alistair Francis , Stefan Weil , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Andrew Jeffery , Joel Stanley , Richard Henderson , Helge Deller , Sriram Yagnaraman , Thomas Huth , Aleksandar Rikalo , Subbaraya Sundeep , Jan Kiszka , Tyrone Ting , Hao Wu , Max Filippov , Jiri Pirko , Daniel Henrique Barboza , David Gibson , Greg Kurz , Harsh Prateek Bora , Sven Schnelle , "Michael S. Tsirkin" , Stefano Stabellini , Anthony Perard , Paul Durrant , Rob Herring , Gerd Hoffmann , qemu-arm@nongnu.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, xen-devel@lists.xenproject.org, Akihiko Odaki Subject: [PATCH 0/2] net: Update MemReentrancyGuard for NIC Date: Tue, 30 May 2023 11:43:00 +0900 Message-Id: <20230530024302.14215-1-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation follows what bottom half does, but it does not add a tracepoint for the case that the network device backend started delivering a packet to a device which is already engaging in I/O. This is because such reentrancy frequently happens for qemu_flush_queued_packets() and is insignificant. This series consists of two patches. The first patch makes a bulk change to add a new parameter to qemu_new_nic() and does not contain behavioral changes. The second patch actually implements MemReentrancyGuard update. Akihiko Odaki (2): net: Provide MemReentrancyGuard * to qemu_new_nic() net: Update MemReentrancyGuard for NIC include/net/net.h | 2 ++ hw/net/allwinner-sun8i-emac.c | 3 ++- hw/net/allwinner_emac.c | 3 ++- hw/net/cadence_gem.c | 3 ++- hw/net/dp8393x.c | 3 ++- hw/net/e1000.c | 3 ++- hw/net/e1000e.c | 2 +- hw/net/eepro100.c | 4 +++- hw/net/etraxfs_eth.c | 3 ++- hw/net/fsl_etsec/etsec.c | 3 ++- hw/net/ftgmac100.c | 3 ++- hw/net/i82596.c | 2 +- hw/net/igb.c | 2 +- hw/net/imx_fec.c | 2 +- hw/net/lan9118.c | 3 ++- hw/net/mcf_fec.c | 3 ++- hw/net/mipsnet.c | 3 ++- hw/net/msf2-emac.c | 3 ++- hw/net/mv88w8618_eth.c | 3 ++- hw/net/ne2000-isa.c | 3 ++- hw/net/ne2000-pci.c | 3 ++- hw/net/npcm7xx_emc.c | 3 ++- hw/net/opencores_eth.c | 3 ++- hw/net/pcnet.c | 3 ++- hw/net/rocker/rocker_fp.c | 4 ++-- hw/net/rtl8139.c | 3 ++- hw/net/smc91c111.c | 3 ++- hw/net/spapr_llan.c | 3 ++- hw/net/stellaris_enet.c | 3 ++- hw/net/sungem.c | 2 +- hw/net/sunhme.c | 3 ++- hw/net/tulip.c | 3 ++- hw/net/virtio-net.c | 6 ++++-- hw/net/vmxnet3.c | 2 +- hw/net/xen_nic.c | 4 ++-- hw/net/xgmac.c | 3 ++- hw/net/xilinx_axienet.c | 3 ++- hw/net/xilinx_ethlite.c | 3 ++- hw/usb/dev-network.c | 3 ++- net/net.c | 15 +++++++++++++++ 40 files changed, 90 insertions(+), 41 deletions(-)