From patchwork Tue May 1 18:55:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 134791 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp5279785lji; Tue, 1 May 2018 11:58:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZog+7CHrLgl5JcU9ac5v93bqvsxl+f22h1Q4HijpW4YDFyLjBnPR6GnZIlhURP5BY+uZQv2 X-Received: by 10.98.150.92 with SMTP id c89mr16748495pfe.37.1525201087977; Tue, 01 May 2018 11:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525201087; cv=none; d=google.com; s=arc-20160816; b=JQfgoXpYrjuTQiZA2eJdmRoF6slsLOA12SK/aL9yU8wQMvc65nj6WTKRuBo4+bp8+Y xLRz5D4gmtJA2K8eSVbChppM2IP560b9CuPiC0R0ADGbikUQHcGXmF+T5a2vxMwkSRxb vXm+Kv+a2q1c4/QzWEBxBHsMN1bYOhTFvHFa4Or9PpKxQ1zH104JuFCZIrowCypk3Psl h3aBRT5u7qaMRBPvyeYm4+ZFMNnu2oLxNKpUPq/BLuFh/iJ/EkDxwp2rO0srIZQTrSu9 9+Kvtz8VeHt6Kkqvm6oGAFYyYvOLiL4/y3RyrDr47Dw/0DDGg++10W6Q/MeNJEseeCFB YdvA== 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=yaBWJlR00DBEIAMQYodqivgwcr09dyIfUP+W3n3g+Po=; b=pXLenZIajAH4t5ND8na5uQb0cAsWtc81qSwSLv2aZEbiXlcGP5pE5Psv4CSD0Htfvm SKDpgSr84OSv3DzoMwrrfyrv7qwXkh1JEnTgxhYcZZEgdBZerJG6laHzJbvk1AZu2xUz v95JFQxrp8UN67JxnAO8rP8S/RaiC3LUKuHAfKFgBc/4s1cGU8qz8BJeZ1s0d+3islzj WIwKkxWPkC0mx0iHE5oBPvQf1hJgZn0nNZxx9kdxRLKMc2hys4+fQGvbn4vx/viffj87 C8KUo7LzVi2opCja9X5aQ6diOc1Fw1lCBI8JzdWzj+qlcRAYVi67z2wkyNF2aXDiSnTm T/eQ== 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 n81si10036460pfj.152.2018.05.01.11.58.07; Tue, 01 May 2018 11:58:07 -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 S1756601AbeEAS6E (ORCPT + 29 others); Tue, 1 May 2018 14:58:04 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7641 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756247AbeEAS6A (ORCPT ); Tue, 1 May 2018 14:58:00 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 54CC876B7DFD; Wed, 2 May 2018 02:57:47 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.46) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.361.1; Wed, 2 May 2018 02:57:38 +0800 From: Salil Mehta To: CC: , , , , , , , Huazhong Tan Subject: [PATCH net-next 2/9] net: hns3: fix to correctly fetch l4 protocol outer header Date: Tue, 1 May 2018 19:55:58 +0100 Message-ID: <20180501185605.9584-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180501185605.9584-1-salil.mehta@huawei.com> References: <20180501185605.9584-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.46] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan This patch fixes the function being used to fetch L4 protocol outer header. Mistakenly skb_inner_transport_header API was being used earlier. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 8c55965..c4e2950 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -502,7 +502,7 @@ static int hns3_get_l4_protocol(struct sk_buff *skb, u8 *ol4_proto, /* find outer header point */ l3.hdr = skb_network_header(skb); - l4_hdr = skb_inner_transport_header(skb); + l4_hdr = skb_transport_header(skb); if (skb->protocol == htons(ETH_P_IPV6)) { exthdr = l3.hdr + sizeof(*l3.v6);