From: Nikolay Aleksandrov <nikolay@nvidia.com>
To: <menglong8.dong@gmail.com>, <kuba@kernel.org>
Cc: <roopa@nvidia.com>, <davem@davemloft.net>,
<bridge@lists.linux-foundation.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Menglong Dong <dong.menglong@zte.com.cn>
Subject: Re: [PATCH net-next] net: bridge: use eth_type_vlan in br_dev_queue_push_xmit
Date: Thu, 14 Jan 2021 19:51:17 +0200 [thread overview]
Message-ID: <547a00ff-cc4a-05de-b3c5-14266a3b90e5@nvidia.com> (raw)
In-Reply-To: <20210114075101.6501-1-dong.menglong@zte.com.cn>
On 14/01/2021 09:51, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
>
> Replace the check for ETH_P_8021Q and ETH_P_8021AD in
> br_dev_queue_push_xmit with eth_type_vlan.
>
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> ---
> net/bridge/br_forward.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
> index e28ffadd1371..6e9b049ae521 100644
> --- a/net/bridge/br_forward.c
> +++ b/net/bridge/br_forward.c
> @@ -39,8 +39,7 @@ int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb
> br_drop_fake_rtable(skb);
>
> if (skb->ip_summed == CHECKSUM_PARTIAL &&
> - (skb->protocol == htons(ETH_P_8021Q) ||
> - skb->protocol == htons(ETH_P_8021AD))) {
> + eth_type_vlan(skb->protocol)) {
> int depth;
>
> if (!__vlan_get_protocol(skb, skb->protocol, &depth))
>
Please change all similar checks, there are also:
br_netlink.c - br_validate()
br_vlan.c - br_vlan_set_proto()
Thanks.
prev parent reply other threads:[~2021-01-14 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 7:51 [PATCH net-next] net: bridge: use eth_type_vlan in br_dev_queue_push_xmit menglong8.dong
2021-01-14 17:51 ` Nikolay Aleksandrov [this message]
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=547a00ff-cc4a-05de-b3c5-14266a3b90e5@nvidia.com \
--to=nikolay@nvidia.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dong.menglong@zte.com.cn \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menglong8.dong@gmail.com \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).