Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751697AbeAFGY6 (ORCPT + 1 other); Sat, 6 Jan 2018 01:24:58 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3694 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750911AbeAFGY5 (ORCPT ); Sat, 6 Jan 2018 01:24:57 -0500 Subject: Re: [PATCH net-next 06/20] net: hns3: Modify the update period of packet statistics To: Andrew Lunn References: <1515147504-86802-1-git-send-email-lipeng321@huawei.com> <1515147504-86802-7-git-send-email-lipeng321@huawei.com> <20180105145405.GC4038@lunn.ch> CC: , , , , From: "lipeng (Y)" Message-ID: <7784fdd6-dbdc-0d5d-9ba1-e2f05594d1dc@huawei.com> Date: Sat, 6 Jan 2018 14:23:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20180105145405.GC4038@lunn.ch> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.173.108] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 2018/1/5 22:54, Andrew Lunn wrote: >> --- 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? Yes, it is because the static void is on the previous line. I can add one patch to fix the previous line , and this patch will correct automatically. do it need V2 patchset? or push a new patch after this patchset? > > It would be nice if the function was correctly reported. It makes it > easier to review the patch. > > Andrew > > . >