From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Thomas F Herbert <thomasfherbert@gmail.com>,
netdev@vger.kernel.org, pshelar@nicira.com
Cc: therbert@redhat.com, dev@openvswitch.org
Subject: Re: [PATCH net-next V15 2/3] Check for vlan ethernet types for 8021.q or 802.1ad
Date: Mon, 12 Oct 2015 16:52:07 +0300 [thread overview]
Message-ID: <561BBB07.1040202@cogentembedded.com> (raw)
In-Reply-To: <1444520433-1958-3-git-send-email-thomasfherbert@gmail.com>
Hello.
On 10/11/2015 2:40 AM, Thomas F Herbert wrote:
> Signed-off-by: Thomas F Herbert <thomasfherbert@gmail.com>
> ---
> include/linux/if_vlan.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> index 67ce5bd..88d1be4 100644
> --- a/include/linux/if_vlan.h
> +++ b/include/linux/if_vlan.h
> @@ -627,6 +627,23 @@ static inline netdev_features_t vlan_features_check(const struct sk_buff *skb,
>
> return features;
> }
> +/**
> + * eth_type_vlan - check for valid vlan ether type.
> + * @ethertype: ether type to check
> + *
> + * Returns true if the ether type is a vlan ether type.
> + */
> +static inline bool eth_type_vlan(__be16 ethertype)
> +{
> + switch (ethertype) {
> + case (htons(ETH_P_8021Q)):
> + return true;
> + case (htons(ETH_P_8021AD)):
> + return true;
I'm not sure if I've already suggested that or not but why not merge these
2 cases?
> + default:
> + return false;
> + }
> +}
[...]
MBR, Sergei
next prev parent reply other threads:[~2015-10-12 13:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 23:40 [PATCH net-next V15 0/3] openvswitch: Add support for 802.1ad Thomas F Herbert
[not found] ` <1444520433-1958-1-git-send-email-thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-10 23:40 ` [PATCH net-next V15 1/3] openvswitch: 802.1ad uapi changes Thomas F Herbert
2015-10-10 23:40 ` [PATCH net-next V15 3/3] 802.1AD: Flow handling, actions, vlan parsing and netlink attributes Thomas F Herbert
2015-10-13 6:47 ` Pravin Shelar
[not found] ` <CALnjE+qdqBrzZ_p6RCHLr63tSWTKPnTWhQuWsJ8dvAmq-bf9rQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-13 17:39 ` Thomas F Herbert
2015-10-13 18:14 ` Pravin Shelar
[not found] ` <CALnjE+rFgnRZ0awed1eox62zEeFKaCXoAucv6wS4MVBFK_RLRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-15 12:50 ` Thomas F Herbert
2015-10-10 23:40 ` [PATCH net-next V15 2/3] Check for vlan ethernet types for 8021.q or 802.1ad Thomas F Herbert
2015-10-12 13:52 ` Sergei Shtylyov [this message]
2015-10-13 2:58 ` [PATCH net-next V15 0/3] openvswitch: Add support for 802.1ad David Miller
2015-10-13 6:48 ` Pravin Shelar
[not found] ` <20151012.195841.292062617131376194.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-10-13 8:47 ` Thomas F Herbert
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=561BBB07.1040202@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=dev@openvswitch.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=therbert@redhat.com \
--cc=thomasfherbert@gmail.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).