From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41D34481AAE for ; Tue, 1 Sep 2026 16:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788280420; cv=none; b=Vec6z1vX8kZumJT0d9ABiPdJmqruypQFU6XxkdYJ4ObTnFwWauW0xR162btk6cUD7X5afN1gEWx8b52k4eTgDtt6BHxHdJmAJmuchszNNiIdrwphRal1VSYfloK+Zh2v2wuTFhNg72bbiqFNcETT0MDjm7LaIbArIprOK/t8lUY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788280420; c=relaxed/simple; bh=HkHzt3ZwUXXr8ahJIwDVgHcwAO0rAKRD8jm7cGTsBcQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X5jGO9blTcXDyMU0aaVDW1rMofFKCPSSeAztOzvP95+5kSaUN2ugxM0Dyk992EhjhNX33VfTSeWsVwhcTBUJqww/JwPn0sjBjdPDdNdqiXhry1hcVKjw72m3O+YflzdLs1SMkyx8gmfwLSDcIT6a5hXQ0NtNdfJn7tHfNPGLl8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RyEC7HDy; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RyEC7HDy" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-3a1e9f55e03so51811fa.1 for ; Tue, 01 Sep 2026 09:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788280417; x=1788885217; darn=vger.kernel.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:content-type; bh=8SPDGoSTl4FqMo3J2GRF/g+R9eIi+flZl02DefvrWrw=; b=RyEC7HDyKUNjeOkOFrBDsB3j8tqS1OXXOdSka6LiHnLyJaWVb2l/Gsm7jxfWF0lZde PseWB2UDTw8PQJcKUV17nJELnP+xD2pWxfpL7PA1EzgRiX1CtLdZzFo/sDdBq8vKin6j nhwWToDwCPzTA5Ga9jB8ebV6lIdrYBLNTNdk4mP2nwZ/tvb4A3afUk6tENJxkoFkKQTv FXAmg26TeCi39twr//p2GoRxx/73lYqK7zqTR3TkRIoN0kg5wAapIV5gdshfFUrzgTm8 O8YHYImJgijtaQiXgtrVJ5JC6n0AUCoo6wS55ow4KSdww/iy7/t1Y3MrI55VJWQuM2pm 4Ugg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788280417; x=1788885217; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=8SPDGoSTl4FqMo3J2GRF/g+R9eIi+flZl02DefvrWrw=; b=hEo8a7tiW3z3UNKcTppS2rFYUqRre3ZF28o0Cs3cH08YUJPKGMqe9hDJMpgNCi5J41 Tap+wPmS3YSw/k5B21RaUrc1TLWQoM+KwNssNQNhLbyDZ5YN1DD5lgyyF1sUJa840gXx 47UYy5HMMo6btZgOsMzCs02ddiIWRiFJ4A/P72KBLrq8b1SnSp8FuY5l46sLq+j40hbl k0B58nYujxQY89KQrY+H5MqtPaSvQybc1x2lCDhNTDO3xXTvaz1YGQeLFlLyxkse2K+3 BBdZ2SaKcsddrENLt8/Z9rjnGfNGueLo93ibvRfA9odrGug5P4pIk/PHoOcKFdRVslY3 RdOg== X-Forwarded-Encrypted: i=1; AKwUvByzv4NZk+aGWvOBsvK/getBqbNyOGmTEipTnjGhp7e5tpUAqcLu59zDFQK0oaBjSh4FjCAaxxA9JwNZeQ0=@vger.kernel.org X-Gm-Message-State: AFuF++ljQV0dKbA10VU1dWkHZknWTM6jkHFTelGrGABXSLOyr0DzmT24 NkqXp+4GGYCmv+wDrO3vlP+8xZTrjZXXQKIbhoryUP+MOxUsQYIqtto= X-Gm-Gg: AYBFou3kGbC1RuEv/M1FpNtnnnp691+Hspm5I/UbSVNlGpYIdoYh4M0W8Vtes/gyoTI X08l9ycx4b0GySaEdhLE+kRyPfdoqFP8Lz7Pq0y9oLgE+N9L4ZT8ftSPz2QirpI8+PdlMx2qKz6 bvBzl500sJUPK/syhqgHbbSymKnTtWG4CA4NJho0oHAH7trdjT+J1nTKBYNXK5AnRs49ky16Ebi vCVdFvme73gBDXZZO1gxT2vZQbr2qEK+uej5wyqH2SzpPhrCc2pLXSTkQpzYmPQvbQUCzt/2PQT VOVHM9LoSwTLN4ZdVNpB0iejFGP79YEAnLkW1TxUT1Deotha6JvqI/QN0h25fzeC0r430qB5aIq i4lbYehOZen1tzy9SSEqKy4gC2ht76PJoJ6FxgCmSpY8qXCsilFsPyjZj7II/s0VQMyDHaCfO/G Tc454Oprs6NsESThoy/LXEJzqhktXclZclxTsAMYyXX0GaYnLqkpfU X-Received: by 2002:a05:651c:2224:b0:3a3:368:fb9f with SMTP id 38308e7fff4ca-3a30368fbfemr67836761fa.13.1788280417031; Tue, 01 Sep 2026 09:33:37 -0700 (PDT) Received: from fedora ([92.36.3.203]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3a34a8ed967sm678251fa.7.2026.09.01.09.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2026 09:33:36 -0700 (PDT) From: Vitaliy Sochnev To: Lorenzo Bianconi , netdev@vger.kernel.org Cc: upstream@airoha.com, Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vitaliy Sochnev Subject: [PATCH net v3 2/2] net: airoha: grow the small RX rings Date: Tue, 1 Sep 2026 19:32:54 +0100 Message-ID: <978fe95e4c5ddb05ceb7d8c4d00ea2d2203b79d0.1788286284.git.sochnev.v.74@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: <20260831234701.206021-1-sochnev.v.74@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Raise the RX_DSCP_NUM() fallback from 16 to 32, the vendor SDK default, and give ring 4 the 128 descriptors already used for rings 2/11/15. Ring 4 is the shared "force to CPU" ring that airoha_fe_vip_setup() routes BOOTP, PPPoE Discovery, PPP LCP/IPCP/CHAP/PAP/IPv6CP, ISAKMP, DHCPv6, SIP and LLDP onto, so it sees the same bursty non-hashed traffic as the rings already on 128 while sitting on the smallest allowance. Both CDMs forward to it: REG_CDM_FWD_CFG(1) and (2) each set CDM_VIP_QSEL_MASK to 4. The NO_CPU_DSCP fix does not cover this. With it in place, at 16 descriptors the ring still dies during PPPoE negotiation on a Nokia XG-040G-MF: over 6455 devmem samples in 60 s, REG_RX_DMA_IDX advanced 0x2c -> 0x52 while REG_RX_CPU_IDX stayed at 15, descriptor 15 had DONE set on a 60-byte frame, descriptors 0-14 were empty, and q->tail was 0. Hw had completed a descriptor the strictly sequential consumer in airoha_qdma_rx_process() cannot reach, and negotiation never completes. At 16 DHCP still works while PPPoE does not: a dial-up bursts Discovery, LCP, IPCP and CHAP where DHCP sends one packet every ~150 s. With this series, 508 forced reconnects over 20 h saw no recurrence. RX_DONE_INT_MASK covers all 32 rings on both QDMA instances, so this costs 544 more descriptors per instance, 1088 in total: 2.1 MiB of RX buffers at PAGE_SIZE/2 each, plus 34 KiB of coherent descriptor memory. Ring 4 and the VIP classification feeding it are shared driver-wide, with no DT or hardware property distinguishing one variant's ring 4 from another's, so this is not scoped to a particular SoC. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Acked-by: Lorenzo Bianconi Signed-off-by: Vitaliy Sochnev --- drivers/net/ethernet/airoha/airoha_eth.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h index fa9a8edce22f..7fc37f159d2b 100644 --- a/drivers/net/ethernet/airoha/airoha_eth.h +++ b/drivers/net/ethernet/airoha/airoha_eth.h @@ -41,9 +41,10 @@ #define TX_DSCP_NUM 1024 #define RX_DSCP_NUM(_n) \ ((_n) == 2 ? 128 : \ + (_n) == 4 ? 128 : \ (_n) == 11 ? 128 : \ (_n) == 15 ? 128 : \ - (_n) == 0 ? 1024 : 16) + (_n) == 0 ? 1024 : 32) #define PSE_RSV_PAGES 128 #define PSE_QUEUE_RSV_PAGES 64 -- 2.55.0