Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847AbeAEOyM (ORCPT + 1 other); Fri, 5 Jan 2018 09:54:12 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:55516 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbeAEOyK (ORCPT ); Fri, 5 Jan 2018 09:54:10 -0500 Date: Fri, 5 Jan 2018 15:54:05 +0100 From: Andrew Lunn To: Peng Li Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, salil.mehta@huawei.com Subject: Re: [PATCH net-next 06/20] net: hns3: Modify the update period of packet statistics Message-ID: <20180105145405.GC4038@lunn.ch> References: <1515147504-86802-1-git-send-email-lipeng321@huawei.com> <1515147504-86802-7-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515147504-86802-7-git-send-email-lipeng321@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c > @@ -1126,6 +1126,7 @@ static int hns3_nic_set_features(struct net_device *netdev, > { > struct hns3_nic_priv *priv = netdev_priv(netdev); > int queue_num = priv->ae_handle->kinfo.num_tqps; > + struct hnae3_handle *handle = priv->ae_handle; > struct hns3_enet_ring *ring; > unsigned int start; > unsigned int idx; > @@ -1134,6 +1135,8 @@ static int hns3_nic_set_features(struct net_device *netdev, > u64 tx_pkts = 0; > u64 rx_pkts = 0; > > + handle->ae_algo->ops->update_stats(handle, &netdev->stats); > + > for (idx = 0; idx < queue_num; idx++) { > /* fetch the tx stats */ > ring = priv->ring_data[idx].ring; There is something odd going on with patch here. Notice how it says hns3_nic_set_features(). This is not the function being patched, it is actually the next one, hns3_nic_get_stats64(), which makes a lot more sense. Is it because the static void is on the previous line? It would be nice if the function was correctly reported. It makes it easier to review the patch. Andrew