From patchwork Thu Nov 8 23:18:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2742513BF for ; Thu, 8 Nov 2018 23:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1411D2E7D4 for ; Thu, 8 Nov 2018 23:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02F662E812; Thu, 8 Nov 2018 23:18:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A34B52E7D4 for ; Thu, 8 Nov 2018 23:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727252AbeKIIzz (ORCPT ); Fri, 9 Nov 2018 03:55:55 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:17658 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbeKIIzy (ORCPT ); Fri, 9 Nov 2018 03:55:54 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLl5pc3zSL; Fri, 9 Nov 2018 00:17:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719023; bh=3art61oZ3h/JuhrnFPt14bIGblLXJj6WDEEihAG+Rg8=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=ja3od3iWfmQ7AD/j6rIO8BWUmk5t8VQcf9/tV09lVo69CGI/dVMwqwoo2v9Eiyvrd KjHCnlSwh9WscMnJttBHLc+2igO5rSXl2QP4T7OSwSERUldF5Ke4imQ5kO+l1z3SWJ TIGkB3p1L11I4wvEf6YRdAAeHmSwOtETZc8vakb28JIbF/gvCh8UbmudQAkGcdzsYy V+h2LwtUv0b09htluT95FARFPsPhGxxvgzERpM+IaepQuUbwuPDh2EmFhESZIkA4O2 +1ifUd5axWEIWa75XjSrHi5ttInbL5yYIcPJbean7iJYBTIdEQZPvD6KGLUS+mQbN6 Uqxxrl3OJQLMA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:01 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 1/9] cxgb4: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Steve Wise , linux-rdma@vger.kernel.org, Ajit Khaparde , Alexey Kuznetsov , bridge@lists.linux-foundation.org, Cong Wang , coreteam@netfilter.org, "David S. Miller" , Florian Westphal , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , Jozsef Kadlecsik , Mirko Lindner , netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use __vlan_hwaccel_put_tag() to set vlan tag and proto fields. Signed-off-by: Michał Mirosław --- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 615413bd3e8d..8ed01e07c463 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3944,7 +3944,7 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb) } else { vlan_eh = (struct vlan_ethhdr *)(req + 1); iph = (struct iphdr *)(vlan_eh + 1); - skb->vlan_tci = ntohs(cpl->vlan); + __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(cpl->vlan)); } if (iph->version != 0x4) From patchwork Thu Nov 8 23:18:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F7631709 for ; Thu, 8 Nov 2018 23:18:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 403A32E7FE for ; Thu, 8 Nov 2018 23:18:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 348D02E817; Thu, 8 Nov 2018 23:18:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF14A2E7FE for ; Thu, 8 Nov 2018 23:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727045AbeKII4N (ORCPT ); Fri, 9 Nov 2018 03:56:13 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:65346 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbeKIIzy (ORCPT ); Fri, 9 Nov 2018 03:55:54 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLm1Zl1zTQ; Fri, 9 Nov 2018 00:17:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719024; bh=+SK+n9+g9d3vOxlKaffebdt4fu9Zy2ht+kS1MahY5MI=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=AtpNDFNqf5ASYuFCuT7TrQyWDpOSVZZRmBXI/PeUZx/G6iHs4T+bqc9VQ/pLHz8nQ v00MpAGT+Iy2I8rTN4C4+pA4SreR+yn/Y2/4twoiZiMPq4OvO5Pj+kea5Rjk5fT+jR +KlYyydZ8Qx4/dXJXscZyjKweFHUCDZYYZLItXXDi3pnS9QLumj5nxR/FvE+/3j9vz wq6cmD+lWTKS2V6jSJda8qgV1evAFM0wPtaQTLVXHAhl/6YmcMLqLfYV4YDx5hgtMB IE7/52i6IYujDrE0yKePhbASSNdTvWLRxHtIzNjNnBlqBZ3HlbbCU/L6z2dxLTlQaf eysv8Xv55VaDQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:02 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 2/9] nfnetlink/queue: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Ajit Khaparde , Alexey Kuznetsov , bridge@lists.linux-foundation.org, Cong Wang , "David S. Miller" , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , linux-rdma@vger.kernel.org, Mirko Lindner , Nikolay Aleksandrov , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- net/netfilter/nfnetlink_queue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 43041f087eb3..1ce30efe6854 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -1148,8 +1148,9 @@ static int nfqa_parse_bridge(struct nf_queue_entry *entry, if (!tb[NFQA_VLAN_TCI] || !tb[NFQA_VLAN_PROTO]) return -EINVAL; - entry->skb->vlan_tci = ntohs(nla_get_be16(tb[NFQA_VLAN_TCI])); - entry->skb->vlan_proto = nla_get_be16(tb[NFQA_VLAN_PROTO]); + __vlan_hwaccel_put_tag(entry->skb, + nla_get_be16(tb[NFQA_VLAN_PROTO]), + ntohs(nla_get_be16(tb[NFQA_VLAN_TCI]))); } if (nfqa[NFQA_L2HDR]) { From patchwork Thu Nov 8 23:18:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BB15175A for ; Thu, 8 Nov 2018 23:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DE112E7D4 for ; Thu, 8 Nov 2018 23:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 613FF2E7D6; Thu, 8 Nov 2018 23:18:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02E732E7FE for ; Thu, 8 Nov 2018 23:18:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727289AbeKIIz5 (ORCPT ); Fri, 9 Nov 2018 03:55:57 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:59122 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726926AbeKIIz4 (ORCPT ); Fri, 9 Nov 2018 03:55:56 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLm5Q31zXW; Fri, 9 Nov 2018 00:17:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719024; bh=IVVBSmwrquIo56fC2fNYc4DEAHn5Hh2VoiI664DBOt8=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=bG1HLOQHoNGKGWrjDuIyiPY5Nkf2ij7lMTSs4Bb13RqWvlDCZ4/E9AIdwfTKOuGk6 WF1cZZ0bbWD3YntRhkxHRZt7StOyg7+QqxzLlvsiafe6bNht/J5l5VnwczQWyiWdyZ kEFrHWYllPave6I0rVN0V5VigqhlQXYDb6ZgStzq/CsjCX3WTNgWmqjYcxqTQTOAS3 bKDktl/dfeUBAAcclbGoEo+rYcyGhItGbUWzVih5606sVv4Mxv3Re3mwE/2EPM4gzL de1Ysl448pqHqa2+5u/Y/G07/qAZWW8B8nbKiJwAzOWmG0NaJBwcXR+99dMnXTfgYL +BkbZ5BubCDPg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:02 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 3/9] net/core: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: "David S. Miller" , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Ajit Khaparde , Alexey Kuznetsov , bridge@lists.linux-foundation.org, coreteam@netfilter.org, Florian Westphal , Hideaki YOSHIFUJI , Jozsef Kadlecsik , linux-rdma@vger.kernel.org, Mirko Lindner , netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This removes assumptions about VLAN_TAG_PRESENT bit. Signed-off-by: Michał Mirosław --- net/core/dev.c | 8 +++++--- net/core/skbuff.c | 2 +- net/sched/act_vlan.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 0ffcbdd55fa9..bf7e0a471186 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4889,7 +4889,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc, * and set skb->priority like in vlan_do_receive() * For the time being, just ignore Priority Code Point */ - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); } type = skb->protocol; @@ -5386,7 +5386,9 @@ static struct list_head *gro_list_prepare(struct napi_struct *napi, } diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev; - diffs |= p->vlan_tci ^ skb->vlan_tci; + diffs |= skb_vlan_tag_present(p) ^ skb_vlan_tag_present(skb); + if (skb_vlan_tag_present(p)) + diffs |= p->vlan_tci ^ skb->vlan_tci; diffs |= skb_metadata_dst_cmp(p, skb); diffs |= skb_metadata_differs(p, skb); if (maclen == ETH_HLEN) @@ -5652,7 +5654,7 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) __skb_pull(skb, skb_headlen(skb)); /* restore the reserve we had after netdev_alloc_skb_ip_align() */ skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN - skb_headroom(skb)); - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); skb->dev = napi->dev; skb->skb_iif = 0; skb->encapsulation = 0; diff --git a/net/core/skbuff.c b/net/core/skbuff.c index b4ee5c8b928f..5bb5eb500605 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -5123,7 +5123,7 @@ int skb_vlan_pop(struct sk_buff *skb) int err; if (likely(skb_vlan_tag_present(skb))) { - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); } else { if (unlikely(!eth_type_vlan(skb->protocol))) return 0; diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c index ba677d54a7af..93fdaf707313 100644 --- a/net/sched/act_vlan.c +++ b/net/sched/act_vlan.c @@ -63,7 +63,7 @@ static int tcf_vlan_act(struct sk_buff *skb, const struct tc_action *a, /* extract existing tag (and guarantee no hw-accel tag) */ if (skb_vlan_tag_present(skb)) { tci = skb_vlan_tag_get(skb); - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); } else { /* in-payload vlan tag, pop it */ err = __skb_vlan_pop(skb, &tci); From patchwork Thu Nov 8 23:18:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D29C13BF for ; Thu, 8 Nov 2018 23:18:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C28D2E7FE for ; Thu, 8 Nov 2018 23:18:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D8122E817; Thu, 8 Nov 2018 23:18:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7E5E2E7FE for ; Thu, 8 Nov 2018 23:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbeKIIz5 (ORCPT ); Fri, 9 Nov 2018 03:55:57 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:65480 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727086AbeKIIz4 (ORCPT ); Fri, 9 Nov 2018 03:55:56 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLn25N4zdc; Fri, 9 Nov 2018 00:17:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719025; bh=Qc7PnMXGc8+FfHDHzLrLqc5PfyMzVK3ZXR888xiFvgE=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=Ve3N14x6Efv9F25iyjVT9uL761sMUveOcEy78JWbvd5aj25YROZY4GZEhqdimE9Px alVoUhxxY750SWqL1lFOH6t0ekzo9Ls+WrccudsZ79q8Ib2TbuIOanEE0e2R0tJR8x nhtyTYlB0f0xKMrwqjsjCiSYvCKREqFUPNJMHVWbcw2x8SEqOxdkT3IWPeIqJ63gss Qz+W9irOny4daCBrdBuJkYrfBvaY9f37juKQyDRugly7gs4vx/gkd0pDIC+DBIiL9D hMICZRcdp+m0DCFPVpUntMzjGflA8BTQf3TQATxq4i5jnakVRcZTRa/bqWpPCilPeQ Mi2fC5u8gkaXg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:03 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 4/9] 8021q: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: "David S. Miller" , Ajit Khaparde , Alexey Kuznetsov , bridge@lists.linux-foundation.org, Cong Wang , coreteam@netfilter.org, Florian Westphal , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , Jozsef Kadlecsik , linux-rdma@vger.kernel.org, Mirko Lindner , netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- net/8021q/vlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 4f60e86f4b8d..dd39489c829a 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@ -57,7 +57,7 @@ bool vlan_do_receive(struct sk_buff **skbp) } skb->priority = vlan_get_ingress_priority(vlan_dev, skb->vlan_tci); - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); rx_stats = this_cpu_ptr(vlan_dev_priv(vlan_dev)->vlan_pcpu_stats); From patchwork Thu Nov 8 23:18:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8CDD61709 for ; Thu, 8 Nov 2018 23:18:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BC9E2E7D4 for ; Thu, 8 Nov 2018 23:18:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6302E7FE; Thu, 8 Nov 2018 23:18:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10B7F2E7D4 for ; Thu, 8 Nov 2018 23:18:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbeKIIz6 (ORCPT ); Fri, 9 Nov 2018 03:55:58 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:60516 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727229AbeKIIz5 (ORCPT ); Fri, 9 Nov 2018 03:55:57 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLn454xzq9; Fri, 9 Nov 2018 00:17:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719025; bh=1xuJXtjV5hytt2iG1DL1iAAGIGKMbpAH6C9sfbCkKP4=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=SHpAS3J9lHBNoqqsyNZS2pz2CdzQ5W21xepSFdksvuCcKzxffzqohL/b8dLkF21qK 2EdTwkAkHKueGGozkoesxhHo8yjh8JQXz202d02WMRnPoORDwnYM5wp/M5rC/1lNuv HGRmtkQs1FomKPyfTRdz8uW0ldWpfQUFqvP+4G6MnLisUi4Zn3pul8IT7Zr4TmCQI+ E6+UU+G6sqfvUQ1TaX/UdQiClD6KEBLp0NAjmWZIve0XZFR+yY4PdF7cQUx0Qt3/Mx fVK4JPpqmHrIQ3sM1CuA0Wpi22Kt3n7bhLUOaO5tbBKotvJ2/1wynJVP1fooA1onyI zXAmwHvQtlRCw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:03 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 5/9] bridge: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux-foundation.org, Ajit Khaparde , Alexey Kuznetsov , Cong Wang , "David S. Miller" , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , linux-rdma@vger.kernel.org, Mirko Lindner , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This removes assumption than vlan_tci != 0 when tag is present. Signed-off-by: Michał Mirosław --- net/bridge/br_netfilter_hooks.c | 15 +++++++++------ net/bridge/br_private.h | 2 +- net/bridge/br_vlan.c | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c index b1b5e8516724..c9383c470a83 100644 --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c @@ -671,10 +671,8 @@ static int br_nf_push_frag_xmit(struct net *net, struct sock *sk, struct sk_buff return 0; } - if (data->vlan_tci) { - skb->vlan_tci = data->vlan_tci; - skb->vlan_proto = data->vlan_proto; - } + if (data->vlan_proto) + __vlan_hwaccel_put_tag(skb, data->vlan_proto, data->vlan_tci); skb_copy_to_linear_data_offset(skb, -data->size, data->mac, data->size); __skb_push(skb, data->encap_size); @@ -740,8 +738,13 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff data = this_cpu_ptr(&brnf_frag_data_storage); - data->vlan_tci = skb->vlan_tci; - data->vlan_proto = skb->vlan_proto; + if (skb_vlan_tag_present(skb)) { + data->vlan_tci = skb->vlan_tci; + data->vlan_proto = skb->vlan_proto; + } else { + data->vlan_proto = 0; + } + data->encap_size = nf_bridge_encap_header_len(skb); data->size = ETH_HLEN + data->encap_size; diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 2920e06a5403..67105c66584a 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -905,7 +905,7 @@ static inline int br_vlan_get_tag(const struct sk_buff *skb, u16 *vid) int err = 0; if (skb_vlan_tag_present(skb)) { - *vid = skb_vlan_tag_get(skb) & VLAN_VID_MASK; + *vid = skb_vlan_tag_get_id(skb); } else { *vid = 0; err = -EINVAL; diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 8c9297a01947..a7e869da21bf 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -420,7 +420,7 @@ struct sk_buff *br_handle_vlan(struct net_bridge *br, } if (v->flags & BRIDGE_VLAN_INFO_UNTAGGED) - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); if (p && (p->flags & BR_VLAN_TUNNEL) && br_handle_egress_vlan_tunnel(skb, v)) { @@ -493,8 +493,8 @@ static bool __allowed_ingress(const struct net_bridge *br, __vlan_hwaccel_put_tag(skb, br->vlan_proto, pvid); else /* Priority-tagged Frame. - * At this point, We know that skb->vlan_tci had - * VLAN_TAG_PRESENT bit and its VID field was 0x000. + * At this point, we know that skb->vlan_tci VID + * field was 0. * We update only VID field and preserve PCP field. */ skb->vlan_tci |= pvid; From patchwork Thu Nov 8 23:18:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77D621709 for ; Thu, 8 Nov 2018 23:18:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64E0729E14 for ; Thu, 8 Nov 2018 23:18:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56B3829A57; Thu, 8 Nov 2018 23:18:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC3C52DD82 for ; Thu, 8 Nov 2018 23:18:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbeKII4N (ORCPT ); Fri, 9 Nov 2018 03:56:13 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:41408 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbeKIIz5 (ORCPT ); Fri, 9 Nov 2018 03:55:57 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLp0QMfzrd; Fri, 9 Nov 2018 00:17:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719026; bh=rQIk5+P6EcKbWCWWr4OJqJ7q7H1OwU7fRELwhVstikA=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=UkhaiBA+o23XBWOGgOTA8QeUNAg1nhSaXia4a1Aa1JCOtzTNvWYWQ6f0cidWjXFVK SVgkbZXmTIOziWVUQyhCiA3x1r94dKWyEdYCIgXq8zZqAF/zV8sz8I6uSkJYvx3+cM gSLHfb1Akc6FbUTBAaDU0XZYUcdKRbaXOKAEA5IOw+2F85dBaSwW0M+cBNiUP3CG7f IDoms3XqjeW9Sp4GfHQ5s/yrFgLgtwe+2MtoVIKVApjZ4rKtI8wc64oCu9CAicl5GH pPPWRdiT5OASVIn0o3pBG3S6EoSDSlh1oYUwUi46GoE3PryGSpEwL48ufzMLX7/vwp TIQ4tA/W9vvgA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:04 +0100 Message-Id: <53209e7c5fd949ac69087902ad42b1831eec0727.1541718583.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 6/9] ipv4/tunnel: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Ajit Khaparde , bridge@lists.linux-foundation.org, Cong Wang , coreteam@netfilter.org, Florian Westphal , Jamal Hadi Salim , Jiri Pirko , Jozsef Kadlecsik , linux-rdma@vger.kernel.org, Mirko Lindner , netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- net/ipv4/ip_tunnel_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index dde671e97829..f45b96d715f0 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -120,7 +120,7 @@ int __iptunnel_pull_header(struct sk_buff *skb, int hdr_len, } skb_clear_hash_if_not_l4(skb); - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); skb_set_queue_mapping(skb, 0); skb_scrub_packet(skb, xnet); From patchwork Thu Nov 8 23:18:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFFB213BF for ; Thu, 8 Nov 2018 23:18:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D17592E7FE for ; Thu, 8 Nov 2018 23:18:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2BE72E817; Thu, 8 Nov 2018 23:18:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FBF42E7FE for ; Thu, 8 Nov 2018 23:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbeKII4G (ORCPT ); Fri, 9 Nov 2018 03:56:06 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:4793 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbeKIIz6 (ORCPT ); Fri, 9 Nov 2018 03:55:58 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLp55vJzt1; Fri, 9 Nov 2018 00:17:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719026; bh=Z+HNaM5fXyVuKUciR7QSnLsdYJK4FdXmDw4Sv4STP4I=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=IouwOZhEURVgmCgVYXMvjKvX41KQpKfCuBLDv8+wUi7LGkRb1rO0kRGHPj4VkshZn eO1OS6l9+6qUiMxhh54jPLRqCs1mdpvjDKlwe/0O2EccRABJoYKY8On+omibR2I8/H 0zWYokVTsV0FUps3v6GZNza/8h1HYwteulzOOVMIX8mLlHTnohbfJg8pPzU3SHh7cn LHl7paCWDDbIfE7I7oCoWvnfB4cP3g4d5ycQqu4ELenfYJVHC6BZ45KZMoQ/LbrndW GR3YOeOTXPeJsFtdX1EnCxlMKd/lDOLiISOZL3b5gieUdMfVQDVubUU7EEK9dn81Fe k/61gM58lIi1g== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:04 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 7/9] benet: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Sathya Perla , Ajit Khaparde , Sriharsha Basavapatna , Somnath Kotur , Alexey Kuznetsov , bridge@lists.linux-foundation.org, Cong Wang , coreteam@netfilter.org, "David S. Miller" , Florian Westphal , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , Jozsef Kadlecsik , linux-rdma@vger.kernel.org, Mirko Lindner , netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Stephen Hemminger , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- drivers/net/ethernet/emulex/benet/be_main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index c5ad7a4f4d83..80b2bd3747ce 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -1049,30 +1049,35 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter, struct be_wrb_params *wrb_params) { + bool insert_vlan = false; u16 vlan_tag = 0; skb = skb_share_check(skb, GFP_ATOMIC); if (unlikely(!skb)) return skb; - if (skb_vlan_tag_present(skb)) + if (skb_vlan_tag_present(skb)) { vlan_tag = be_get_tx_vlan_tag(adapter, skb); + insert_vlan = true; + } if (qnq_async_evt_rcvd(adapter) && adapter->pvid) { - if (!vlan_tag) + if (!insert_vlan) { vlan_tag = adapter->pvid; + insert_vlan = true; + } /* f/w workaround to set skip_hw_vlan = 1, informs the F/W to * skip VLAN insertion */ BE_WRB_F_SET(wrb_params->features, VLAN_SKIP_HW, 1); } - if (vlan_tag) { + if (insert_vlan) { skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q), vlan_tag); if (unlikely(!skb)) return skb; - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); } /* Insert the outer VLAN, if any */ From patchwork Thu Nov 8 23:18:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D06C81709 for ; Thu, 8 Nov 2018 23:18:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C16022E7D4 for ; Thu, 8 Nov 2018 23:18:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B54212E7FE; Thu, 8 Nov 2018 23:18:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D0A82E7D4 for ; Thu, 8 Nov 2018 23:18:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbeKII4A (ORCPT ); Fri, 9 Nov 2018 03:56:00 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:16913 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727266AbeKIIz6 (ORCPT ); Fri, 9 Nov 2018 03:55:58 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLq3KYSztB; Fri, 9 Nov 2018 00:17:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719027; bh=+V3+AUMQPKtkxFH3ehE7O1MLwvQaBOyn0pjvj94G9oo=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=pprk+kLyw8OzfR+bti/Oxd8h8O2w8j7xRDdt85CJiYfG7E62ceMEkneGIGX9CS8O0 /e/izFIIKK6oXDjJI5ie1xHunB+WjhgaLafm/mGBMqEO+2i50pDRyHVJGXDGC6xJef +OWMfBYlXb/hoX2/lX0wbXxdtvBjD6vyuqro0cJWA8PydktrycQz24aCtZRj2q/2cB 0OzUOcTvKGbYjglfnCELzgv2Hq7iuxVUbO2VqcHuRmdGO8kJ49nsqgVlMrs21tyXA7 KVrEDl69hQxjTNDk78LNsUNkGbsMCfDpCzUiaU9WsVK0CZ+C+tOpxXWzw6GQPUHshH hWMO4cPFQ9ISQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:05 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 8/9] mlx4: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Tariq Toukan , linux-rdma@vger.kernel.org, Ajit Khaparde , Alexey Kuznetsov , bridge@lists.linux-foundation.org, Cong Wang , coreteam@netfilter.org, "David S. Miller" , Florian Westphal , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , Jozsef Kadlecsik , Mirko Lindner , netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Stephen Hemminger , Steve Wise Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index db00bf1c23f5..fd09ba98c0a6 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -875,7 +875,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud skb->data_len = length; napi_gro_frags(&cq->napi); } else { - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); skb_clear_hash(skb); } next: From patchwork Thu Nov 8 23:18:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10675119 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B97F713BF for ; Thu, 8 Nov 2018 23:18:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7B4C2E7D4 for ; Thu, 8 Nov 2018 23:18:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B5432E7FE; Thu, 8 Nov 2018 23:18:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506CC2E7D4 for ; Thu, 8 Nov 2018 23:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726834AbeKIIz7 (ORCPT ); Fri, 9 Nov 2018 03:55:59 -0500 Received: from rere.qmqm.pl ([91.227.64.183]:24510 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727288AbeKIIz7 (ORCPT ); Fri, 9 Nov 2018 03:55:59 -0500 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42rfLr24l2ztH; Fri, 9 Nov 2018 00:17:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541719028; bh=3wDeYD4VmsoLNLbqsekb+klJ4WktHlfpxdIiUmnFndM=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=ReYwzfr38BuwpsfvT9Y+jXF9rErvgKxPev1TppuzV1RRcaDqiq0vyeVeSJINJY0v0 35Z/ZHRXy6EGiVt5Hwa9tFu2+19CAZhz3lYTzQUQHq+56txZ7B31iuSqXiFzlw7Sm7 +GO3PHuz9vbA9CFsP2iqt0JDuuJbOpBUXskbjGUS4rio5Iaj4OO0wuPW1amJnlrVfE 42YfkbHFm/Agq4mgok+Km4BrDV9RyFi0gCLAO7lLuLS/G22h4L6IsALZB3H/mOSh3n HLBZceoVKMtZISQCDtWhKFvwn/dYdI1rJcNrJOpp5Nlk1nwO8ZDaP4NOLjYbxbmZ1i AoCyxK59OTR2g== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Fri, 09 Nov 2018 00:18:06 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH net-next 9/9] sky2: use __vlan_hwaccel helpers MIME-Version: 1.0 To: netdev@vger.kernel.org Cc: Mirko Lindner , Stephen Hemminger , Ajit Khaparde , Alexey Kuznetsov , bridge@lists.linux-foundation.org, Cong Wang , coreteam@netfilter.org, "David S. Miller" , Florian Westphal , Hideaki YOSHIFUJI , Jamal Hadi Salim , Jiri Pirko , Jozsef Kadlecsik , linux-rdma@vger.kernel.org, netfilter-devel@vger.kernel.org, Nikolay Aleksandrov , Pablo Neira Ayuso , Roopa Prabhu , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , Steve Wise , Tariq Toukan Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- drivers/net/ethernet/marvell/sky2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 697d9b374f5e..c7cd0081058e 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -2485,13 +2485,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, skb->ip_summed = re->skb->ip_summed; skb->csum = re->skb->csum; skb_copy_hash(skb, re->skb); - skb->vlan_proto = re->skb->vlan_proto; - skb->vlan_tci = re->skb->vlan_tci; + __vlan_hwaccel_copy_tag(skb, re->skb); pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, length, PCI_DMA_FROMDEVICE); - re->skb->vlan_proto = 0; - re->skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(re->skb); skb_clear_hash(re->skb); re->skb->ip_summed = CHECKSUM_NONE; skb_put(skb, length);