From patchwork Tue Sep 26 02:25:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunsheng Lin X-Patchwork-Id: 818430 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y1Pz92dB5z9sPk for ; Tue, 26 Sep 2017 12:29:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967364AbdIZC2o (ORCPT ); Mon, 25 Sep 2017 22:28:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6570 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966283AbdIZCZs (ORCPT ); Mon, 25 Sep 2017 22:25:48 -0400 Received: from 172.30.72.60 (EHLO DGGEMS408-HUB.china.huawei.com) ([172.30.72.60]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DIA54144; Tue, 26 Sep 2017 10:25:44 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.301.0; Tue, 26 Sep 2017 10:25:34 +0800 From: Yunsheng Lin To: CC: , , , , , , , , , , , Subject: [PATCH v2 net-next 00/10] Add support for DCB feature in hns3 driver Date: Tue, 26 Sep 2017 10:25:08 +0800 Message-ID: <1506392718-50463-1-git-send-email-linyunsheng@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.59C9BAA8.012F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0455d5e86980684031dca81bc27e14b5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The patchset contains some enhancement related to DCB before adding support for DCB feature. This patchset depends on the following patchset: https://patchwork.ozlabs.org/cover/815646/ https://patchwork.ozlabs.org/cover/816145/ High Level Architecture: [ tc qdisc ] [ lldpad ] | | | | | | [ hns3_enet ] [ hns3_dcbnl ] \ / \ / \ / [ hclge_dcb ] / \ / \ / \ [ hclge_main ] [ hclge_tm ] Current patch-set support following functionality: 1. Use of tc qdisc to configure the tc num and prio_tc_map. 2. Use of lldptool to configure the tc schedule mode, tc bandwidth(if schedule mode is ETS), prio_tc_map and PFC parameter. --- V2: Fix for not defining variables in local loop. V1: Initial Submit. Yunsheng Lin (10): net: hns3: Support for dynamically assigning tx buffer to TC net: hns3: Add support for dynamically buffer reallocation net: hns3: Add support for PFC setting in TM module net: hns3: Add support for port shaper setting in TM module net: hns3: Add tc-based TM support for sriov enabled port net: hns3: Add some interface for the support of DCB feature net: hns3: Add hclge_dcb module for the support of DCB feature net: hns3: Add dcb netlink interface for the support of DCB feature net: hns3: Setting for fc_mode and dcb enable flag in TM module net: hns3: Add mqprio support when interacting with network stack drivers/net/ethernet/hisilicon/Kconfig | 9 + drivers/net/ethernet/hisilicon/hns3/hnae3.h | 20 ++ .../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 4 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 6 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 327 +++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.h | 21 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 214 +++++++++----- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 8 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 231 +++++++++++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 15 + .../ethernet/hisilicon/hns3/hns3pf/hns3_dcbnl.c | 106 +++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 137 +++++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 7 + 13 files changed, 977 insertions(+), 128 deletions(-) create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.h create mode 100644 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_dcbnl.c