Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2536445yba; Mon, 6 May 2019 07:39:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZ0VvtTW3mArpjAZfSVUcIFarCG/fMNxczORNO6/A5Y8rOcp6ebQO1pBzWMKpOU93+aYtv X-Received: by 2002:aa7:8019:: with SMTP id j25mr34142091pfi.77.1557153587260; Mon, 06 May 2019 07:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557153587; cv=none; d=google.com; s=arc-20160816; b=uB8WrdQ7Upr5HSf+xQ1gkZ4wFkYqCfQhBuD1w9RNKkfjTHtsf0ChZIgUXI47Mdacrq +3gXm7sRfH8nyWilAl0LA9kNxWqTuxA2s1SuqiQJQchlFXpOYjwIqNAWJFIbBOHUt4a2 NNLsdgiI/MPoJaXMXafC62MwzfXqJ/rXVqbFsI133WvXSmx/+NrjPZMxe+rrYcCPY75I cJ0DkKupYGSOkoS4dIr6CPeohEF3VLrIFl3+XxQazPNXdtWFRNePi9ctmFkO1+hd2KNp ppa9hhjWl+bEVB2R1gAgAIN/jyxCgzTzN2T4IzSp/ZzQiPk3E1V07kYqcNQYnCqzlGlO Ddhg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+XmQ3wOO9kjqfUjVCmXcLlWGGiZn/XoFb+QH1ZgmnDs=; b=H02ve7GthluljMMgypaufQAjGPNCnxImWqgnMlgXuhadYmLaZn1FLGUT0uAwuX48AC 54nuEL8g/UfYtXLQ6TmkJQpS4rqhItIOh/u+PoTIVB502unZO8uXX/7xZY65WrYtCujE hRILM/A8J+AmIewDw0F9VaVUP5DreQzpDNO2GRmSgcYql5d/kk/7LHeeZ/BZv4NdJQGc e9fFjtlHp+eyxn6TeFjiu40pyMwPJlYRR5Tga4i1NAC6vkC54lnpFSghF3j+7aL5JIto HjB1RHcqBYuuTA6yme1qIghp3gfY98zgib3T6h0Btml6AmwV+YHwQqJcTcAxx/7djgW0 +dZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y2j3YiR2; 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 e19si14141255pgv.63.2019.05.06.07.39.31; Mon, 06 May 2019 07:39:47 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Y2j3YiR2; 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 S1726656AbfEFOgb (ORCPT + 99 others); Mon, 6 May 2019 10:36:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:56830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbfEFOg1 (ORCPT ); Mon, 6 May 2019 10:36:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8CDD214C6; Mon, 6 May 2019 14:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153386; bh=Gi5Fv8NyiWcOpKtZMWK3WHRktAX7NP6zP96+KUqnLhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y2j3YiR2wOZsasutQfaJa51dsR2U0Yy9mc2JLp9/yn4rkPUp+zomkzpG7QJF6LlYS ZpoIcEFGgLvwqhMMG5z56JjqC6ru7v5l0R0SRdI2roWlTY02UwZGqjHcMUjK+Pp0lE ZFJMukvcdxNyUPAgkfcNUmA2Wvk5SwoA8n8wo5b4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yonglong Liu , Peng Li , "David S. Miller" , "Sasha Levin (Microsoft)" Subject: [PATCH 5.0 069/122] net: hns: Use NAPI_POLL_WEIGHT for hns driver Date: Mon, 6 May 2019 16:32:07 +0200 Message-Id: <20190506143101.159456579@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit acb1ce15a61154aa501891d67ebf79bc9ea26818 ] When the HNS driver loaded, always have an error print: "netif_napi_add() called with weight 256" This is because the kernel checks the NAPI polling weights requested by drivers and it prints an error message if a driver requests a weight bigger than 64. So use NAPI_POLL_WEIGHT to fix it. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: David S. Miller Signed-off-by: Sasha Levin (Microsoft) --- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c index e5a7c0761dbd..4cd86ba1f050 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c @@ -29,9 +29,6 @@ #define SERVICE_TIMER_HZ (1 * HZ) -#define NIC_TX_CLEAN_MAX_NUM 256 -#define NIC_RX_CLEAN_MAX_NUM 64 - #define RCB_IRQ_NOT_INITED 0 #define RCB_IRQ_INITED 1 #define HNS_BUFFER_SIZE_2048 2048 @@ -2153,7 +2150,7 @@ static int hns_nic_init_ring_data(struct hns_nic_priv *priv) hns_nic_tx_fini_pro_v2; netif_napi_add(priv->netdev, &rd->napi, - hns_nic_common_poll, NIC_TX_CLEAN_MAX_NUM); + hns_nic_common_poll, NAPI_POLL_WEIGHT); rd->ring->irq_init_flag = RCB_IRQ_NOT_INITED; } for (i = h->q_num; i < h->q_num * 2; i++) { @@ -2166,7 +2163,7 @@ static int hns_nic_init_ring_data(struct hns_nic_priv *priv) hns_nic_rx_fini_pro_v2; netif_napi_add(priv->netdev, &rd->napi, - hns_nic_common_poll, NIC_RX_CLEAN_MAX_NUM); + hns_nic_common_poll, NAPI_POLL_WEIGHT); rd->ring->irq_init_flag = RCB_IRQ_NOT_INITED; } -- 2.20.1