Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4952676imm; Tue, 31 Jul 2018 03:03:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeEA2rZbXTSqSMfoKDr8Np0SEpk1iQHj7kE8UsCB5SbFFp24LbMR9Z4sMPiZxB9vbIGw1yt X-Received: by 2002:a63:b705:: with SMTP id t5-v6mr20062756pgf.45.1533031429036; Tue, 31 Jul 2018 03:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533031429; cv=none; d=google.com; s=arc-20160816; b=LDbi0J1pRDawHCCIAotaachfk/77GPLJIOc9SZUo/zCzZ0qc/57y+iYgh3TdBud/tq aiNSS3O1hVnfrnrLuv90LzTuAGHgurUrwi/lxcsV4lIN6douDEQVWrXtSoaMxsZB99Nl +51fgu1dxCKNeIYycMIiNYqTrihoXyDayausRq0SWvLkM2F6GyGbwTk7ZjpM48/X1582 QpP3Cx7+0yEx6zYd2Ly2VMq8E1zmfOnQBiX2hq6OBbKK16nuz4ZcxVoFaUXxBLhfNMOR A+AjF/g9cmaARhPSPwR0aaaBsj266ovXb3QGONEA8a5apE6LhiN/yrVv6/ddLHAN/jTI SmSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:subject:arc-authentication-results; bh=+MHov/VP+SmUi0rHhbf4r+YPT7cNbx0hFzVhrgF/TQw=; b=iKApMZg/j3a8u+Ar5xPDjV1sTMeMC2qeCue0jjYbeoMwkgs7N5B4yKin0ySSA0n0Na wf/TcfIoyaULso1u1gngRzELCQbITAwaelnVtwkmSYslzdcV/wMyyMCB93f2SQHm5Np0 ZAL6r5Kv0iqvuWg+7suptI2IYTgR83z6zAsI/SSR01vXIvfh7r/rQB4VSt3Gj2PFWIwO CCi1KMP/60aTfwgcpp1zGsm7SH5qbrhe06+87CjGm5Yzcx0wNvatXPIzKM+7w8LnxTWN pLSNCeYoNwDRWGhvfZXLdZ5KCyjqTPsV8nZANiVsdx5llDXKluWhWCQn46HKaEflsqNK EvBg== 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 a20-v6si13635774pgi.184.2018.07.31.03.03.34; Tue, 31 Jul 2018 03:03:49 -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 S1731616AbeGaLmT (ORCPT + 99 others); Tue, 31 Jul 2018 07:42:19 -0400 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:59999 "EHLO tama500.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727269AbeGaLmT (ORCPT ); Tue, 31 Jul 2018 07:42:19 -0400 Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w6VA2gl6018260; Tue, 31 Jul 2018 19:02:42 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 1B4F1639062; Tue, 31 Jul 2018 19:02:42 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 0FAA9639124; Tue, 31 Jul 2018 19:02:42 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.146]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 09460400D1E; Tue, 31 Jul 2018 19:02:42 +0900 (JST) Subject: Re: [PATCH net-next 2/2] virtio-net: get rid of unnecessary container of rq stats References: <1533030219-9904-1-git-send-email-jasowang@redhat.com> <1533030219-9904-2-git-send-email-jasowang@redhat.com> From: Toshiaki Makita Message-ID: Date: Tue, 31 Jul 2018 19:02:19 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1533030219-9904-2-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Jason Wang Cc: mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/07/31 18:43, Jason Wang wrote: > We don't maintain tx counters in rx stats any more. There's no need > for an extra container of rq stats. > > Cc: Toshiaki Makita > Signed-off-by: Jason Wang > --- > drivers/net/virtio_net.c | 80 ++++++++++++++++++++++-------------------------- > 1 file changed, 36 insertions(+), 44 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 72d3f68..14f661c 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -87,7 +87,8 @@ struct virtnet_sq_stats { > u64 kicks; > }; > > -struct virtnet_rq_stat_items { > +struct virtnet_rq_stats { > + struct u64_stats_sync syncp; > u64 packets; > u64 bytes; > u64 drops; > @@ -98,17 +99,8 @@ struct virtnet_rq_stat_items { > u64 kicks; > }; > > -struct virtnet_rq_stats { > - struct u64_stats_sync syncp; > - struct virtnet_rq_stat_items items; > -}; I'm not thinking removing sq stat is needed but even if it is I want to keep virtnet_rq_stats to avoid allocating unnecessary u64_stats_syncp on stack in virtnet_receive. I would just remove virtnet_rx_stats if necessary. > - > -struct virtnet_rx_stats { > - struct virtnet_rq_stat_items rx; > -}; > - -- Toshiaki Makita