From: Joe Stringer <joestringer@nicira.com>
To: Pravin Shelar <pshelar@nicira.com>
Cc: "dev@openvswitch.org" <dev@openvswitch.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCHv10 ovs 12/15] datapath: Add support for unique flow identifiers.
Date: Thu, 20 Nov 2014 10:57:34 -0800 [thread overview]
Message-ID: <201411201057.35003.joestringer@nicira.com> (raw)
In-Reply-To: <CALnjE+qwnKa-s1GoZRvh-RgjRO5eKvrf+XnvD_meGES1L=fe0w@mail.gmail.com>
On Wednesday, November 19, 2014 16:39:20 Pravin Shelar wrote:
> On Wed, Nov 19, 2014 at 4:20 PM, Joe Stringer <joestringer@nicira.com>
wrote:
> > On Wednesday, November 19, 2014 15:34:24 Pravin Shelar wrote:
> >> On Thu, Nov 13, 2014 at 11:17 AM, Joe Stringer <joestringer@nicira.com>
> >
> > wrote:
> >> > @@ -684,33 +691,43 @@ static size_t ovs_flow_cmd_msg_size(const struct
> >> > sw_flow_actions *acts)
> >> >
> >> > /* Called with ovs_mutex or RCU read lock. */
> >> > static int ovs_flow_cmd_fill_match(const struct sw_flow *flow,
> >> >
> >> > - struct sk_buff *skb)
> >> > + struct sk_buff *skb, u32
> >> > ufid_flags)
> >> >
> >> > {
> >> >
> >> > struct nlattr *nla;
> >> > int err;
> >> >
> >> > - /* Fill flow key. */
> >> > - nla = nla_nest_start(skb, OVS_FLOW_ATTR_KEY);
> >> > - if (!nla)
> >> > - return -EMSGSIZE;
> >> > -
> >> > - err = ovs_nla_put_flow(&flow->unmasked_key,
> >> > &flow->unmasked_key, skb, - false);
> >> > - if (err)
> >> > - return err;
> >> > -
> >> > - nla_nest_end(skb, nla);
> >> > + /* Fill flow key. If userspace didn't specify a UFID, then
> >> > ignore the + * OMIT_KEY flag. */
> >> > + if (!(ufid_flags & OVS_UFID_F_OMIT_KEY) ||
> >> > + !flow->index_by_ufid) {
> >>
> >> I am not sure about this check, userspace needs to send atleast ufid
> >> or the unmasked key as id for flow. otherwise we shld flag error. Here
> >> we can serialize flow->key.
> >> There could be another function which takes care of flow-id
> >> serialization where we serialize use ufid or unmasked key as flow id.
> >> Lets group ufid and unmasked key together rather than masked key and
> >> unmasked key which are not related.
> >
> > Right, at flow setup time the flow key is always required, but the UFID
> > is optional. For most other cases, one of the two most be specified. For
> > flow dump, neither is required from userspace, but OMIT_KEY flag may be
> > raised. That's the particular case that this logic is trying to catch
> > (dump all flows, including those that were set up without UFID - in
> > which case the OMIT_KEY flag doesn't make sense, so treat the flag like
> > a request rather than a command).
>
> How do you handle overlapping flows without the flow id in dump operation?
In userspace? revalidators will dump flows, then if the flow-key is exactly the
same as another flow then they will be hashed to the same udpif_key and the
second flow will be ignored each dump. So, stats may get messed up. If they
differ but overlap, they will hash to different udpif_keys and stats tracked
separately. Revalidator won't check the validity of overlapping flows until the
next change to ofproto-dpif.
next prev parent reply other threads:[~2014-11-20 19:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 19:17 [PATCHv10 ovs 00/15] Revalidate flows with unique identifiers Joe Stringer
2014-11-13 19:17 ` [PATCHv10 ovs 03/15] datapath: Add 'is_mask' to ovs_nla_put_flow() Joe Stringer
[not found] ` <1415906275-3172-4-git-send-email-joestringer-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-11-21 0:15 ` Joe Stringer
2014-11-21 18:17 ` Pravin Shelar
2014-11-13 19:17 ` [PATCHv10 ovs 12/15] datapath: Add support for unique flow identifiers Joe Stringer
2014-11-19 23:34 ` Pravin Shelar
2014-11-20 0:20 ` Joe Stringer
2014-11-20 0:39 ` Pravin Shelar
2014-11-20 18:57 ` Joe Stringer [this message]
2014-11-21 0:33 ` Joe Stringer
2014-11-21 18:08 ` Pravin Shelar
2014-11-25 19:45 ` [PATCHv10 ovs 00/15] Revalidate flows with unique identifiers Joe Stringer
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=201411201057.35003.joestringer@nicira.com \
--to=joestringer@nicira.com \
--cc=dev@openvswitch.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.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).