From nobody Tue Nov 4 18:44:22 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530341043500778.1099631223111; Fri, 29 Jun 2018 23:44:03 -0700 (PDT) Received: from localhost ([::1]:45834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ9c2-0007Hl-NH for importer@patchew.org; Sat, 30 Jun 2018 02:44:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ96T-0004Ym-3K for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ96S-0002uA-5W for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:25 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:33931) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ96R-0002rk-VS for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:24 -0400 Received: by mail-wr0-x243.google.com with SMTP id a12-v6so10656825wro.1 for ; Fri, 29 Jun 2018 23:11:23 -0700 (PDT) Received: from donizetti.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 24-v6sm563454wrz.94.2018.06.29.23.11.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 23:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N5afWFNaJxVHHZ+F/X/MLqjBZ0Y1SrtlcCQt3SrIxm0=; b=oypZCrFQqGbN+wTcqJ5Fooa/9cDlnL+IT+Bmj3PlCOM//WArQ+Zk/qgDpHX2vzyw/r hFH9h+nKVn6sIneAQXEfHOuSqWFXN+TeAKgKPIwJcPo/PPQwwU+sK9n6cRR+U+xpsw/t ZvS6z4fN/sjX77QVLwyZwj759g/ANuLhJFnl5Qq8b3MvbNA6H81dznCoUrT3kwHLhWJv krUf/cCNNVDPdBDwFJIe8QNivtRldKQNwlN87TPyZkAX4/l5fNDwpI91hiik/8i+60kT 28M+qtXDJQ21ZErkxVGf9bp7B86rDKlsUXuGbCMoCCEouI2PSkJ5C2H0dgHknGu4Jf/D U4+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=N5afWFNaJxVHHZ+F/X/MLqjBZ0Y1SrtlcCQt3SrIxm0=; b=eibSHFEN4cak/1iRY8k337i23CDMmKV/TNtwQHqMHBedTOu3SA31qLmMOxqn3I8fYw zPsSboOF5Q6iMseSi6/lirDPUNUE3f2jqCwSUPuSXOtJYVUNzmodL8E9yfCXN8QBDKo3 C9SrjZW8jcv8bqpHkh6d63mkf+VwJgD/vg5RnF4/l67zqpcEyld2aLCEpBcDZ0w+R7mD 97EEPU0DcpOUyNOc7Kt2B3By/la96Cu9V/WujRvgvpuZ4t9FyqtwKcETglL0umbC6Dc/ s+cFVaEHyFTybC+gi03iOx5X8kyrgq1jIxQle4kQsZ/2DZgqTOkRscMhKtvofp8SW/Fm fofQ== X-Gm-Message-State: APt69E20F4+gu86ZqvI/bAf6GgP/uJZIXc1caoSZsJHBCplaKI2cQKl/ zMTRoXg9bq7gdcPkjXNgeeoFYFVJ X-Google-Smtp-Source: AAOMgpcJnzHJmn3Cycsqj5H8o2lENdyWO6YbG3Qu5s4Ememe8QHHEea0ydgpQhm17wCvKUNGiij4Mg== X-Received: by 2002:adf:84c5:: with SMTP id 63-v6mr14830301wrg.50.1530339082769; Fri, 29 Jun 2018 23:11:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 30 Jun 2018 08:10:32 +0200 Message-Id: <20180630061040.6018-40-pbonzini@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180630061040.6018-1-pbonzini@redhat.com> References: <20180630061040.6018-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 39/47] hw/virtio: Use the IEC binary prefix definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Philippe Mathieu-Daud=C3=A9 It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20180625124238.25339-39-f4bug@amsat.org> Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio-net.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h index 02484dc..4d7f3c8 100644 --- a/include/hw/virtio/virtio-net.h +++ b/include/hw/virtio/virtio-net.h @@ -14,6 +14,7 @@ #ifndef QEMU_VIRTIO_NET_H #define QEMU_VIRTIO_NET_H =20 +#include "qemu/units.h" #include "standard-headers/linux/virtio_net.h" #include "hw/virtio/virtio.h" =20 @@ -44,7 +45,7 @@ typedef struct virtio_net_conf } virtio_net_conf; =20 /* Maximum packet size we can receive from tap device: header + 64k */ -#define VIRTIO_NET_MAX_BUFSIZE (sizeof(struct virtio_net_hdr) + (64 << 10)) +#define VIRTIO_NET_MAX_BUFSIZE (sizeof(struct virtio_net_hdr) + (64 * KiB)) =20 typedef struct VirtIONetQueue { VirtQueue *rx_vq; --=20 1.8.3.1