All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas F Herbert <therbert@redhat.com>
To: Pravin Shelar <pshelar@nicira.com>,
	Thomas F Herbert <thomasfherbert@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	"dev@openvswitch.org" <dev@openvswitch.org>
Subject: Re: [PATCH net-next V10 4/4] 8021AD: Flow key parsing and netlink attributes.
Date: Tue, 09 Jun 2015 20:13:14 -0400	[thread overview]
Message-ID: <5577811A.502@redhat.com> (raw)
In-Reply-To: <CALnjE+ocDvv3q4Jx0rc8TCk2TmJkK3cU5EBnZ14T6HSteU1JXQ@mail.gmail.com>



On 6/8/15 11:45 PM, Pravin Shelar wrote:
> On Tue, Jun 2, 2015 at 10:50 AM, Thomas F Herbert
> <thomasfherbert@gmail.com> wrote:
>> Add support for 802.1ad to netlink parsing and flow conversation. Uses
>> double nested encap attributes to represent double tagged vlan.
>>
> This patch needs to be merged with earlier patch since it is part of
> qinq support.
>
>> Signed-off-by: Thomas F Herbert <thomasfherbert@gmail.com>
>> ---
>>   net/openvswitch/flow_netlink.c | 186 ++++++++++++++++++++++++++++++++++-------
>>   1 file changed, 157 insertions(+), 29 deletions(-)
>>
>> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
>> index c691b1a..8fd4f63 100644
>> --- a/net/openvswitch/flow_netlink.c
>> +++ b/net/openvswitch/flow_netlink.c
>> @@ -771,6 +771,28 @@ static int metadata_from_nlattrs(struct sw_flow_match *match,  u64 *attrs,
> ...
>>                  err = ovs_key_from_nlattrs(match, mask_attrs, a, true, log);
>> @@ -1331,6 +1439,25 @@ static int __ovs_nla_put_key(const struct sw_flow_key *swkey,
>>                  encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP);
>>                  if (!swkey->eth.tci)
>>                          goto unencap;
>> +       } else if (swkey->eth.ctci || swkey->eth.type == htons(ETH_P_8021AD)) {
>> +               __be16 eth_type;
>> +
>> +               eth_type = !is_mask ? htons(ETH_P_8021AD) : htons(0xffff);
>> +               if (nla_put_be16(skb, OVS_KEY_ATTR_ETHERTYPE, eth_type) ||
>> +                   nla_put_be16(skb, OVS_KEY_ATTR_VLAN, output->eth.tci))
>> +                       goto nla_put_failure;
>> +               encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP);
>> +               if (!swkey->eth.tci)
>> +                       goto unencap;
>> +               /* Customer tci is nested but uses same key attribute.
>> +                */
>> +               eth_type = !is_mask ? htons(ETH_P_8021Q) : htons(0xffff);
>> +               if (nla_put_be16(skb, OVS_KEY_ATTR_ETHERTYPE, eth_type) ||
>> +                   nla_put_be16(skb, OVS_KEY_ATTR_VLAN, output->eth.ctci))
>> +                       goto nla_put_failure;
>> +               encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP);
>> +               if (!swkey->eth.ctci)
>> +                       goto unencap;
>>          } else
>>                  encap = NULL;
>>
> For qinq we need to keep track of two encap attributes to finalize
> nesting of attributes.
Thanks! This was an oversight on my part and I am fixing it in V11.
>

      reply	other threads:[~2015-06-10  0:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 17:50 [PATCH net-next V10 0/4] openvswitch: Add support for 802.1AD Thomas F Herbert
     [not found] ` <1433267444-26025-1-git-send-email-thomasfherbert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-02 17:50   ` [PATCH net-next V10 1/4] openvswitch: 802.1ad uapi changes Thomas F Herbert
2015-06-02 17:50 ` [PATCH net-next V10 2/4] General check for vlan ethernet types Thomas F Herbert
2015-06-02 17:50 ` [PATCH net-next V10 3/4] 802.1AD: Flow handling, actions and vlan parsing Thomas F Herbert
2015-06-04 17:45   ` Pravin Shelar
     [not found]     ` <CALnjE+p8tuUFoXOFvfrp154rb80o_8XhtJ+Z8RrL1Y67kw12jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-04 18:18       ` Thomas F Herbert
2015-06-04 20:39         ` Pravin Shelar
2015-06-04 22:00           ` Thomas F Herbert
2015-06-02 17:50 ` [PATCH net-next V10 4/4] 8021AD: Flow key parsing and netlink attributes Thomas F Herbert
2015-06-09  3:45   ` Pravin Shelar
2015-06-10  0:13     ` Thomas F Herbert [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=5577811A.502@redhat.com \
    --to=therbert@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.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 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.