From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3F55D0E6D5 for ; Mon, 21 Oct 2024 09:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZOPzM8nTUFqwLn8ohf0g1jVEfJikuSPUMDsCZxkKDsM=; b=KU5cabJkG2IbbAfw4LJ2xoen5t 5TNRmxXBDLWDT15ve3P/3iShhPkgy1syiyuxG3f7qSTgXOr7b7JoIUpkXFFhsoIk93B+omXzR0Mow lkze33e8yx/ko7N6+8gRuKn/QOsH+6sfGvyBisd6JIiV6GfGHNM18SEAlghp6JyvwZnUQI/wp+50A 4zq8rdtrQRUEHm+KbF47JqmNzQQSIdbxM6sGfpIMRVOJDaVkyDYCDRcuD/yprAqvTYn5+oXHAwXBO OnCN+huVeoaLfK6PlSem4bMOxo5c48Q/vmGXeQ0jlkz96RIF0rSIMUGFHcfIdi9+AHxlHus0iVmP4 ocDUw98g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2ohd-00000006hNT-0yAl; Mon, 21 Oct 2024 09:27:53 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2odd-00000006gco-1kcT for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 09:23:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729502621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZOPzM8nTUFqwLn8ohf0g1jVEfJikuSPUMDsCZxkKDsM=; b=SNhjluE9FVyBzX2V8kO/9R0rhp4H+mZCg2Y6mDktaQYBdc8BymrhnoKkMR7UuCSwi4UiH4 k2th9grbdLxKW+2Bov6boZBBc7LwAC9zBUKEm1EbnLeJR+5wR8KnIKDA+0HFzsDBKY0mg5 ATSgepVKc8QbC9IBOCtU++uXD/Bix3s= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-423-n8qa2Hq2N_yJX97tdsewjQ-1; Mon, 21 Oct 2024 05:23:40 -0400 X-MC-Unique: n8qa2Hq2N_yJX97tdsewjQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d462b64e3so1713543f8f.3 for ; Mon, 21 Oct 2024 02:23:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729502619; x=1730107419; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZOPzM8nTUFqwLn8ohf0g1jVEfJikuSPUMDsCZxkKDsM=; b=UJJY660s6jNA6gcZMhevxevc89Js7cEinO2dzQZ6+2dIJp2lt0ASWZEhFtT94XltnV iN0aoWapVJG2S/S4lSRwitKy74j9BfhrDH/0O1TbIfg40xXx7ZcreBE7tO9KxvTV5om5 GeMhhBlsN3wyV4QABV2ukWpa/Z6AgNZdzmu8E3R/VMZM9sg6pgagjDUAckgYz/yz7jYV dwHuyprrYUjEMUF4rVKquy2ai4SVs/L2T4iedYu67xSZRnCIdahAQ+CD41pvcK8o1Zqw QfjBSg4uuWhcZVDH4y6LmFEeF0T7Ik5QaXazwyI35zn7ZDf8zIg5LpGcmtt80k5o1/A5 lufg== X-Forwarded-Encrypted: i=1; AJvYcCU7ye0CD/QUpKHY+5hoSSQjfm9IzEGwTzBquezeMXoGNHthmPSOlYanOHxjVVBzFRoDHp3oTsU5Hdeeudop5nBw@lists.infradead.org X-Gm-Message-State: AOJu0YwP6Ac9jkzjeEm26iSy8L2u1vFZzghZQLsGketsfi9y22nJypBV 1qKIpNPPwJbAKRwj6D3k3Gpn5FtGKhaMLnBXZG+uizjCdfhQg88u/nmWTwjKZlWlAgIDCzxWbgq IbVJ0NTFZhXdTElpm7UMbVHFJqdlouvMG8iiNzm4Rasjzx4BqVnXB1pR9DqA3RxwWZ2gWz91n X-Received: by 2002:adf:f591:0:b0:37d:39df:8658 with SMTP id ffacd0b85a97d-37eab72a94dmr6219406f8f.58.1729502619027; Mon, 21 Oct 2024 02:23:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHysyLKLLu8ecA+EiDeIyFSZdEdGbiDbJIKLmvhlv8Jpyw7lbNkChKbBAKP5wBfWcUaSVANmA== X-Received: by 2002:adf:f591:0:b0:37d:39df:8658 with SMTP id ffacd0b85a97d-37eab72a94dmr6219383f8f.58.1729502618678; Mon, 21 Oct 2024 02:23:38 -0700 (PDT) Received: from ?IPV6:2a0d:3344:1b73:a910::f71? ([2a0d:3344:1b73:a910::f71]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4316f5cbe7dsm51045765e9.39.2024.10.21.02.23.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Oct 2024 02:23:38 -0700 (PDT) Message-ID: <6b95c3c9-3b8b-4db3-b755-a3652c1a59cc@redhat.com> Date: Mon, 21 Oct 2024 11:23:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 4/4] net: ethernet: mtk_eth_soc: optimize dma ring address/index calculation To: Felix Fietkau , Andrew Lunn Cc: netdev@vger.kernel.org, Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20241015110940.63702-1-nbd@nbd.name> <20241015110940.63702-4-nbd@nbd.name> <695421bb-6f31-4bae-8c8c-6d4fccf1b497@nbd.name> From: Paolo Abeni In-Reply-To: <695421bb-6f31-4bae-8c8c-6d4fccf1b497@nbd.name> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_022345_578775_26015928 X-CRM114-Status: GOOD ( 18.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/15/24 15:07, Felix Fietkau wrote: > On 15.10.24 14:54, Andrew Lunn wrote: >> On Tue, Oct 15, 2024 at 01:09:38PM +0200, Felix Fietkau wrote: >>> Since DMA descriptor sizes are all power of 2, we can avoid costly integer >>> division in favor or simple shifts. >> >> Could a BUILD_BUG_ON() be added to validate this? > > Not sure if that would be useful. I can't put the BUILD_BUG_ON in the > initializer macro, so I could only add it for the individual dma > descriptor structs. > Since the size of those structs will not be changed (otherwise it would > immediately visibly break with existing hw), the remaining possibility > would be adding new structs that violate this expectation. However, > those would then not be covered by the BUILD_BUG_ON. > >> Do you have some benchmark data for this series? It would be good to >> add to a patch 0/4. > > No, I just ran basic tests that everything still works well and looked > at the assembly diff to ensure that the generated code seems sane. Since this series is about performances, some related quick figures would be really a plus. At least we need a cover-letter to try to keep the git log history clean. Otherwise cooking the net-next PR at the end of the cycle will be a 10w worth task;) Please re-send with a cover letter. Thanks, Paolo