Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp886024pxb; Wed, 3 Mar 2021 19:44:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJygB6V7Sdv+tBWqFhfLxaYQPte5bMt6XxYtkQo1v4RdxY7sCMqWnXLywsr6CbnXGETR7WCi X-Received: by 2002:a17:906:2612:: with SMTP id h18mr1957368ejc.309.1614829469007; Wed, 03 Mar 2021 19:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614829469; cv=none; d=google.com; s=arc-20160816; b=TOSvO90aFvXc5FgH83qaIyVu10JK2dZsczK2slWMHx+q9IyxC7rGZLK9HhNNlEYgiY YW6ktmQQumYc92ye+24ntHTPFg6ZHlvapr/tAPjP9dAw8Ua1Qx+EM6IWGU7z3pEQ2z1r 5X7rxnlVXB4av8k57uNxAzVx+3zqaINl+adX0UPC6DVyOndUFzcntWmdY2Wy7SlacVSW MrpPeap6Ysr1K5pw3X/AC7yGlGiKJr1OvYOVrPKZRmuYcNrjjyItOzbOLbY5NL09eGM6 V8HX48cV10YDaEuTK1AR8ZanCbgt+dWoxNpTSyWEKrz/WSO6S46by7yeoPy5sr8fXSh4 7nYg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HehZC6mdqvAQFHn80W1ua3P1e6uRtL/ldmIItliiVao=; b=USpQRUiP/YSES5S+BeSFOUMKDuNItWhygeaOtQCJ0PN60wVe1S7OB1szKuaUOZ6Te6 XK29tk0mvOeO2e0jGJjBokCJiPm3oqVHBOS6GzGIRe/c47cS3p5CKNHjRpL+yssjWXVj 3mbgNZoVFVu3eHa3wGjPZIeSg1mBNR1J7nbHI4WmaqcJ2wvLQHL87TE8QBzE51Q7izNJ TRjtSBKK0RSzOduTJ2lvugEUayY81sdGmrXi+m0+0DlNsPbOs1kt0Ve+Fs7UivX1vwMR q4a/GB6wa0Zvx4njKI4S9IijvVNwn8s5UW0GXocrRx3kUPMBdOgH2U8HePJK+eaxX8Yd KHAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZnS5nvr6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si2318329ejs.389.2021.03.03.19.44.06; Wed, 03 Mar 2021 19:44:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZnS5nvr6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379797AbhCBBbY (ORCPT + 99 others); Mon, 1 Mar 2021 20:31:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:43886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240315AbhCATSz (ORCPT ); Mon, 1 Mar 2021 14:18:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EF8F965061; Mon, 1 Mar 2021 17:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619413; bh=AJ3uhTSzwnOtW4U7Q+pKwF4bb1pWRrBavSkm4MuTQRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZnS5nvr65AKG9u7dx8H5CXSDtmi73Fvagcwphk/0M+zG8dcVrvl1SCF1Tl3f+6ueK KVuL0KP5zsLMFOQ2ZuOniLUTYInm6xH6tkSCmBT+uIuLKpzh1ly/1Z5cREia9aYBCz HQjFCeeygx/n5EPU20WQqUciQT+EAo/I8KnfFcz8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Ertman , Tony Brelinski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.10 445/663] ice: report correct max number of TCs Date: Mon, 1 Mar 2021 17:11:33 +0100 Message-Id: <20210301161203.917958397@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Ertman [ Upstream commit 7dcf7aa01c7b9f18727cbe0f9cb4136f1c6cdcc2 ] In the driver currently, we are reporting max number of TCs to the DCBNL callback as a kernel define set to 8. This is preventing userspace applications performing DCBx to correctly down map the TCs from requested to actual values. Report the actual max TC value to userspace from the capability struct. Fixes: b94b013eb626 ("ice: Implement DCBNL support") Signed-off-by: Dave Ertman Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c index 87f91b750d59a..842d44b63480f 100644 --- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c +++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c @@ -136,7 +136,7 @@ ice_dcbnl_getnumtcs(struct net_device *dev, int __always_unused tcid, u8 *num) if (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)) return -EINVAL; - *num = IEEE_8021QAZ_MAX_TCS; + *num = pf->hw.func_caps.common_cap.maxtc; return 0; } -- 2.27.0