Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1547896imm; Mon, 3 Sep 2018 03:25:29 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ9ybRnccahOve1ouMIoNoM92Untcc4uDLg8gXiPvkdxlLT23n0O62PYZa6bjbgfTYDp/lA X-Received: by 2002:a63:610:: with SMTP id 16-v6mr25192453pgg.96.1535970329325; Mon, 03 Sep 2018 03:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535970329; cv=none; d=google.com; s=arc-20160816; b=PyZ8WJTnklr/vTNUkWPvOdU2vvFrEu6Zt0Tz8ZYDrChARwA1bXVRUG+vQGhOhTWYhJ aWPm078JZuJUVUoEGWWQHgi8dPO4ochjjVIk8bMFx3e2RQ8yJ4iuf2F2KlqGYp5xu1dK ktmrCy+bLUFRT50Ta6jgGKpEHk7M73Kt9HLvfoLvIjblh4t7mq3b4QpcLkbz4b6LUCzn uprMud3B+XU6WV+RAGhqEqilNHSAdEdOKehv8HBcAopYwSXxksrg1A4vfibA2aS4XIh8 aY0WjTaV4zTvgWw+A81P2YIrJ4mQgkgirVbub2FVQqi8s4vC4sNIpdg8/8M4O9Rc3IDC r+Rw== 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:arc-authentication-results; bh=4ShoJO4s3Jf0BPHE055PjsLZdQUd9M4Mh+ATKvCr3aA=; b=RQxB/Lx1sFsJSWnGpiDX+5kKF4/PnbBPZ7vGZIRcza+50ZT/fGUL/oSJ/Jq4foHnjN 6nq/f4cN/BuqQx57z5kNY/8ZnNrhYqOqxiwoS8oMKOc3DybDBz+zVptectsmdKK1sNDE Ah58psZ8GQ2gDVtc3q9tWK98g3WT/tqkSPsixECfzlH72nrjc92EWQSx4s64wQQJyq12 UCBgiDG6BfxTukTjuKOMdGp8YBJ2nnTpIMCG6mUGq5CRhzt31mv/kgllBDw3Lq0UOxEo d3NcvzQ14nyOyWolnfAKg7532ystZIrlRqWXhHHCk271kNiPIdOfTDuMdQREu8ewoRX7 Hwzg== 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 b36-v6si3452517pgl.621.2018.09.03.03.25.14; Mon, 03 Sep 2018 03:25:29 -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 S1728002AbeICOmy (ORCPT + 99 others); Mon, 3 Sep 2018 10:42:54 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11221 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727991AbeICOmx (ORCPT ); Mon, 3 Sep 2018 10:42:53 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 69E09E97681F4; Mon, 3 Sep 2018 18:23:19 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Mon, 3 Sep 2018 18:23:15 +0800 From: Salil Mehta To: CC: , , , , , , , Yunsheng Lin Subject: [PATCH net-next 09/11] net: hns3: Change the dst mac addr of loopback packet Date: Mon, 3 Sep 2018 11:21:54 +0100 Message-ID: <20180903102156.18676-10-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180903102156.18676-1-salil.mehta@huawei.com> References: <20180903102156.18676-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: Yunsheng Lin Currently, the dst mac addr of loopback packet is the same as the host' mac addr, the SSU component may loop back the packet to host before the packet reaches mac or serdes, which will defect the purpose of mac or serdes selftest. This patch changes it by adding 0x1f to the last byte of dst mac addr. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 7143e39..dfce76e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -137,6 +137,7 @@ static void hns3_lp_setup_skb(struct sk_buff *skb) packet = skb_put(skb, HNS3_NIC_LB_TEST_PACKET_SIZE); memcpy(ethh->h_dest, ndev->dev_addr, ETH_ALEN); + ethh->h_dest[5] += 0x1f; eth_zero_addr(ethh->h_source); ethh->h_proto = htons(ETH_P_ARP); skb_reset_mac_header(skb); -- 2.7.4