Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp739030rwb; Wed, 26 Jul 2023 01:55:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHCBBnJZpaMw8dPlUA4FUdka+Yb82eWvZzZRO4ps1J/WSyH5h00hJyaw6Q5ZoH8dxRMCy0R X-Received: by 2002:a05:6358:7252:b0:131:94f:b4ff with SMTP id i18-20020a056358725200b00131094fb4ffmr1183248rwa.5.1690361757314; Wed, 26 Jul 2023 01:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690361757; cv=none; d=google.com; s=arc-20160816; b=bhGo+PwuPd5F16n/JDSg70bljCzoIREmLJVnOubGZBZm7JOKJHCXrO12DoXr/63U9X Hd1fJd1RM7S8PFrtQpdQH7jHtH608YxZxx18eL6tGBRreF548Kg078PXP/fNzcyQvVyN dSPYLPV13vKfQU/mrA5otTlV3bGRFtVxcO4OzUvzM0ML9VmubumMJWz+IP9fM3FKudGI VHVuJehluRFBaR0P2J3sSNr/yxKFd5T4u1bVaEIDcqHsAxk5m8cIfM4bHk+DJiHnsW1c qnD+gFig2kvuUufYczlK2gMRFAcP8e9Rrae334iyQjobd2HS/E2P5LbRlAnBEPE7kj1F POlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RAU0cPXH92fccMay1mm1XuQEOIvzdh7WIU3f587dsCI=; fh=HDIGOz5pJzGLaQ85fJLaMpHwV29mnmUwzXrLcWa4w8U=; b=HRtLiTAvSfWAEdwwXLy3pI7lEDpL5wzTeC4L4EuRh/rksm3U7vKxtOhY/4HE3Zxh2C gDrhKqnn6/8mOguJkhzuJb8sitiuDfIoYxIUcauOIMQWUnSiDLjDLtIiTsNrzip+FY4X CNXK/dx8jT1U0rM2Z1Tji3MmpZXc6zjlcnmALa3njDctdFvhSbox2NcfQAyvw6bOtQ46 QsgUOmqrkT6L+1AS6gtBtIDLeQYSWqor9CNzbBhcxmkOC4SKm9TiOI6Wzu4nsMsj+fGn eQVC4lRcjMRAoDbvjOw8sQpJ3W+qaoc6hQsig7S4qH8cegFOF81Y7sAkTAC/Lj2aIKtX RK5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=19FUvKyF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u186-20020a6379c3000000b00553854417e2si12185506pgc.244.2023.07.26.01.55.44; Wed, 26 Jul 2023 01:55:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=19FUvKyF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233097AbjGZIpx (ORCPT + 99 others); Wed, 26 Jul 2023 04:45:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233113AbjGZIp1 (ORCPT ); Wed, 26 Jul 2023 04:45:27 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A160E0; Wed, 26 Jul 2023 01:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=RAU0cPXH92fccMay1mm1XuQEOIvzdh7WIU3f587dsCI=; b=19FUvKyFVXqzZLN143udiZB+9n jOVsdfJXaR0AVtp6/XVgx6Q6mG7vMGdXjzfQnH+g6R+tOd1F+Au2XBnapGLSzVn6L/xPqgpyF4GxC BsbUzcuGv1OdH1fcE5Idi/uz9J87rLntH3Hc/o/aLakld8zzDYVFA0oM4a8N4Iq1SVBM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qOa0k-002L4n-O6; Wed, 26 Jul 2023 10:36:46 +0200 Date: Wed, 26 Jul 2023 10:36:46 +0200 From: Andrew Lunn To: Hayes Wang Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org, nic_swsd@realtek.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH net-next v2 1/2] r8152: adjust generic_ocp_write function Message-ID: References: <20230726030808.9093-417-nic_swsd@realtek.com> <20230726030808.9093-418-nic_swsd@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230726030808.9093-418-nic_swsd@realtek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 26, 2023 at 11:08:07AM +0800, Hayes Wang wrote: > Reduce the control transfer if all bytes of first or the last DWORD are > written. > > The original method is to split the control transfer into three parts > (the first DWORD, middle continuous data, and the last DWORD). However, > they could be combined if whole bytes of the first DWORD or last DWORD > are written. That is, the first DWORD or the last DWORD could be combined > with the middle continuous data, if the byte_en is 0xff. How often is byte_en 0xff? Do you have some benchmark numbers to show it is worth the complexity? Andrew