From nobody Thu Nov 28 14:00:58 2024 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 8CA741CDA17; Tue, 1 Oct 2024 20:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727816331; cv=none; b=tpK7SsEW6is+rYBdj6Ehp9SF/HOTljzUAME498dhnKP+PyxJFbG+d4KhHRtU88IV3XOjuf/h21nj61n6zbn+qbtqB2hM/RZ41h3xqHBNnsckduZqx2Axj/ru+eLnENajdqClgbFBpOUSh3W7LtVFY+Dac/GVxGgae27xZEifimk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727816331; c=relaxed/simple; bh=VLHNOJVF2xYI9xFz0sdYpst/JrodikRXh5fZnHMPKUw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qvz+6kCWdv7hVhzlzx9Oo56KbQDB0B2DDeYUN+MjZILfuLuw6BptLqFWoQUWwNqNVQbzIX6rN6Vk4OOqo+JWl07ONiAhSmOAbnOXL1+OeB+p9H7dnv9ZyUKkjr0imixxLWxMRblHLRU+wauNp/m60r9Uu371h8th1qoCNe85h+U= 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=Htf40M8o; arc=none smtp.client-ip=209.85.215.173 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="Htf40M8o" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7e6afa8baeaso5116593a12.3; Tue, 01 Oct 2024 13:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727816328; x=1728421128; 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; bh=nTFOaXTef0G9oTg4z249QNFPMYARm/rD0bt+cP8X3Pw=; b=Htf40M8oGFAo+qIegeI+okWYMtnoukUH64XqE58bODv4s0iGBJ+p1qk4P8iws5aGF7 gMOTDL17dQ3Nc1IDavXR09sq7tGViKfzmTGCDbaDNfviWiJwlNvk9wBXAIx7saxXghR2 amhzW6o7+CafeDiJXK2CHoexoQXYqqAHYnwkuj7gnSyxQblgmmk0KUxru9J3yK9XGKF1 YAAK/nIXLrjnN1PqYMKh7FMc3WL52niXhd4sCjvxg9NKugUkWhDJeV4B8j1VQXwKHbxe ZXj3fjqJLItErCJJ7YAaTsbm/QPSr1AN5fPrWcYleJrJcLVCtcO/d5Xz7ZkXBXut7hl1 W8BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727816328; x=1728421128; 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=nTFOaXTef0G9oTg4z249QNFPMYARm/rD0bt+cP8X3Pw=; b=Sr1ZV+K6jIe4/vPa1DKU+mzghKVuyUgne17hPDDkW1bflDaEnJFks4xocU6kVvTcDx 20TCKGtEmy0WzX5F+SwzXVh4hboI8auhtBiVWa0beTD3pAF5+3hMPUHlZd4W2wSBklHt sB2CC9DLMvzUrEopczCuzwGRe4nNRNmp74EjS15rWXOIW+UQ839tMYv5L96DOZPUCiYN EG/ioOe7rez0jjb9XSTvrAgkeuuUqNwV5CDAlNKkDxP5zbjN6FSsPa0lETLJdhgY32OW pGPJ6wzZ+pCnFyhuxFXUTZesTKcPd1dJj8a/7B9tctDkonL6DSC5vg+0W16WRRm5cKH3 /1FA== X-Forwarded-Encrypted: i=1; AJvYcCUFuhciMUSj+tH7V2b87B8U36a+DmqDkrpNSOFaezp2g4rRhiYkIPiNPHmnc4wQmrITpoFMwuCWhHy2eiA=@vger.kernel.org X-Gm-Message-State: AOJu0YxEaaBGX3Wn9g/EuAk8OkYAiN3CeTzdyg6LgPb+VpYLeCEGYlnC IpA3NUBe6xIYeYsxLFZuTV9y67K3TOclnqqtI70DCxrxvKikC+RoeaBvjNvD X-Google-Smtp-Source: AGHT+IHfGLsPXHiXEbaLpfGnepkMDG1K7qrayUW9CTQPxL4iXoGX/OBLXciDiH3g+6tERdVhWPHRMw== X-Received: by 2002:a05:6a21:1693:b0:1d3:e4e:ff55 with SMTP id adf61e73a8af0-1d5db101999mr1440585637.7.1727816328375; Tue, 01 Oct 2024 13:58:48 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b26518a2asm8545765b3a.107.2024.10.01.13.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 13:58:48 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: andrew@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, jacob.e.keller@intel.com, horms@kernel.org, sd@queasysnail.net, chunkeey@gmail.com Subject: [PATCHv2 net-next 01/18] net: ibm: emac: use netif_receive_skb_list Date: Tue, 1 Oct 2024 13:58:27 -0700 Message-ID: <20241001205844.306821-2-rosenp@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241001205844.306821-1-rosenp@gmail.com> References: <20241001205844.306821-1-rosenp@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: quoted-printable Content-Type: text/plain; charset="utf-8" Small rx improvement. Would use napi_gro_receive instead but that's a lot more involved than netif_receive_skb_list because of how the function is implemented. Before: > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 51556 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 559 MBytes 467 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 48228 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.03 sec 558 MBytes 467 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 47600 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 557 MBytes 466 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 37252 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.05 sec 559 MBytes 467 Mbits/sec After: > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 40786 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.05 sec 572 MBytes 478 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 52482 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 571 MBytes 477 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 48370 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 572 MBytes 478 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 46086 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.05 sec 571 MBytes 476 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 46062 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 572 MBytes 478 Mbits/sec Signed-off-by: Rosen Penev --- drivers/net/ethernet/ibm/emac/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ib= m/emac/core.c index dac570f3c110..d476844bae3e 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -1727,6 +1727,7 @@ static inline int emac_rx_sg_append(struct emac_insta= nce *dev, int slot) /* NAPI poll context */ static int emac_poll_rx(void *param, int budget) { + LIST_HEAD(rx_list); struct emac_instance *dev =3D param; int slot =3D dev->rx_slot, received =3D 0; =20 @@ -1783,8 +1784,7 @@ static int emac_poll_rx(void *param, int budget) skb->protocol =3D eth_type_trans(skb, dev->ndev); emac_rx_csum(dev, skb, ctrl); =20 - if (unlikely(netif_receive_skb(skb) =3D=3D NET_RX_DROP)) - ++dev->estats.rx_dropped_stack; + list_add_tail(&skb->list, &rx_list); next: ++dev->stats.rx_packets; skip: @@ -1828,6 +1828,8 @@ static int emac_poll_rx(void *param, int budget) goto next; } =20 + netif_receive_skb_list(&rx_list); + if (received) { DBG2(dev, "rx %d BDs" NL, received); dev->rx_slot =3D slot; --=20 2.46.2