From patchwork Mon Sep 3 10:21:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 145780 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2313479ljw; Mon, 3 Sep 2018 03:23:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZfqOf6ZRbdX4M5wA20sU3vOkheRsUYGQ2Vkn9Efui7CcgwNQS/+SbCqeLQMjumOGiaZ5Vh X-Received: by 2002:a62:b0b:: with SMTP id t11-v6mr24668191pfi.36.1535970213793; Mon, 03 Sep 2018 03:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535970213; cv=none; d=google.com; s=arc-20160816; b=RqTQyzXLeAdSIjIJalKmCgzz4UBU9wkBpX5DVkGsAO/qmMbXnynv5dDWXNDSQEpmTP F7e1WvYMLCvVqgmrlHYkwak8vKAwTtAiHbt215gczYy1ZZEqJtnu4j0tj3aqFlPNbw1D up0v/9lladkg7nDZPGdA3/QW7zNmcB+X9L95KyoF4tt3dzRXm6AAkDVwhvmetUAHqZeI 3nVgQpptWIa+Bjj1ECYhRVobYUX5iTvbpJMg08++F1IaYhTJsBlzdoSWVkuCAwZsKKev w+IwHpI7H+x7k/s01wQRL6TNCJSBLoqq7cGvDUeGWzu0feRgjZt5yNrEsT7/7OxTGlYW WJug== 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=h7p340IffySAYUt/RXShoXR+QD8bgYJnCYmcbepQThU2okNo7ra4wjs5jCIQKPPo+z dobLrj02a7HEt7grdfy/RzhakY/DqtqtcRMUTs8ZAwN4GvD1QsylhJGP1lzifn58vPvk /ZLVMsY3rQotxaR7fcte5ieyikz8FQa6Q9fH4C1ljaEf5kJFdi6BLGmNu4AhDGKiaGE/ WfgWdawZHRYQsA73nF0gE0OyALL6KzkjhB8B+ElQyrc9yVOhBA8R7SBa7LCAeu2eMPnG L628xHh+b7AH9RSw4XmhyksSs3XZFoGnhdAGM9MEegkYNpCd7/xb3nNqp9s24LWW1NRj SRzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 z21-v6si14235403pgu.163.2018.09.03.03.23.33; Mon, 03 Sep 2018 03:23:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbeICOmz (ORCPT + 10 others); Mon, 3 Sep 2018 10:42:55 -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 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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(+) -- 2.7.4 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);