From nobody Fri May 3 01:52:27 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=1669386439; cv=none; d=zohomail.com; s=zohoarc; b=ZaW+9n4oaSq3bUX7JSJnO5xZIu300i0kzN6NeaWZczSHGtZihyH7ZTXKV2Q68oL4N4cW2fq/ZioQ6wlW7eXq3h8bhFjktHZw/j9HU36HruvMNA+6dxOd3oeEFl0yRxxc2wqvu9Y5mIyuWfxhzraxdJPFaQWzuWNQjl4K9o2b3QU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669386439; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject; bh=u/8kauuLTeiZPHYhQpTPy/oHbbD+riy1SFRNnkhS1QM=; b=E13jqJ4/zSsze+l6g6HCEYB4LH85b9S1er/f+5YkeDQXSEaXaHs0pfxpbxII4no8Tzc6u2NQtgwOLEXOQZ1yGfvanClzUxjupyjdCeXZQSpOhAdfue/xpLuequs4MBlFLne+7as+bYHLLOk7uxSkNXVtiTv7CAd7zs9iKijmHCg= 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 1669386439187220.64720743922646; Fri, 25 Nov 2022 06:27:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyZev-0002Bn-Ex; Fri, 25 Nov 2022 09:26:29 -0500 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 1oyZeq-0002BA-E9 for qemu-devel@nongnu.org; Fri, 25 Nov 2022 09:26:24 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyZeo-0006SA-Cx for qemu-devel@nongnu.org; Fri, 25 Nov 2022 09:26:24 -0500 Received: by mail-pl1-x636.google.com with SMTP id jn7so4116952plb.13 for ; Fri, 25 Nov 2022 06:26:22 -0800 (PST) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id k2-20020a170902d58200b00179e1f08634sm3427423plh.222.2022.11.25.06.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 06:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=u/8kauuLTeiZPHYhQpTPy/oHbbD+riy1SFRNnkhS1QM=; b=esEQ3IUwrJF2awKy8nbaeG8PqnX0AxvPl5cHxsEd4PnFYT9pfmPoSUJXmJr8eip4wi Vl9MKulhdZMLxnSiRpofJY1vLYr1V9H3iB/driISRAVawUfTQZczQG8f6yzYe0itCm5C 6TKK/d0zV825TeItCnWOu+j02oYYPGVWxBdAC5flQzMuzsQqdqgnhZze8mNiSVam+Yyx l/yYp/OGoO1BG018HSEzEfsfvkPPToQOzJMbQnVamOJKtbWeOLqAn2QdguQLhCOiC5sb J9ACWjSc7HQTTKI32RGmvNOTFcBSzzT4yza56CrfZx6S6dvVh/RE9z8fVp92FRhLgVyz 6kOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=u/8kauuLTeiZPHYhQpTPy/oHbbD+riy1SFRNnkhS1QM=; b=zxxOwY2nR7KB3UPiM0KeZLIxDNEnwR7BU+1g/RNeLj3TNawo7LejLAT+VSE5TxVfg/ d410+2/Y4niaFFe2icKHfVknI/fJMF5oAGQK/yXREAvybNBD/B0EqZhl8VoNL/FiwST/ 7eQTTh7rS3LOSX/rPBfOdkamCPs3Tw2rJCIa3/WNeKWfhfJuJ6evxNqW0mEWyRuCJtR4 cLPBsn4P9//rpJ7tNcDE3hEhhizvQnvBntB1Pjpo/tHk3nGYWI1zjP476vKhBVKAFL9S Pfcl/J4KW6e3SzLIaShjhZYTEhkAGfaLy5CdyD4+PcmrxWfkwL8jwpKmNyGsqdBmrMzW ZVtg== X-Gm-Message-State: ANoB5pm6gzxZy9062/RhFJJCfb2/5pUpGBdgbcEKpBZKByeqxJP8jIMN d9KRO+EXefGUgaUyho8YoeGv7RnA++MZSg== X-Google-Smtp-Source: AA0mqf5tXe3CsIFgLZx+xjYIlbdDCiKLAunqV2VMSXPBwh5H2yzXIkiWh9Yt9BtDr2YVA/Ksv5yBDA== X-Received: by 2002:a17:903:300c:b0:17c:b7ac:86f with SMTP id o12-20020a170903300c00b0017cb7ac086fmr18790987pla.140.1669386380457; Fri, 25 Nov 2022 06:26:20 -0800 (PST) From: Akihiko Odaki To: Cc: qemu-devel@nongnu.org, Dmitry Fleytman , Jason Wang , Yan Vugenfirer , Yuri Benditovich , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr . David Alan Gilbert" , Akihiko Odaki Subject: [PATCH v2] e1000e: Remove pending interrupt flags Date: Fri, 25 Nov 2022 23:26:08 +0900 Message-Id: <20221125142608.58919-1-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.38.1 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::636; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x636.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.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1669386441278100003 Content-Type: text/plain; charset="utf-8" They are duplicate of running throttling timer flags and incomplete as the flags are not cleared when the interrupts are fired or the device is reset. Signed-off-by: Akihiko Odaki --- hw/net/e1000e_core.h | 2 -- hw/net/e1000e.c | 5 ++--- hw/net/e1000e_core.c | 19 +++---------------- hw/net/trace-events | 2 -- 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/hw/net/e1000e_core.h b/hw/net/e1000e_core.h index 4ddb4d2c39..5807da4fb6 100644 --- a/hw/net/e1000e_core.h +++ b/hw/net/e1000e_core.h @@ -95,10 +95,8 @@ struct E1000Core { E1000IntrDelayTimer tidv; =20 E1000IntrDelayTimer itr; - bool itr_intr_pending; =20 E1000IntrDelayTimer eitr[E1000E_MSIX_VEC_NUM]; - bool eitr_intr_pending[E1000E_MSIX_VEC_NUM]; =20 VMChangeStateEntry *vmstate; =20 diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 7523e9f5d2..4a8a45ca52 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -630,12 +630,11 @@ static const VMStateDescription e1000e_vmstate =3D { VMSTATE_E1000E_INTR_DELAY_TIMER(core.tidv, E1000EState), =20 VMSTATE_E1000E_INTR_DELAY_TIMER(core.itr, E1000EState), - VMSTATE_BOOL(core.itr_intr_pending, E1000EState), + VMSTATE_UNUSED(1), =20 VMSTATE_E1000E_INTR_DELAY_TIMER_ARRAY(core.eitr, E1000EState, E1000E_MSIX_VEC_NUM), - VMSTATE_BOOL_ARRAY(core.eitr_intr_pending, E1000EState, - E1000E_MSIX_VEC_NUM), + VMSTATE_UNUSED(E1000E_MSIX_VEC_NUM), =20 VMSTATE_UINT32(core.itr_guest_value, E1000EState), VMSTATE_UINT32_ARRAY(core.eitr_guest_value, E1000EState, diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index fc9cdb4528..2ca49cf665 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -152,11 +152,6 @@ e1000e_intrmgr_on_throttling_timer(void *opaque) =20 timer->running =3D false; =20 - if (!timer->core->itr_intr_pending) { - trace_e1000e_irq_throttling_no_pending_interrupts(); - return; - } - if (msi_enabled(timer->core->owner)) { trace_e1000e_irq_msi_notify_postponed(); /* Clear msi_causes_pending to fire MSI eventually */ @@ -178,11 +173,6 @@ e1000e_intrmgr_on_msix_throttling_timer(void *opaque) =20 timer->running =3D false; =20 - if (!timer->core->eitr_intr_pending[idx]) { - trace_e1000e_irq_throttling_no_pending_vec(idx); - return; - } - trace_e1000e_irq_msix_notify_postponed_vec(idx); msix_notify(timer->core->owner, idx); } @@ -2011,13 +2001,11 @@ e1000e_clear_ims_bits(E1000ECore *core, uint32_t bi= ts) } =20 static inline bool -e1000e_postpone_interrupt(bool *interrupt_pending, - E1000IntrDelayTimer *timer) +e1000e_postpone_interrupt(E1000IntrDelayTimer *timer) { if (timer->running) { trace_e1000e_irq_postponed_by_xitr(timer->delay_reg << 2); =20 - *interrupt_pending =3D true; return true; } =20 @@ -2031,14 +2019,13 @@ e1000e_postpone_interrupt(bool *interrupt_pending, static inline bool e1000e_itr_should_postpone(E1000ECore *core) { - return e1000e_postpone_interrupt(&core->itr_intr_pending, &core->itr); + return e1000e_postpone_interrupt(&core->itr); } =20 static inline bool e1000e_eitr_should_postpone(E1000ECore *core, int idx) { - return e1000e_postpone_interrupt(&core->eitr_intr_pending[idx], - &core->eitr[idx]); + return e1000e_postpone_interrupt(&core->eitr[idx]); } =20 static void diff --git a/hw/net/trace-events b/hw/net/trace-events index 4c0ec3fda1..8fa4299704 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -201,10 +201,8 @@ e1000e_rx_metadata_ipv6_filtering_disabled(void) "IPv6= RX filtering disabled by e1000e_vlan_vet(uint16_t vet) "Setting VLAN ethernet type 0x%X" =20 e1000e_irq_msi_notify(uint32_t cause) "MSI notify 0x%x" -e1000e_irq_throttling_no_pending_interrupts(void) "No pending interrupts t= o notify" e1000e_irq_msi_notify_postponed(void) "Sending MSI postponed by ITR" e1000e_irq_legacy_notify_postponed(void) "Raising legacy IRQ postponed by = ITR" -e1000e_irq_throttling_no_pending_vec(int idx) "No pending interrupts for v= ector %d" e1000e_irq_msix_notify_postponed_vec(int idx) "Sending MSI-X postponed by = EITR[%d]" e1000e_irq_legacy_notify(bool level) "IRQ line state: %d" e1000e_irq_msix_notify_vec(uint32_t vector) "MSI-X notify vector 0x%x" --=20 2.38.1