Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1981284imm; Sat, 29 Sep 2018 08:00:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ls1App5HyHAeILZCjuQ95FX/4lHNan+KUjvFYP0F+HA4HII6qlPyRxtg4LUO4L9we3awU X-Received: by 2002:a17:902:9893:: with SMTP id s19-v6mr3598969plp.130.1538233220099; Sat, 29 Sep 2018 08:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538233220; cv=none; d=google.com; s=arc-20160816; b=I5LpOgYFC3qFMDs9LOMybkdTHz0IQLxvYVV/PNyaa0deD0DplS2rgjUONf4w9KCtha HdJwNYs59iS5YHnM/IHjaDPG9Vb1ffgzdn0vSk2YouFNg6bvmAKQHokNunY1LfCNZDns McpTv2lQYBXlrWSFCVrwwWxV5bkJn3BTDzJPPk6DKUQatwNVN/9FHHsMcsUkHbxfQMld s6RreqqAxr5SCqJDNgTyCnJhg8QPUO4XOlsmkuipzxg5fO70YvprVWfwVp0ct2t7cv/t 1rxfK+WVJ9LWe1fVjfjX8MV6V6kAHTFredIzVB0NWcvu1x91t+8HMqjpc+IhZbylNbu9 Q2vA== 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=TzqTXu4p50RWHuYalQIWv1qf7cpXvZsfDmn7NMubmBM=; b=OvjJKkNCRYb3jgjWwkl4bXOemysvT50BVqxJFnRPjoSWUX0BZRA3NujLi0W8CcVeK6 o03WUhWO5sKINZHmLBcTo3gFvcjjmeWdi4aMN72TgdSMczqIj7A4WeGja7VwL2lmlzkU ZHsGbgFMJIRSZhltbOl3RTYuGHGrjeVJl6mNiu4NLmxhGCFB7PQt+o1qlE1XElny26g4 yfLRchRhrmlDvCfvH3Z6uT9S5ha52417Gfe7WmKS4MNITlWDt97mhWfxvTicCSOnSlwo XVGKyca1NUhbdL/cx2M6k+ifMaeHYCmURj0FPpE31rgAEvVCAWIMs41b6A+g+bZqerG5 Nqpg== 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 b13-v6si8318535plm.275.2018.09.29.08.00.05; Sat, 29 Sep 2018 08:00:20 -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 S1728410AbeI2V10 (ORCPT + 99 others); Sat, 29 Sep 2018 17:27:26 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57434 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728365AbeI2V10 (ORCPT ); Sat, 29 Sep 2018 17:27:26 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C108A916C7DA3; Sat, 29 Sep 2018 22:58:37 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.85.66) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Sat, 29 Sep 2018 22:58:32 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH V2 net-next 02/10] net: hns3: Set extra mac address of pause param for HW Date: Sat, 29 Sep 2018 15:56:14 +0100 Message-ID: <20180929145622.5448-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180929145622.5448-1-salil.mehta@huawei.com> References: <20180929145622.5448-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.47.85.66] 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(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c index 00bb39451bc5..ab7280d7f79c 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 dd4c194747c1..e1568b826aac 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 { -- 2.11.0