From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net: hns3: add common validation in hclge_dcb Date: Mon, 19 Nov 2018 18:32:24 -0800 (PST) Message-ID: <20181119.183224.87651627805917399.davem@davemloft.net> References: <1542632535-18210-1-git-send-email-tanxiaojun@huawei.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com, lipeng321@huawei.com, linyunsheng@huawei.com, shenjian15@huawei.com, tanhuazhong@huawei.com, liangfuyun1@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: tanxiaojun@huawei.com Return-path: In-Reply-To: <1542632535-18210-1-git-send-email-tanxiaojun@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Tan Xiaojun Date: Mon, 19 Nov 2018 21:02:15 +0800 > From: Yunsheng Lin > > Before setting tm related configuration to hardware, driver > needs to check the configuration provided by user is valid. > Currently hclge_ieee_setets and hclge_setup_tc both implement > their own checking, which has a lot in common. > > This patch addes hclge_dcb_common_validate to do the common > checking. The checking in hclge_tm_prio_tc_info_update > and hclge_tm_schd_info_update is unnecessary now, so change > the return type to void, which removes the need to do error > handling when one of the checking fails. > > Also, ets->prio_tc is indexed by user prio and ets->tc_tsa is > indexed by tc num, so this patch changes them to use different > index. > > Signed-off-by: Yunsheng Lin > Signed-off-by: Tan Xiaojun Looks good, applied, thanks!