Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp962348lql; Tue, 12 Mar 2024 03:29:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4V+uD6ftsw8QqWjhM8rhNjEYOQaUersl9dtXA/liKxyXbW9v95ToywE3BmCFmLD8Mnx0gu7QwHqSfjIulSvOfrW5qzanJv9N61pOKtA== X-Google-Smtp-Source: AGHT+IFP58nrfMMW9GzXaSjSSN01ZOFv4EQeKaLs1nb6De+qrA2n/cFcgZmB0WwmqCZr/CPkMoF0 X-Received: by 2002:a17:906:eb0b:b0:a46:454c:41f6 with SMTP id mb11-20020a170906eb0b00b00a46454c41f6mr722368ejb.49.1710239358832; Tue, 12 Mar 2024 03:29:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710239358; cv=pass; d=google.com; s=arc-20160816; b=q1TMU3Qw/DIrvUYrJQFTDS4Lz4QXHMiZ0GPdp/Vbrd7rE0b6loGIrd5qBE6Vi/3yLb wlDWTm3kc22CsDpDpWbG/lKwoQJ05y/Q3QgLyqVMmi49YsU2t+PQnm4msXf/h117pAXR ARk7OweK0ptjEWgNVN5Yp2ZpFz89ZgB8Nv4zHdd42WRiTzv9Vw4HtObQ6Wc1svikFDWF RTSrN97kjMl0nNRL6XIOP9EkeujEu7ipGtHOerYV9bny1GTLUL1MFZl0cmO1t+g/vS8W NeLZIKTjctVf0sttNCe6Gt2R7qq6FdWjWfKukVWWIOYOHQFMkkZvrFqSj5TthFjM5teE Y9gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=5d4B/pAoZQB5tS1BWWn28qe/xI29Jo7qr/wZ2JnyTFg=; fh=irnZ2lExK3YN5msRRRwzm3kr9SYVn1nrIYCmY6pWn0Q=; b=MaiaQxZNlW70kpyEQMr7WVJyOylCt9oFF/uWwlYXlmV7Y0SUEIl0dpjraU5iEN9J02 24SssxcSJ8whUmvTTtNODC4tf+Rd853FqytRCl4mSAaYRXKQfqLpqVLMR4e1LARFa8Vv BwUJF4bfZi6JoEOkzvFRNH8PplZQ+AFBa0lHiololewm1JqnAhMFiZzU18P4kHS/Kyw8 9/EoNmaJKx6s6tszVEZW/nMYGOkkP8J8s4GuJxdS0hJtoeRgzF98sg3VeoP364dQ+sQy g4KQDOfMnSBpXzX8s6uS4ZDz/4E6cgygcqPO7quy3nNoD98ZSb6bQkGSWj5X4ZUaxJLC s62Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=C8t6XGs3; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-100121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100121-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jg6-20020a170907970600b00a44fdb33e39si3242482ejc.621.2024.03.12.03.29.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 03:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=C8t6XGs3; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-100121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100121-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 87FE41F2363B for ; Tue, 12 Mar 2024 10:29:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44B2079949; Tue, 12 Mar 2024 10:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="C8t6XGs3" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 4DBF433994 for ; Tue, 12 Mar 2024 10:29:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710239345; cv=none; b=ap6F0GbRu1AjoqzZ+34VuAJX4iZFe7Ja08PRIHG2YUXJ0h+OAxrmJus19SM0iOk9f1+r6MvQCNdlGYyI7cPAAf5vNxmOiczWwO2aY9pkWUm+z4j+AvJJYHfYZYH4QCwGrCNpJvWgH8EZwQ0w8JsoUP0plYMYzDZQm1/laDL3F30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710239345; c=relaxed/simple; bh=JLDcBgW+3vtGMYoTcRPuT4brcDBaHRWE2L0AAL86eQA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iqq1wkXiAdEk/lbL7KU2L2iNflOk6Tc1elEPzrWXXxKNwWouM7iMVkNJ15qaPAxTmznP9WDotnjKfQGCacjRVHIbi7wI6kACIPQPGJtx1IK+TcCIPLtvefntaM+sJ5L/HQSpNix4rR4vS40nK2DLa9tWS30factkgJUVxIrG/U4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=C8t6XGs3; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-41333bb74f2so2815825e9.1 for ; Tue, 12 Mar 2024 03:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1710239342; x=1710844142; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5d4B/pAoZQB5tS1BWWn28qe/xI29Jo7qr/wZ2JnyTFg=; b=C8t6XGs3CoziosSQAiUwj0PiG6auvS5pl2sHBvguqIx7BvfhSiXEkr5iGwblD1+IHd sueCvPQFHklTGp7t+V6MbMQrv/XMaBhmXa0+lpZrr8Yri/yyrhgWN+B2lIuc5PxYoKnI QktorKAQXEAclLo4ITnG0tIvbwzsQeisSF02kPnKGbLphmWTtbhDQZh/EeWbfRzs7Wlv eJaS3pyXWeOIb++WEp9JS0MECQfIYSQggHZ50kgG9KtA5PTMQ9Xuiybam2jZ6QLyvH4n 9us7luNsZ58t0s057CHyIM+dOHbR7kov5mjNT9j7zSasF8SvtUAEsa/FVw0mgOiKezKC Ut8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710239342; x=1710844142; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5d4B/pAoZQB5tS1BWWn28qe/xI29Jo7qr/wZ2JnyTFg=; b=v4JHHVCCSeWBybjNCRseF/Dh9od5teEAZ0p/gUTd9EYckLzWnKJgUqg00TSHbaAaD/ h2YwYd1nPDrSjkANhXh2xxag3w5BGkqOLknaVZIHULOxvJ/7Rg9On9RxdvulJVzznJbf JTCHzchrCLGSPITvszhP4WK2OuHY1MU+yL2pHfRZhayUpk9Vl0odCgP5vnrQ2bqyRpHO yrgdcNH/WGxcTZqm/PkPny34PgA2rJ4iBqh/B0819TcCbzJwclZmOpDRZMaxlxcC/8jk vTC9Mg8KGuoT+q2W/EpoBTqG3AHfTMp/ewIXnhotd+5U5qoigSroQfI2hUdf4QTKqb9D RZgA== X-Forwarded-Encrypted: i=1; AJvYcCUE2HTnyCQBLdeDauGOXDihvaRlFbO8M34ttOd3mGeQkeDivQnVNvulC3z+to5R9SEWxyifD/hgMlHoNl5retjPm5CvZfaPZwnlq9zE X-Gm-Message-State: AOJu0YyuVslY60GXJFdOm38bSsTYiFE6ZMqVRf2t8QLUjj0sYTlIqy+i UVAIiSEPJUlxLvpH4JsskF9qEIvqbCPD7UT8DVRu33qzb26v/iK8KEWvlOTyvgQ= X-Received: by 2002:a05:600c:5101:b0:413:2966:4bfb with SMTP id o1-20020a05600c510100b0041329664bfbmr4277240wms.1.1710239341697; Tue, 12 Mar 2024 03:29:01 -0700 (PDT) Received: from [10.3.5.130] (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id z11-20020a05600c0a0b00b00412f428aedasm18656971wmp.46.2024.03.12.03.29.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Mar 2024 03:29:01 -0700 (PDT) Message-ID: <88856abb-f5f8-4dbf-9b26-30915bfaee7a@baylibre.com> Date: Tue, 12 Mar 2024 11:28:59 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] net: ethernet: ti: am65-cpsw: Add minimal XDP support Content-Language: en-US To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org References: <20240223-am65-cpsw-xdp-basic-v2-0-01c6caacabb6@baylibre.com> <20240223-am65-cpsw-xdp-basic-v2-2-01c6caacabb6@baylibre.com> <356f4dd4-eb0e-49fa-a9eb-4dffbe5c7e7c@lunn.ch> <3a5f3950-e47f-409a-b881-0c8545778b91@baylibre.com> From: Julien Panis In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/5/24 17:43, Andrew Lunn wrote: >> 3) From 2), am65_cpsw_alloc_skb() function removed and replaced by >> netdev_alloc_skb_ip_align(), as used by the driver before -> res = 506 >> Conclusion: Here is where the loss comes from. >> IOW, My am65_cpsw_alloc_skb() function is not good. >> >> Initially, I mainly created this 'custom' am65_cpsw_alloc_skb() function >> because I thought that none of XDP memory models could be used along >> with netdev_alloc_skb_ip_align() function. Was I wrong ? >> By creating this custom am65_cpsw_alloc_skb(), I also wanted to handle >> the way headroom is reserved differently. > What is special about your device? Why would > netdev_alloc_skb_ip_align() not work? > > Andrew Nothing special about my device, I just misunderstood. Regarding page pool, I now have better performance. Two things were missing: - I did not call skb_mark_for_recycle(), so pages were freed instead of being recycled ! - In page_pool_params, that's better when I specify the "napi" parameter. Performance improvement is not that impressive, but it's better: 505 Mbits/sec (with page pool) instead of 495 Mbits/sec (without). There is a ~ 5 Mbits/sec loss due to additional processing in the path, for XDP stuffs. So, the difference in favor of page pool using is ~ 15 Mbits/sec. I'll send a v4 soon. Julien