netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Rose <gvrose8192-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Joe Stringer <joe-LZ6Gd1LRuIk@public.gmane.org>
Cc: ovs dev <dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org>,
	netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH net] openvswitch: Fix for force/commit action failures
Date: Fri, 14 Jul 2017 11:44:07 -0700	[thread overview]
Message-ID: <b16bc01a-38e9-5d0f-eedd-f29d0354834f@gmail.com> (raw)
In-Reply-To: <CAPWQB7F2uw1hTmbbzQS6bjy15EbGO26LmFpUXzLSwmCt_N31Xw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 07/14/2017 11:42 AM, Joe Stringer wrote:
> On 14 July 2017 at 09:10, Greg Rose <gvrose8192-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > When there is an established connection in direction A->B, it is
> > possible to receive a packet on port B which then executes
> > ct(commit,force) without first performing ct() - ie, a lookup.
> > In this case, we would expect that this packet can delete the existing
> > entry so that we can commit a connection with direction B->A. However,
> > currently we only perform a check in skb_nfct_cached() for whether
> > OVS_CS_F_TRACKED is set and OVS_CS_F_INVALID is not set, ie that a
> > lookup previously occurred. In the above scenario, a lookup has not
> > occurred but we should still be able to statelessly look up the
> > existing entry and potentially delete the entry if it is in the
> > opposite direction.
> >
> > This patch extends the check to also hint that if the action has the
> > force flag set, then we will lookup the existing entry so that the
> > force check at the end of skb_nfct_cached has the ability to delete
> > the connection.
> >
> > Fixes: dd41d330b03 ("openvswitch: Add force commit.")
> > CC: Pravin Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
> > CC: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org
> > Signed-off-by: Joe Stringer <joe-LZ6Gd1LRuIk@public.gmane.org>
> > Signed-off-by: Greg Rose <gvrose8192-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >   net/openvswitch/conntrack.c | 50 +++++++++++++++++++++++++++++++--------------
> >   1 file changed, 35 insertions(+), 15 deletions(-)
> >
> > diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
> > index 08679eb..1260f2b 100644
> > --- a/net/openvswitch/conntrack.c
> > +++ b/net/openvswitch/conntrack.c
> > @@ -629,6 +629,33 @@ static int handle_fragments(struct net *net, struct sw_flow_key *key,
> >          return ct;
> >   }
> >
> > +struct nf_conn *ovs_ct_executed(struct net *net,
> > +                               const struct sw_flow_key *key,
> > +                               const struct ovs_conntrack_info *info,
> > +                               struct sk_buff *skb,
> > +                               bool *ct_executed)
>
> Actually, some compilers will report this new warning:
> net/openvswitch/conntrack.c:632:16: warning: symbol 'ovs_ct_executed'
> was not declared. Should it be static?
>
> Could you make this function static and repost?
>
> Thanks.
>
Yes, I just saw that too.  Need to update my compiler for my primary build machine.  I'll send a V2...

Thanks!

- Greg

      parent reply	other threads:[~2017-07-14 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 16:10 [PATCH net] openvswitch: Fix for force/commit action failures Greg Rose
     [not found] ` <1500048639-24169-1-git-send-email-gvrose8192-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-14 18:29   ` Joe Stringer
2017-07-14 18:42   ` Joe Stringer
     [not found]     ` <CAPWQB7F2uw1hTmbbzQS6bjy15EbGO26LmFpUXzLSwmCt_N31Xw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-14 18:44       ` Greg Rose [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=b16bc01a-38e9-5d0f-eedd-f29d0354834f@gmail.com \
    --to=gvrose8192-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
    --cc=joe-LZ6Gd1LRuIk@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).