Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1992310ybl; Thu, 29 Aug 2019 01:54:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXeZD3kgsBDdOniiwkp9MRU8QMMH2KjgDgj1lPQWD5otIZM4jiSoTvaDwyHQUFVgDEG0ul X-Received: by 2002:a63:947:: with SMTP id 68mr7457348pgj.212.1567068876339; Thu, 29 Aug 2019 01:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567068876; cv=none; d=google.com; s=arc-20160816; b=wMDztx/vQk2NfT7pmdAFVjQu959V+krECpU1wDGw5Iddtgdu8rVc5MB08A+MmQ3rYb 8VondISD11CgkszCgK6XEhCJgprWneWfLJ6mseUlWU2hbHXGVnQdoIJDzvuV5ekd6PRp 7E5RhhZ6u4Nm7AcuEzmN8K4wOL++NFnaIFOz1PDoeUDB8W9+88lC0iKm/hcO9RT+erAs 0sESBfzh34fdrnsk7Lto+GHusStyfbdr6ev6/XRDobhkQWA8KX+gzsMMGtLGE9XtvtPl e/HzViiQlzeO8TU3KLzMFVgamQ6zALNihboT0NZlyKyOF7GAEglIoOaa3N+ddfCE8saR 1HUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=L4/LS86hqvjD5Di+hbbxWNXA0XFN7vYTwg1zVS3dMI0=; b=CzI5VKPEzKEksH0Myvw6N9f0O4Is8F9WL5T7cR90Gf2O0z4DW6DuMqEMLOyNPGHC+T ZZMlM4RDclhmlJx+ULW4Dk5nD6uTnvoR7+yMrnpEKkjmjheM4GxcpSEPU1DPRf/KKKYi hfOQUgqnaE2+Trq3pP/HZ7w4bPlcMNmQYvJTNjB4jXalHXDiYoaAeGyHJZ7hbtDm7knE 8IkiB2yYOnUXFC7P9OKJwM4gOiUQ2aCZDH/KKOSwc8g5rIdD6gg820GEbewRPJHHpqTQ L9bteHgO51n/ftzryAu9oVR22HUY8lQmVkpjU/RU3NORBd8RKpf5PIT//LfGU6tyfD5B ANKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si1323789plg.31.2019.08.29.01.54.20; Thu, 29 Aug 2019 01:54:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbfH2IwL convert rfc822-to-8bit (ORCPT + 99 others); Thu, 29 Aug 2019 04:52:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:43426 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726009AbfH2IwL (ORCPT ); Thu, 29 Aug 2019 04:52:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0F5C2AFE8; Thu, 29 Aug 2019 08:52:10 +0000 (UTC) Date: Thu, 29 Aug 2019 10:52:09 +0200 From: Thomas Bogendoerfer To: Jakub Kicinski Cc: Ralf Baechle , Paul Burton , James Hogan , "David S. Miller" , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next 06/15] net: sgi: ioc3-eth: get rid of ioc3_clean_rx_ring() Message-Id: <20190829105209.0c27c3d4d1c4a2cfb622d464@suse.de> In-Reply-To: <20190828160246.7b211f8a@cakuba.netronome.com> References: <20190828140315.17048-1-tbogendoerfer@suse.de> <20190828140315.17048-7-tbogendoerfer@suse.de> <20190828160246.7b211f8a@cakuba.netronome.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Aug 2019 16:02:46 -0700 Jakub Kicinski wrote: > On Wed, 28 Aug 2019 16:03:05 +0200, Thomas Bogendoerfer wrote: > > Clean rx ring is just called once after a new ring is allocated, which > > is per definition clean. So there is not need for this function. > > > > Signed-off-by: Thomas Bogendoerfer > > --- > > drivers/net/ethernet/sgi/ioc3-eth.c | 21 --------------------- > > 1 file changed, 21 deletions(-) > > > > diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c > > index 6ca560d4ab79..39631e067b71 100644 > > --- a/drivers/net/ethernet/sgi/ioc3-eth.c > > +++ b/drivers/net/ethernet/sgi/ioc3-eth.c > > @@ -761,26 +761,6 @@ static void ioc3_mii_start(struct ioc3_private *ip) > > add_timer(&ip->ioc3_timer); > > } > > > > -static inline void ioc3_clean_rx_ring(struct ioc3_private *ip) > > -{ > > - struct ioc3_erxbuf *rxb; > > - struct sk_buff *skb; > > - int i; > > - > > - for (i = ip->rx_ci; i & 15; i++) { > > - ip->rx_skbs[ip->rx_pi] = ip->rx_skbs[ip->rx_ci]; > > - ip->rxr[ip->rx_pi++] = ip->rxr[ip->rx_ci++]; > > - } > > - ip->rx_pi &= RX_RING_MASK; > > - ip->rx_ci &= RX_RING_MASK; > > - > > - for (i = ip->rx_ci; i != ip->rx_pi; i = (i + 1) & RX_RING_MASK) { > > - skb = ip->rx_skbs[i]; > > - rxb = (struct ioc3_erxbuf *)(skb->data - RX_OFFSET); > > - rxb->w0 = 0; > > There's gotta be some purpose to setting this w0 word to zero no? > ioc3_rx() uses that to see if the descriptor is done, and dutifully > clears it after.. you are right. I thought this is already done in alloc_rx_bufs, but it isn't. I'll add it there and put it into this patch. /me wonders why testing didn't show this... Thomas. -- SUSE Software Solutions Germany GmbH HRB 247165 (AG M?nchen) Gesch?ftsf?hrer: Felix Imend?rffer