Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp22708pxy; Tue, 20 Apr 2021 11:36:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmRmYaTYnlQMUJ7hJtyVrpvRpayg0fLoQObBH8U0vvRyMkUU5VnBMlkWV+tYDtFsW30BbK X-Received: by 2002:a63:a0c:: with SMTP id 12mr18001993pgk.247.1618943763179; Tue, 20 Apr 2021 11:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618943763; cv=none; d=google.com; s=arc-20160816; b=KL7lcbwsP68aiglzHvuen0sUEKuUQ9Omi48mjB8GUZ/14eRepjMEAoIpli6pCD/KGm WeF0TDPLr+VbswmDLEO50e6qfFbD5cWQZX9sVIfS4M7VRBMUmQF7DCI3u7kauqRilPqL m+2tvM29SDCgLvHd6fQiachgVtW3xa6l9g/yse05Ov7358I3Lm6/85bJ0rTIdDaNK9f/ ESkOj8iCsBGLd6wyMZine8y0JqWOTU3HdEXKf5xnEUpvD4OBhSeZ2BUEURgAPzCRUnsN 6OGutD4081ByqPGZX8N0s4wybubu/a0qwi1Kp9jd3nj2+kLoCtMk+RnlwAQLSj/oT76E hFjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=F1vbMMtz+MxwOnuztKdpsUrwTShS22cDZ+W+8BYdyhM=; b=AZTjuAI7we7iBJeWvtHHg2HZpYlhQcqk6KrFKBFyvnZh1UdJaopjDNbfeMX16RNibW w6zfLwSeIZMjEohclfqmUipTZzw7mSYY1M09kp+BxLlKl16IYs9xsO/J4qpbMNU+9fHH sSTA7iUoxbDr8oZEDa3LeXRks47gJ9cbFG7FzMsinsK4IAy7S+kXsX81F8ORDj5i3Yt0 35W/JfHDDxYbc5dN8sWBRzR8TMYiX7FEdr9fALw0KvtWhrAWt7k5aRJ2oShDIDBkQD55 6O1na0mp9vG+YHPCplhYdyfnGg1Cw3yH9DJjlTsg60HHUEOfg2ChiL06TsNCUwksb2Nc tvGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a+7/zfIU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si4501604pll.371.2021.04.20.11.35.49; Tue, 20 Apr 2021 11:36:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a+7/zfIU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233769AbhDTSfa (ORCPT + 99 others); Tue, 20 Apr 2021 14:35:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:59126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233587AbhDTSey (ORCPT ); Tue, 20 Apr 2021 14:34:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3055361002; Tue, 20 Apr 2021 18:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618943662; bh=em6cx2HBxMwbhr6KaCllMTUwubhy8v8uRwj/RBaSigs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a+7/zfIUj3cUkwkz8a8LdV1bB3rMoS404I/qpQ6nWScZNcmnHWVJYDsgiyHbs/yAc 4T/oS7l7fNHWbir/e8V3oFJ0zBgVCkrsqKHBmgqjoa0B9DW1Kvv6u/UrfEWgUcfk2w qSwmoatNxQkeOC+CDgHJgHYxmIBRpcjh3j8ZA60gMvQIvbO6B2DZgipb1n+33+00JG VwcWkpdoNK6olKESeBIvP208KaIEyBOaBP7PrwHkRyJV60aforGAmeV3/rWfgRKgXG nwb0wp0IPHW0fT1F9y4l2HLlbUqIAoGlzlokPDGTm2lLMy9RAJjTIzPMexHYdd7bqt +5Gr54GLIMtsA== Date: Tue, 20 Apr 2021 11:34:20 -0700 From: Jakub Kicinski To: Hayes Wang Cc: "davem@davemloft.net" , "netdev@vger.kernel.org" , nic_swsd , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: Re: [PATCH net-next 4/6] r8152: support new chips Message-ID: <20210420113420.79d7c65a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <0de9842749db4718b8f45a0f2fff7967@realtek.com> References: <1394712342-15778-350-Taiwan-albertk@realtek.com> <1394712342-15778-354-Taiwan-albertk@realtek.com> <20210416145017.1946f013@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <0de9842749db4718b8f45a0f2fff7967@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Apr 2021 07:00:39 +0000 Hayes Wang wrote: > > > @@ -6878,7 +8942,11 @@ static int rtl8152_probe(struct usb_interface *intf, > > > set_ethernet_addr(tp); > > > > > > usb_set_intfdata(intf, tp); > > > - netif_napi_add(netdev, &tp->napi, r8152_poll, RTL8152_NAPI_WEIGHT); > > > + > > > + if (tp->support_2500full) > > > + netif_napi_add(netdev, &tp->napi, r8152_poll, 256); > > > > why 256? We have 100G+ drivers all using 64 what's special here? > > > > > + else > > > + netif_napi_add(netdev, &tp->napi, r8152_poll, 64); > > We test 2.5G Ethernet on some embedded platform. > And we find 64 is not large enough, and the performance > couldn't reach 2.5 G bits/s. Did you manage to identify what the cause is? NAPI will keep calling your driver if the budget was exhausted, the only difference between 64 and 256 should be the setup cost of the driver's internal loop. And perhaps more frequent GRO flush - what's the CONFIG_HZ set to?