From patchwork Thu May 1 23:01:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886459 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp548258wrq; Thu, 1 May 2025 16:03:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxk1g6E4Sy9Y9I4ZagaWWzkhimjUuMqBF6CMBjZU/rS5asr9A5AYvRMY61m4QhS2dHr4xWiw==@linaro.org X-Google-Smtp-Source: AGHT+IHAEu6SBQ4alk308Kmzv1J4JKIdrI6ISOvSDqp/4qVuJPePuiesxaIQN7J4bMLW+jd2OFeD X-Received: by 2002:a05:6214:500c:b0:6f4:b265:261 with SMTP id 6a1803df08f44-6f51524f4b9mr20912726d6.8.1746140594066; Thu, 01 May 2025 16:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746140594; cv=none; d=google.com; s=arc-20240605; b=LL5bP87QSoER8VTWU2O5e5ywiIxydB7OdvS0Ie1pEeG7Uq8dDCQA/bETkg+w69C+3t PM03KWevVSk5iLt5RY6GN4bukyJnOmIpwiPHSfVU/zhbr8mfiSWSGI6a+kNrZXJx1Ytj IKHmKYQFnThY3UbrCyFqECMabesTIqMgAEdDVfoMSsn8XqiRVe84Eu+25CAZWXmHcivj wKSBQFOM7Y5SpnPE9T4KZ0Cj+8XM3IULnk4H2hXlw1fB5+BdVU0DHD0HtGtK7mqrXugp AKvNRgK2qaYEF7XPTomSvuWViaut1cky9k3vJELW2SwrlO4diKWuWrojWqEhkOfh8dlW BUXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MKlAvP/b7bRS8YoXdECBwma4F9omGf4fESvbK1cfcEc=; fh=Je0Fu6WOva9CO7x05EmtzN8739OQv5Rr57VCUmCpFeg=; b=EQAaFnwIH61GANt7hzQOdPdwrJqiWDxZTNR0d68SR1K26kvGIPRUJkd2AExHiGLmF8 TeSCm0GZyiD3VwvwYsvrEVI5HuZOB7apjdOlnXmCYt+kSex1w/DS+0p5c3RRwRTblCsm o3/PecrnMMWm42RFelbxP6hWZsv7DvGCHXT/OD7SCjve7EqleI3h1FfcbkiwFg6Ua+KA 3OCoV7Vt3SoEATgfrVFIXr/L2KGJj81Ok+SxIZdLo+Y4YATQExlwUvRZtX86hWFTjXiC 0bQUWwqP/cZC06QfUhDyON2BDOGLC0ih0kBtDtPjKwkjDAgj4JT07jd2NcmVW1gTzn4y LBGA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P7r0+NFB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f50f4acd11si16715846d6.459.2025.05.01.16.03.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 May 2025 16:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P7r0+NFB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAcvM-0000Sz-Hv; Thu, 01 May 2025 19:02:36 -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 1uAcvH-0000LC-Pb for qemu-devel@nongnu.org; Thu, 01 May 2025 19:02:33 -0400 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAcvF-0002M7-Lg for qemu-devel@nongnu.org; Thu, 01 May 2025 19:02:31 -0400 Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-3d5e68418b5so13896405ab.2 for ; Thu, 01 May 2025 16:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746140547; x=1746745347; 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=MKlAvP/b7bRS8YoXdECBwma4F9omGf4fESvbK1cfcEc=; b=P7r0+NFBdixDD9pJAWHbaEE7RkA5/vScdf4hTS3Vxm8bIpUeAIx1Dks6KTYejWmXwJ 7UkfS4SX9hdSBzEWb9ucddbFbP3UUoqBfXvDHdqLtWWqet2OdsIlRa0yLOxJUZWKW6o/ eC4c0+J+kSF/wnHnI09bsyC/DvYWCT1opLM3KbuIOprka6e1bWH9ciFiJ+QxE1ndiP4C Z3Gcb1c4LIPA3TVZFTompAC6rZhgu9xoP0nRP09BizHOH8aHy47rgEAjF3D3npYE0gKh FELKA0f9O53TWit5dd2rPob/ceomgaywGszGwD5XdjAPB1lhvFdgZ9RJNI+j5m/9u8CP XjMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746140547; x=1746745347; 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=MKlAvP/b7bRS8YoXdECBwma4F9omGf4fESvbK1cfcEc=; b=kXA2odY0h743erM4YpIBSDRaMHzAC7AbNcPemMqz+bZD644+JMql4BAGlXKRu4GqMB 8bQ65BsMC8lisEd+Dh2rCwYqFVEp7aGiwjCi0Jzlck3JGN1Re6ZszFazTpw6F93r5tc5 IH3SeVB12Y2n0USm/dQgqFaKMwLp39l/ORkua5UxWrIfCyZ0Ut4MZE9WosrcIuR20tuw f6PMmVyzxUZY94RmZcSiZDvrTSZ6TwYTY1T26pOpNFFQ3NYF+kvfsGFdJmuOMqwykdSr yCkLUnbEJNQh2iT1RQby+VASiFKxmKquS8NIjnTRV7qwBY2HQU2va8wdqmsJnHAwfISA v6KA== X-Gm-Message-State: AOJu0YzVObudXZmcgGlz4ffwh5mJZuV0XML688mD5D2v2AAUVgcIZcqT fOKy8XAsLeIHRuSTDVWeZIVrWMNRsYxmO3tbIXOgRCtOxRuuMjZf8k7hUMj5QGNHeWiMLJVALEa J X-Gm-Gg: ASbGnctUXEN81jKEh00zj74hoFkDqfEnxw1zfxWPMoXCdsEQ3ZAdE42WppnbrB+qiDg 3YL9k2iy6mgIWlr0bQaWlU33JwTIlfTgrynO7aujTlsE8A0YXphr1n3HdoolIlRfn2D1k8w5GiH Rkp1v5OnVxTcoYgMAyyOf9/wm5ZSFJqXDGCX8M+HyUd/defOoOxVMMsb1rV4J8dN/3DT2Cq/1FK 5dOL0e+Ub7NbXSAQOiuR2A+fS3AX76YFZE4YOo/leTm4qgktxA8wNF8HqIVk5BE8oAUTofsbGTB rY1ztEio6yOY15uHFNHuRr4KDrqohVsssRPad9ize7d2VP+gFe4PAT+tqnxiOMUltieEo4uKUs7 94Q5O4RNaMMm7XGxWa9YdPzCISmx7bro= X-Received: by 2002:a05:6e02:168d:b0:3d3:f6ee:cc4c with SMTP id e9e14a558f8ab-3d97be919c5mr8853545ab.0.1746140547164; Thu, 01 May 2025 16:02:27 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f88a8d0e77sm91354173.24.2025.05.01.16.02.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 01 May 2025 16:02:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Paolo Bonzini , Gerd Hoffmann , Thomas Huth , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , qemu-rust@nongnu.org, Zhao Liu , Eric Farman , Ilya Leoshkevich , Eduardo Habkost , Jason Wang , David Hildenbrand , Dmitry Fleytman , Richard Henderson , "Michael S. Tsirkin" , qemu-s390x@nongnu.org, Christian Borntraeger Subject: [PATCH 06/10] hw/net/e1000: Remove unused E1000_FLAG_TSO flag Date: Fri, 2 May 2025 01:01:24 +0200 Message-ID: <20250501230129.2596-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250501230129.2596-1-philmd@linaro.org> References: <20250501230129.2596-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-il1-x129.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=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org E1000_FLAG_TSO was only used by the hw_compat_2_11[] array, via the 'migrate_tso_props=off' property. We removed all machines using that array, lets remove all the code around E1000_FLAG_TSO, including the vmstate_e1000_tx_tso_state subsection. Signed-off-by: Philippe Mathieu-Daudé --- Is it OK to remove migration subsection like that? --- hw/net/e1000.c | 58 +++++++------------------------------------------- 1 file changed, 8 insertions(+), 50 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index e0310aef872..c68645684b6 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -127,13 +127,10 @@ struct E1000State_st { QEMUTimer *flush_queue_timer; /* Compatibility flags for migration to/from qemu 1.3.0 and older */ -#define E1000_FLAG_TSO_BIT 3 #define E1000_FLAG_VET_BIT 4 -#define E1000_FLAG_TSO (1 << E1000_FLAG_TSO_BIT) #define E1000_FLAG_VET (1 << E1000_FLAG_VET_BIT) uint32_t compat_flags; - bool received_tx_tso; bool use_tso_for_migration; e1000x_txd_props mig_props; }; @@ -1331,7 +1328,7 @@ static int e1000_pre_save(void *opaque) } /* Decide which set of props to migrate in the main structure */ - if (chkflag(TSO) || !s->use_tso_for_migration) { + if (!s->use_tso_for_migration) { /* Either we're migrating with the extra subsection, in which * case the mig_props is always 'props' OR * we've not got the subsection, but 'props' was the last @@ -1368,30 +1365,16 @@ static int e1000_post_load(void *opaque, int version_id) } s->tx.props = s->mig_props; - if (!s->received_tx_tso) { - /* We received only one set of offload data (tx.props) - * and haven't got tx.tso_props. The best we can do - * is dupe the data. - */ - s->tx.tso_props = s->mig_props; - } + + /* We received only one set of offload data (tx.props) + * and haven't got tx.tso_props. The best we can do + * is dupe the data. + */ + s->tx.tso_props = s->mig_props; + return 0; } -static int e1000_tx_tso_post_load(void *opaque, int version_id) -{ - E1000State *s = opaque; - s->received_tx_tso = true; - return 0; -} - -static bool e1000_tso_state_needed(void *opaque) -{ - E1000State *s = opaque; - - return chkflag(TSO); -} - static const VMStateDescription vmstate_e1000_mit_state = { .name = "e1000/mit_state", .version_id = 1, @@ -1416,28 +1399,6 @@ static const VMStateDescription vmstate_e1000_full_mac_state = { } }; -static const VMStateDescription vmstate_e1000_tx_tso_state = { - .name = "e1000/tx_tso_state", - .version_id = 1, - .minimum_version_id = 1, - .needed = e1000_tso_state_needed, - .post_load = e1000_tx_tso_post_load, - .fields = (const VMStateField[]) { - VMSTATE_UINT8(tx.tso_props.ipcss, E1000State), - VMSTATE_UINT8(tx.tso_props.ipcso, E1000State), - VMSTATE_UINT16(tx.tso_props.ipcse, E1000State), - VMSTATE_UINT8(tx.tso_props.tucss, E1000State), - VMSTATE_UINT8(tx.tso_props.tucso, E1000State), - VMSTATE_UINT16(tx.tso_props.tucse, E1000State), - VMSTATE_UINT32(tx.tso_props.paylen, E1000State), - VMSTATE_UINT8(tx.tso_props.hdr_len, E1000State), - VMSTATE_UINT16(tx.tso_props.mss, E1000State), - VMSTATE_INT8(tx.tso_props.ip, E1000State), - VMSTATE_INT8(tx.tso_props.tcp, E1000State), - VMSTATE_END_OF_LIST() - } -}; - static const VMStateDescription vmstate_e1000 = { .name = "e1000", .version_id = 2, @@ -1519,7 +1480,6 @@ static const VMStateDescription vmstate_e1000 = { .subsections = (const VMStateDescription * const []) { &vmstate_e1000_mit_state, &vmstate_e1000_full_mac_state, - &vmstate_e1000_tx_tso_state, NULL } }; @@ -1637,8 +1597,6 @@ static void pci_e1000_realize(PCIDevice *pci_dev, Error **errp) static const Property e1000_properties[] = { DEFINE_NIC_PROPERTIES(E1000State, conf), - DEFINE_PROP_BIT("migrate_tso_props", E1000State, - compat_flags, E1000_FLAG_TSO_BIT, true), DEFINE_PROP_BIT("init-vet", E1000State, compat_flags, E1000_FLAG_VET_BIT, true), };