From: Kangmin Park <l4stpr0gr4m@gmail.com>
To: Roopa Prabhu <roopa@nvidia.com>
Cc: Nikolay Aleksandrov <nikolay@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
bridge@lists.linux-foundation.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next] net: bridge: replace __vlan_hwaccel_put_tag with skb_vlan_push
Date: Mon, 23 Aug 2021 15:19:38 +0900 [thread overview]
Message-ID: <20210823061938.28240-1-l4stpr0gr4m@gmail.com> (raw)
br_handle_ingress_vlan_tunnel() is called in br_handle_frame() and
goto drop when br_handle_ingress_vlan_tunnel() return non-zero.
But, br_handle_ingress_vlan_tunnel() always return 0. So, the goto
routine is currently meaningless.
However, paired function br_handle_egress_vlan_tunnel() call
skb_vlan_pop(). So, change br_handle_ingress_vlan_tunnel() to call
skb_vlan_push() instead of __vlan_hwaccel_put_tag(). And return
the return value of skb_vlan_push().
Signed-off-by: Kangmin Park <l4stpr0gr4m@gmail.com>
---
net/bridge/br_vlan_tunnel.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/bridge/br_vlan_tunnel.c b/net/bridge/br_vlan_tunnel.c
index 01017448ebde..7b5a33dc9d4d 100644
--- a/net/bridge/br_vlan_tunnel.c
+++ b/net/bridge/br_vlan_tunnel.c
@@ -179,9 +179,7 @@ int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,
skb_dst_drop(skb);
- __vlan_hwaccel_put_tag(skb, p->br->vlan_proto, vlan->vid);
-
- return 0;
+ return skb_vlan_push(skb, p->br->vlan_proto, vlan->vid);
}
int br_handle_egress_vlan_tunnel(struct sk_buff *skb,
--
2.26.2
next reply other threads:[~2021-08-23 6:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 6:19 Kangmin Park [this message]
2021-08-23 9:00 ` [PATCH net-next] net: bridge: replace __vlan_hwaccel_put_tag with skb_vlan_push Nikolay Aleksandrov
2021-08-23 9:12 ` Kangmin Park
2021-08-23 9:15 ` Nikolay Aleksandrov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210823061938.28240-1-l4stpr0gr4m@gmail.com \
--to=l4stpr0gr4m@gmail.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=roopa@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox