From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 322CFC432C3 for ; Tue, 19 Nov 2019 05:27:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04FA821939 for ; Tue, 19 Nov 2019 05:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141279; bh=bxAO4w5X5zEmrbHOpKpbvHsXKjaiz0sk0Z5cc1tOT0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MJYfH3EaRKT+FbaoQ/psCIbFUZNsdareyaRKzoyo5+mQZBQJrYJHpVOG0FXIjMh5T qdqkuqUk6m8lG8fd8RinIzqvR2Eq3kwHwp+WeO2zrm/dWppCRrakyf9WlUVBn2cu8d 8BcfuXcqW645UUh7a4F+4vujyieh3zbctjtZM+Rc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728837AbfKSF15 (ORCPT ); Tue, 19 Nov 2019 00:27:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:46312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727840AbfKSF1z (ORCPT ); Tue, 19 Nov 2019 00:27:55 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE63421823; Tue, 19 Nov 2019 05:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141275; bh=bxAO4w5X5zEmrbHOpKpbvHsXKjaiz0sk0Z5cc1tOT0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TPe953DRAqT3vw5ItIx43Lixq+rCgaEgcLp/9zqnPZV8cuEJePoKJpFIxTjY3c6sj u9hXfCb02RZDK+08qwfFnVMlup/MECpxhSgbrpG/1f2uhGxbrDD444xGcqBlUim47m sq9CZID+iNa5BzmBfSe78u3hSJYmtLYyqkxt5KJ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunsheng Lin , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 106/422] net: hns3: Change the dst mac addr of loopback packet Date: Tue, 19 Nov 2019 06:15:03 +0100 Message-Id: <20191119051406.047353103@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunsheng Lin [ Upstream commit 7f7d9e501f4123e64b130576621d24f9379adc8f ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 5bdcd92d86122..0c34ea1223580 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.20.1