Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1092700imm; Wed, 26 Sep 2018 11:30:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV60dalz6Jhq/e8W+Xe170KDAGtRxh9adRfteeJCftHqw9F82+/+ZdB2dTqRqiowqfRtumV/W X-Received: by 2002:a63:c00b:: with SMTP id h11-v6mr6717097pgg.279.1537986609036; Wed, 26 Sep 2018 11:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537986609; cv=none; d=google.com; s=arc-20160816; b=ylFZPSoLwCCc5NzGyA1erGWqlwjLZDjk3dyfKiSxf+8lotYeJ3l/qPqLFhTrj5vArS EmxUYc4TEg+mSrmLACdNicmZITmtFBZf0DoobLJYyMRMbv2WhACGgW1euhfBYr6Vqq/y 0COSrTOZoZfP7s0e/30k/ToBpOUryskzMp2kPfaV6PCc2Xljy00gk5+JcfXTjpZEaGhZ beL0NxwZ/46yEo6Ujij0nUAAso3tcgkQ44keCeu6w1rd424IYQ5Ra8+PtkmdqLrl82fa sO8GS88xVLcnEikRPlkjot0lr+ctO/UFM0Z8tRnMBqV4AnashBaLuXNyZCGSd2OTPYN2 DQEQ== 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 33-v6si1846366pgv.588.2018.09.26.11.29.53; Wed, 26 Sep 2018 11:30:08 -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 S1728771AbeI0Anv (ORCPT + 99 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 Content-Type: text/plain 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(+) 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 { -- 2.7.4