From: Thomas F Herbert <thomasfherbert@gmail.com>
To: Albino B Neto <bino@bino.us>
Cc: netdev@vger.kernel.org, pshelar@nicira.com, therbert@redhat.com,
dev@openvswitch.org
Subject: Re: [PATCH net-next V17 2/3] Check for vlan ethernet types for 8021.q or 802.1ad
Date: Tue, 27 Oct 2015 08:04:44 -0400 [thread overview]
Message-ID: <562F685C.2000806@gmail.com> (raw)
In-Reply-To: <CAMu38xJ4UhALjFn05emEZSA0pBHtqsA13YyR7N2J0VeytO6sUw@mail.gmail.com>
On 10/26/15 8:14 AM, Albino B Neto wrote:
> 2015-10-25 22:11 GMT-02:00 Thomas F Herbert <thomasfherbert@gmail.com>:
>> Signed-off-by: Thomas F Herbert <thomasfherbert@gmail.com>
>> ---
>> include/linux/if_vlan.h | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
>> index 67ce5bd..d2494b5 100644
>> --- a/include/linux/if_vlan.h
>> +++ b/include/linux/if_vlan.h
>> @@ -627,6 +627,22 @@ 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):
>> + case htons(ETH_P_8021AD):
>> + return true;
>> + default:
>> + return false;
>> + }
>> +}
>>
>> /**
>> * compare_vlan_header - Compare two vlan headers
> Description ?
This patch simplifies the code for openvswitch and potential other vlan
code and drivers. There are at least two valid ether types for vlans and
this code simplifies the openvswitch kernel module by simplifying code
that checks for the presence of vlans. Do you want me to annotate the
commit with additional description?
>
> Albino
next prev parent reply other threads:[~2015-10-27 12:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 0:11 [PATCH net-next V18 0/3] openvswitch: Add support for 802.1ad Thomas F Herbert
[not found] ` <1445818286-4870-1-git-send-email-thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-26 0:11 ` [PATCH net-next V17 1/3] openvswitch: 802.1ad uapi changes Thomas F Herbert
2015-10-26 0:11 ` [PATCH net-next V17 2/3] Check for vlan ethernet types for 8021.q or 802.1ad Thomas F Herbert
2015-10-26 12:14 ` Albino B Neto
2015-10-27 12:04 ` Thomas F Herbert [this message]
2015-10-26 0:11 ` [PATCH net-next V18 3/3] 802.1AD: Flow handling, actions, vlan parsing and netlink attributes Thomas F Herbert
[not found] ` <1445818286-4870-4-git-send-email-thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-27 2:10 ` Pravin Shelar
[not found] ` <CALnjE+rcP1trUt2zSSGoUF9r1XwNgtRiLgsS2soejhd4j0zyHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-27 16:45 ` Thomas F Herbert
[not found] ` <562FAA0E.4090908-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-27 17:22 ` Pravin Shelar
2015-10-29 23:47 ` Thomas F Herbert
-- strict thread matches above, loose matches on Subject: below --
2015-10-18 1:12 [PATCH net-next V17 0/3] openvswitch: Add support for 802.1ad Thomas F Herbert
[not found] ` <1445130748-27671-1-git-send-email-thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-18 1:12 ` [PATCH net-next V17 2/3] Check for vlan ethernet types for 8021.q or 802.1ad Thomas F Herbert
[not found] ` <1445130748-27671-3-git-send-email-thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-19 18:20 ` Pravin Shelar
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=562F685C.2000806@gmail.com \
--to=thomasfherbert@gmail.com \
--cc=bino@bino.us \
--cc=dev@openvswitch.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=therbert@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.