From patchwork Wed Sep 26 18:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 147619 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1058463lji; Wed, 26 Sep 2018 11:29:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV62VaR8FJbWQqCa0NOs3Vi1NPog+fAO6p5w3QGso4pD4f/urerwJlPED+5Xt15rSG64XzF5/ X-Received: by 2002:a63:ed07:: with SMTP id d7-v6mr6837153pgi.429.1537986579724; Wed, 26 Sep 2018 11:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537986579; cv=none; d=google.com; s=arc-20160816; b=wDno59FaW2GJOyRNwz7hC5D9IQWub61FfN4tBBmSa7C89rVTpwpC5bHEuPLjqVm8yo aRACyOl/ICYyYx04wWSF4ryiowbfUgWjD+v+NZ/x6IJ1nY4Ze2j+okUh1ZuYz9HodVFw s+z6HoNmrgZtW72IKRCQFLrw5qdwLemiNHA4lQv9+sgfRN1oUiAxLUhoIn6C2/w+ylGw PJakQbObGBaDCXFCAsLftTmwsAombxueUjlu+mQIDJIi+1YFlfZ0ChKpos/tCPEPVuKI xPC8xRPbwxa4dnHox7gwvihkzTxp6MBb3FV3XQGycM9VC3FgZ3UiruOTkhGPLv/oUmdU LwmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rmZAfzboCiMI917y0IVfGHuiz7ZxpQMEOrolVhfeRBg=; b=jPc5ApVgOfQB+8Fpz13WkpUmBqP8nRuiFuQs25bmVzt0R0PFowgp075OOMf2E9u9K5 daTtr9oHB1h3+J4aC4FXXre65tMCmz1auJXKe4zk8Btxljhc3VR1jq5iT1BpE4Rt/un3 4+ovA2Y8dtrPT3ay3O9+qPXujev3CgIXL9xiud5fTPJLJW49Tpdv4BbQeSspR+FXu4l6 YoPzIwabvGUapJHuKKRROBwykha+aBA5lbKpBxCqTNQ0+3+NC9oadpYXS+cOw15yB+Wx pDyb2UMJCmCiST0GsyFRXtb/NyeF07af6oL8Db2AWv+5P7Gkr5NPBLMALsbnYYK1uDhN tcZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r10-v6si5810002pgg.259.2018.09.26.11.29.39; Wed, 26 Sep 2018 11:29:39 -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; 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 S1728781AbeI0Anv (ORCPT + 32 others); Wed, 26 Sep 2018 20:43:51 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13152 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728498AbeI0Anu (ORCPT ); Wed, 26 Sep 2018 20:43:50 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9F320FD698320; Thu, 27 Sep 2018 02:29:33 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.399.0; Thu, 27 Sep 2018 02:29:26 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH net-next 02/10] net: hns3: Set extra mac address of pause param for HW Date: Wed, 26 Sep 2018 19:28:32 +0100 Message-ID: <20180926182840.28392-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180926182840.28392-1-salil.mehta@huawei.com> References: <20180926182840.28392-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang The extra mac address of pause param is used to do double check for pause frame. This patch set it to HW. If we do not do that, pfc pause frame will be transferred protocol stack when normal flow control mode is enabled. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 1 + drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 4 ++++ 2 files changed, 5 insertions(+) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c index 00bb394..ab7280d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c @@ -193,6 +193,7 @@ static int hclge_pause_param_cfg(struct hclge_dev *hdev, const u8 *addr, hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CFG_MAC_PARA, false); ether_addr_copy(pause_param->mac_addr, addr); + ether_addr_copy(pause_param->mac_addr_extra, addr); pause_param->pause_trans_gap = pause_trans_gap; pause_param->pause_trans_time = cpu_to_le16(pause_trans_time); diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h index dd4c194..e1568b8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h @@ -106,6 +106,10 @@ struct hclge_cfg_pause_param_cmd { u8 pause_trans_gap; u8 rsvd; __le16 pause_trans_time; + u8 rsvd1[6]; + /* extra mac address to do double check for pause frame */ + u8 mac_addr_extra[ETH_ALEN]; + u16 rsvd2; }; struct hclge_pfc_stats_cmd {