From nobody Fri Nov 14 15:22:02 2025 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; dmarc=pass(p=none dis=none) header.from=syntacore.com ARC-Seal: i=1; a=rsa-sha256; t=1762422581; cv=none; d=zohomail.com; s=zohoarc; b=jb246u4dAKqWqPrDqgIYJxipQJRY0YRNpU17xeYptHc3LdyI5F5w63Hu75Txdti+sk0CWYbeYsatPQxRjCAVZm4+5mtq3AwL0nGqmZ7IQNcsQ2OMNJgHjbKQSlhabraT4GDbLWHZL/SfTLnN/en7BuLLLtwBoEAdgo2E252/BIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762422581; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G1q86/DgqPNjCWBa7TyF1koxVFpglV1ohFFAZyKfyBs=; b=ULz7GQoAxQxVEqIsr8ZBYmDLefoMK/dH6DoxXSU9axUI/5AsbANNwN1fhZbiUXKgQdqEI0Ceqcvpt4hi6ASNSxUybulnUwr4Yal29P4/WDemFKQDS0DImx5hUQp4fxApASYj+86BhZYZZKDmYdona8/AMiBl4fMGiisFdWHX82E= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1762422581818866.3363739511778; Thu, 6 Nov 2025 01:49:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vGwbq-0004Ex-B7; Thu, 06 Nov 2025 04:48:50 -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 1vGwbo-0004EG-Mb; Thu, 06 Nov 2025 04:48:48 -0500 Received: from m.syntacore.com ([178.249.69.228]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vGwbn-0006x3-7J; Thu, 06 Nov 2025 04:48:48 -0500 Received: from MRN-SC-KSMG-01.corp.syntacore.com (localhost [127.0.0.1]) by m.syntacore.com (Postfix) with ESMTP id DE0F11A0004; Thu, 6 Nov 2025 09:48:44 +0000 (UTC) Received: from S-SC-EXCH-01.corp.syntacore.com (mail.syntacore.com [10.76.202.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by m.syntacore.com (Postfix) with ESMTPS; Thu, 6 Nov 2025 09:48:44 +0000 (UTC) Received: from NB-8361.lan (172.27.13.83) by S-SC-EXCH-01.corp.syntacore.com (10.76.202.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Thu, 6 Nov 2025 12:47:48 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 m.syntacore.com DE0F11A0004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=m; t=1762422524; bh=G1q86/DgqPNjCWBa7TyF1koxVFpglV1ohFFAZyKfyBs=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=gUcnnYG1vKos/a+jtwIvDeVDNwG6byyHJjGgbpbtGnQwXaNXXZ2q2hcFG1hUy980p r7aMqb1Blh4/zVUNH982cTXxkkf0apXi8DjO4v0zja8UdLEaOHEUH6hHM6+j99dWRN yNcajGyDrZbFeBCiYUe4wUixqG2R4reD5HPN6qcENiO6I0r54yx0BzaP/i2NgDJ13T jcdVxfdXI/HqsG2SKf3gSlTW7rUWG04i2QV9RVMbftRYveYQ9znlXe3Y2Oirpy4502 p6yOvKV0q0MYW4eS1RquI9vtOg2LXRu9gcRlaOutLF0Q/JdxMCDUv9xAOx1WMFrXEF UBINw8MVjJlTA== From: Ilya Repko To: "Edgar E. Iglesias" , Alistair Francis , Peter Maydell , Jason Wang CC: "open list:Xilinx Zynq" , "open list:All patches CC here" Subject: [PATCH] Revert "hw/net: Fix the transmission return size" Date: Thu, 6 Nov 2025 12:48:37 +0300 Message-ID: <20251106094837.431976-1-i.repko@syntacore.com> X-Mailer: git-send-email 2.51.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.27.13.83] X-ClientProxiedBy: S-SC-EXCH-01.corp.syntacore.com (10.76.202.20) To S-SC-EXCH-01.corp.syntacore.com (10.76.202.20) X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.1.8310, bases: 2025/11/06 08:24:00 #27887868 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: NotDetected X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 5 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: pass client-ip=178.249.69.228; envelope-from=i.repko@syntacore.com; helo=m.syntacore.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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 @syntacore.com) X-ZM-MESSAGEID: 1762422583951154100 Content-Type: text/plain; charset="utf-8" This reverts commit 3a6d374b754b4b345195ff6846eeaffedc96a7c5. During axienet_eth_rx_notify(), s->rxpos is modified to indicate how much data was pushed to AXI DMA. eth_rx() would then return this value. If at 0, network subsystem would consider packet reception as failed and put the packet in a queue for later. Before we attempt to push packet data to AXI DMA, the packet is stored in s->rxmem buffer. If an attempt to push data fails, we will reattempt to deliver it from s->rxmem buffer once s2mm stream gets a new descriptor. s->rxmem would not be overwritten by a subsequent eth_rx() call, because eth_can_rx() protects it in case it has any data at all. Leaving the packet in a NetQueue though effectively duplicates it. Therefore, eth_rx() must indicate successful packet reception in case data push to AXI DMA fails. Signed-off-by: Ilya Repko --- hw/net/xilinx_axienet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index 31e7708082..101b3f260a 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c @@ -867,7 +867,7 @@ static ssize_t eth_rx(NetClientState *nc, const uint8_t= *buf, size_t size) axienet_eth_rx_notify(s); =20 enet_update_irq(s); - return s->rxpos; + return size; } =20 static size_t --=20 2.51.1