Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1379388pxb; Sat, 16 Apr 2022 06:56:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7uAKMnfq/TjKRTrKHZglHwFZlbojqeoiEAqTDP4i3ouhWP0bnj62arTqReQH4kLU3VJD+ X-Received: by 2002:a17:902:8ec2:b0:156:9d2c:9ec5 with SMTP id x2-20020a1709028ec200b001569d2c9ec5mr3523830plo.170.1650117369471; Sat, 16 Apr 2022 06:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650117369; cv=none; d=google.com; s=arc-20160816; b=ll3vbPhBk5d556JPMw5cXMeMPxCRRDe8c/zwgZvLNWv/k/UiJ3pOPmY88WIfU4FNGW mLyqJLWkCChSiA6LSBh4glYRaF5Oak23B5kbftIZfG2fFP86L45V/U8nE31DAQi3kTGs b9biVOUQVS4NYxoS060LwTQ5tLM9Mkt58iY0CJqh6nRUX92aabhcekm7L35dTGapen/a fyrlOq34ZYdoQWtASpIzDfFjV3EW6DSAmcqan7IGPUM8U11H8Jc6JQiIctK9rN+pFvwX pspSMsLi+VBZG0okvNjeKxW0l2VS48NV/SJxpQmGu6eWkNEkXAzxPuZ1SZXr3oD/jE8x 6eWQ== 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:date:subject:cc:to:from; bh=CzLdisGWar+fg1UtaRRyf32Dn0vpansGd6Fwso5QRNY=; b=keb7Q15ONhGJMdC1OqrLzoeCEppTXRpclShcHxYgBeOqUq30xkVQy0+3Nu/BDSK6vP wAACLpRNC2w5pq5SCoblXTdWok+ag/mioMJXTLrKPu/rO0SHmc6zl/E8nm44EyPrYxxl /t3X8Pd/8YQVQSZkYaEPZH5nHjgICuOWUSgxJCqgpehGG7JELaamyMgbKvdJbzSUo/L3 CecA3jUzpKQjmJFZgRPxcLNEww/OpSZh7lIYRdWm9T2nOKzxMuf+Zwmt7HQ6R8XdRzl0 AxWwmYVgXDmHTJ5eWjpBWfaLscCmcJwmyiD52HfQ8zW4JaO65PmeI9ra+KeYVPSYNrZD bQMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o8-20020a170902d4c800b00153b9c989ebsi1846932plg.502.2022.04.16.06.55.42; Sat, 16 Apr 2022 06:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbiDPJWP (ORCPT + 99 others); Sat, 16 Apr 2022 05:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbiDPJWA (ORCPT ); Sat, 16 Apr 2022 05:22:00 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B283049CB2; Sat, 16 Apr 2022 02:19:28 -0700 (PDT) Received: from kwepemi500026.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KgSM06TsjzQwQV; Sat, 16 Apr 2022 17:19:24 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by kwepemi500026.china.huawei.com (7.221.188.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 16 Apr 2022 17:19:26 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 16 Apr 2022 17:19:26 +0800 From: Guangbin Huang To: , CC: , , , , Subject: [PATCH net-next 5/9] net: hns3: add log for setting tx spare buf size Date: Sat, 16 Apr 2022 17:13:39 +0800 Message-ID: <20220416091343.35817-6-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220416091343.35817-1-huangguangbin2@huawei.com> References: <20220416091343.35817-1-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hao Chen For the active tx spare buffer size maybe changed according to the page size, so add log to notice it. Signed-off-by: Hao Chen Signed-off-by: Guangbin Huang --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index bea810a26aac..51ee8adab6a3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -1868,6 +1868,8 @@ static int hns3_set_tunable(struct net_device *netdev, case ETHTOOL_TX_COPYBREAK_BUF_SIZE: old_tx_spare_buf_size = h->kinfo.tx_spare_buf_size; new_tx_spare_buf_size = *(u32 *)data; + netdev_info(netdev, "request to set tx spare buf size from %u to %u\n", + old_tx_spare_buf_size, new_tx_spare_buf_size); ret = hns3_set_tx_spare_buf_size(netdev, new_tx_spare_buf_size); if (ret || (!priv->ring->tx_spare && new_tx_spare_buf_size != 0)) { @@ -1885,6 +1887,10 @@ static int hns3_set_tunable(struct net_device *netdev, return ret; } + + netdev_info(netdev, "the actvie tx spare buf size is %u, due to page order\n", + priv->ring->tx_spare->len); + break; default: ret = -EOPNOTSUPP; -- 2.33.0