From patchwork Sat Sep 29 14:56:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 147841 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1986157lji; Sat, 29 Sep 2018 07:58:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FUtwVbL0eyr1Rfuq0qDUK19isD1M1U5sUkSVBe1zGjEe3xGACqBv2Ef1HYInOcl2lZNp9 X-Received: by 2002:a63:2643:: with SMTP id m64-v6mr3193013pgm.435.1538233128907; Sat, 29 Sep 2018 07:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538233128; cv=none; d=google.com; s=arc-20160816; b=jbjWx8qRMXeeiJILlamWMYYav++AJMMpjaqj/CKVF0sIy4+66w7G+Na+jkp9oFFXLv u4sojImpZNA/52aYZnqMmk1DJ2hdEUj4b5UdzB3bVjc4MktYZ4kLymBpGjVID2gg+8D6 DPpFlk296lErFVvgpYw3WBsAWLPXSbLK2k9d5xxF+UAYycTZuIxaK7T5l4NzBEI/Faan +UpTqCBCIxEj7anXkkZFjow6A8U7a43K6HCApfUvd4h+mLaIHNXnn8TYYE8B2kgg5dq4 9EfnQo1CF4snIZzifREoxU5jgRhfHyL7vLYAY0P1+bY0kLzoUY5OScesb5kMQceXaSdB Xk2A== 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 w186-v6si715148pgd.471.2018.09.29.07.58.48; Sat, 29 Sep 2018 07:58:48 -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 S1728414AbeI2V10 (ORCPT + 32 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 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(+) -- 2.11.0 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 {