Message ID | 20241114210010.34502-6-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:9bcc:0:b0:382:184f:390f with SMTP id e12csp504319wrc; Thu, 14 Nov 2024 13:01:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWBUmzrpGdaT7cmov/saT4ibm2LvFuDGlsLP3CGeRQ7OxOOurVCsgIBk2+UE/b6n+E6Sebu5Q==@linaro.org X-Google-Smtp-Source: AGHT+IG1w/21jzUYXE+D5Anj+qxdukGWZ+J5r9IYpXm7eheTxnn5Z6fivkmWnbf/UASMXUTvWp8F X-Received: by 2002:a05:6808:1a2a:b0:3e6:569e:4601 with SMTP id 5614622812f47-3e7bc7a8ef1mr382654b6e.3.1731618117479; Thu, 14 Nov 2024 13:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731618117; cv=none; d=google.com; s=arc-20240605; b=J5Vt+/ziPgfkaZGWD3BbOGQdbLOQ32AiPm2Ph8X8HfVOVZmgVfg6jUqCD6IXgddlS+ ErOP6N2WRaOwEmvjmCVa3N9tBQ9xQsom/eIt4stV3Fcirn3XRYOLhxFYQf1ThfzpP4ix nfiBkVp4584yKJJqhylGSBzYKOwXxTxmyDOsjsZeffZHh/2xdGkNvtrDRjCeN7zDDNzq RnHcH1CKYabpXHd2WcmbWd9rlrJOIEdt/aQh6lMRVsccUAyt9EMxs6hIpVCxPmq69mDx U9qsstBB+zaI6ARCwzgxbFGQCPAVKoMvRkYWyFc6M8tDnYPL05zDHu1QFTqx9cuVIgN8 LgKw== 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=wG+1NC98eSptDZUHUCzND7zjX1Tqst1VgWsS8j/5siQ=; fh=IRuGWMvTeecxgxjKSI7QmRflMkYktes0sVu/RVhAZQM=; b=hMWXogueVYpuM0ysokIABS1Rl1BihawVzLItVNhCw6AY+6lUbsJG03agCCgF1Bf4s8 C/l4p173W4ZmpEoHzeFRaKLT3ivGV8JckgXETprzjS+5nHSNoGeGDOaApk9hJZRnPdZT 8cHJJkx63n43Bs+joxaHcNT6g9JnzZQgpGvAOMFRBIsCZq1cymtBScK+VIREcMS8VOyU fH2/IlU5iMkOCiCH9FVfHx/dnHe3dlVLJxclQqN2SoluU3oxu9C6dX1QhWIOy8wjdZxZ Y+tJ4pO+oGau+w8eJEvowiEdcxsy/pKVBE3Stl+/x1L+mNrPHB/KJrbIUILjMS5uJaAd FzGg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PLHF8DTF; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4ad646f6008si9620137.78.2024.11.14.13.01.57 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Nov 2024 13:01:57 -0800 (PST) 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=PLHF8DTF; 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 <qemu-devel-bounces@nongnu.org>) id 1tBgxv-0000ZU-7w; Thu, 14 Nov 2024 16:01:24 -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 <philmd@linaro.org>) id 1tBgxZ-0000Nn-8C for qemu-devel@nongnu.org; Thu, 14 Nov 2024 16:01:01 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) 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 1tBgxX-0007zZ-IJ for qemu-devel@nongnu.org; Thu, 14 Nov 2024 16:01:00 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-37d447de11dso18963f8f.1 for <qemu-devel@nongnu.org>; Thu, 14 Nov 2024 13:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731618054; x=1732222854; 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=wG+1NC98eSptDZUHUCzND7zjX1Tqst1VgWsS8j/5siQ=; b=PLHF8DTFh4adtJPQ+/g9H9pbrTPsO8PfRFaNY6YPGJMBGyVsFqplpj5TfPGC9pFS7S CsR1SJERx0U33ypYV7nAgco0w2rlUCUJTkiIMGjhp08Yf3oePBBZp2lc3Nj7k+JDGgCH jkTtZ3CI7BFThD4kyF/H/dhxBw0jzsORCcP7xDHJUKt2630PTD14jq7zTB9eMY/3RxbF /l7FjwLpvQjsbd9qJ7pBSIALS7UWmC3SRnrqYjAr11QKgrKR3jaidxJy73QiK8S4AR8U y0lnbfp4sAQMvdsgtsgnq5zYxBeK/3rVP4H1lWRm9tsOVISIwNiBC7ehCPtc2BnaDl0N YYIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731618054; x=1732222854; 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=wG+1NC98eSptDZUHUCzND7zjX1Tqst1VgWsS8j/5siQ=; b=w0XnlEeIQN2FLAoTVCaDFf67TjfAVhXdvYioNaDc2asmycfNqwWhtkIMnkx2Pb3v5v IV59MRZ0s2CjzoRZyDHIp2Kq7rLesHX8m2Uqg8muT6yb8OWeykiLh14Q6khaYtDQCHsZ l8yUDmAnf4XPtc3GJkMIyNMdoo2inFYEsJaDUHXv7zbUvjhH0Ryhq3X2nW9ZoJLjaVvh XiFkoep4jYWys8L5VInS1O+neMWcm3iNTb3f7K7ARxyIlbcp7DQG+C1EySYaYgZC6LeS 3oeLBtID8Ngc+JkBVU6GrNfb0qGNHmAqjeChBJ1L58ZxSiiXj8OSENBwxBcqHxAiJx1D 0qrw== X-Gm-Message-State: AOJu0YwoSDYx4OCdTBbajn+x1TtFmzexdf/Mx1TpaRzA8ZmawtkrPmEs vPtwNzL7KbRuHZ8dOQWlgQvJZnrqlTSx7Y5eGU00say+c7NufvHg/NmYNMCanSyhL8C5db8iRsQ E X-Received: by 2002:a5d:6d01:0:b0:37d:4d80:34ae with SMTP id ffacd0b85a97d-38225901fe2mr147742f8f.4.1731618053653; Thu, 14 Nov 2024 13:00:53 -0800 (PST) Received: from localhost.localdomain ([176.187.209.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3821adbbca7sm2492439f8f.47.2024.11.14.13.00.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Nov 2024 13:00:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, qemu-arm@nongnu.org, Richard Henderson <richard.henderson@linaro.org>, Thomas Huth <thuth@redhat.com>, Anton Johansson <anjo@rev.ng>, Bernhard Beschow <shentey@gmail.com>, Alistair Francis <alistair@alistair23.me>, Paolo Bonzini <pbonzini@redhat.com>, Gustavo Romero <gustavo.romero@linaro.org>, =?utf-8?q?Marc-Andr=C3=A9_Lurea?= =?utf-8?q?u?= <marcandre.lureau@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Jason Wang <jasowang@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, "Edgar E . Iglesias" <edgar.iglesias@amd.com> Subject: [PATCH RESEND v2 05/19] hw/net/xilinx_ethlite: Correct maximum RX buffer size Date: Thu, 14 Nov 2024 21:59:56 +0100 Message-ID: <20241114210010.34502-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114210010.34502-1-philmd@linaro.org> References: <20241114210010.34502-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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: <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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
hw/net/xilinx_ethlite: Map RAM buffers as RAM and remove tswap() calls
|
expand
|
diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index 0f59811c78..0df962cd22 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -3,6 +3,9 @@ * * Copyright (c) 2009 Edgar E. Iglesias. * + * DS580: https://docs.amd.com/v/u/en-US/xps_ethernetlite + * LogiCORE IP XPS Ethernet Lite Media Access Controller + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -33,6 +36,7 @@ #include "trace.h" #define R_TX_BUF0 0 +#define BUFSZ_MAX 0x07e4 #define R_TX_LEN0 (0x07f4 / 4) #define R_TX_GIE0 (0x07f8 / 4) #define R_TX_CTRL0 (0x07fc / 4) @@ -195,7 +199,7 @@ static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size) return -1; } - if (size > (R_MAX - R_RX_BUF0 - rxbase) * 4) { + if (size >= BUFSZ_MAX) { trace_ethlite_pkt_size_too_big(size); return -1; }