net: hns3: Set extra mac address of pause param for HW
authorFuyun Liang <liangfuyun1@huawei.com>
Wed, 26 Sep 2018 18:28:32 +0000 (19:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:37:41 +0000 (10:37 -0700)
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 <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h

index 00bb39451bc5cf5275b6822b69057437cc6883f8..ab7280d7f79cfb2b9f49dbbce36c6eb6833c6f48 100644 (file)
@@ -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);
 
index dd4c194747c16cbf4a716d811dd4102615231e2f..e1568b826aac2f9bd77514c31aeabafd72365ca7 100644 (file)
@@ -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 {