netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: Ilya Maximets <i.maximets@ovn.org>,
	network dev <netdev@vger.kernel.org>,
	dev@openvswitch.org,
	 Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	 Davide Caratti <dcaratti@redhat.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	 Eric Dumazet <edumazet@google.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	kuba@kernel.org,  Paolo Abeni <pabeni@redhat.com>,
	davem@davemloft.net,  Pablo Neira Ayuso <pablo@netfilter.org>,
	Aaron Conole <aconole@redhat.com>
Subject: Re: [PATCH net-next 3/3] openvswitch: set IPS_CONFIRMED in tmpl status only when commit is set in conntrack
Date: Mon, 8 Jul 2024 21:49:54 -0400	[thread overview]
Message-ID: <CADvbK_cYpB07dvyMSGOU3XsAJmZV_feb76hVg9tCJeFjs5iuxA@mail.gmail.com> (raw)
In-Reply-To: <20240708223839.GA18283@breakpoint.cc>

On Mon, Jul 8, 2024 at 6:38 PM Florian Westphal <fw@strlen.de> wrote:
>
> Xin Long <lucien.xin@gmail.com> wrote:
> > I can avoid this warning by not allocating ext for commit ct in ovs:
> >
> > @@ -426,7 +426,7 @@ static int ovs_ct_set_labels(struct nf_conn *ct,
> > struct sw_flow_key *key,
> >         struct nf_conn_labels *cl;
> >         int err;
> >
> > -       cl = ovs_ct_get_conn_labels(ct);
> > +       cl = nf_ct_labels_find(ct);
> >         if (!cl)
> >                 return -ENOSPC;
ovs_ct_get_conn_labels() must be replaced with nf_ct_labels_find() in here
anyway, thinking that the confirmed ct without labels was created in other
places (not by OVS conntrack), the warning may still be triggered when
trying to set labels in OVS after.

> >
> > However, the test case would fail, although the failure can be worked around
> > by setting ct_label in the 1st rule:
> >
> >   table=0,priority=30,in_port=1,ip,nw_dst=172.1.1.2,actions=ct(commit,nat(dst=10.1.1.2:80),exec(set_field:0x01->ct_label),table=1)
> >
> > So I'm worrying our change may break some existing OVS user cases.
>
> Then ovs_ct_limit_init() and nf_connlabels_get() need to be called
> once on the first conntrack operatation, regardless if labels are asked
> for or not.
>
> Not nice but still better than current state.
Right, not nice, it undermines the bits check against NF_CT_LABELS_MAX_SIZE.

>
> ovs_ct_execute() perhaps?
ovs_ct_execute() is in the hot path, and a better place would be
ovs_ct_copy_action() where the ct for an ovs flow is added.

  reply	other threads:[~2024-07-09  1:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-16 21:09 [PATCH net-next 0/3] net: handle the exp removal problem with ovs upcall properly Xin Long
2023-07-16 21:09 ` [PATCH net-next 1/3] netfilter: allow exp not to be removed in nf_ct_find_expectation Xin Long
2023-07-19 16:07   ` Aaron Conole
2023-07-16 21:09 ` [PATCH net-next 2/3] net: sched: set IPS_CONFIRMED in tmpl status only when commit is set in act_ct Xin Long
2023-07-19 16:07   ` Aaron Conole
2023-07-19 16:44   ` Davide Caratti
2023-07-16 21:09 ` [PATCH net-next 3/3] openvswitch: set IPS_CONFIRMED in tmpl status only when commit is set in conntrack Xin Long
2023-07-19 16:08   ` Aaron Conole
2024-06-17 20:10   ` Ilya Maximets
2024-06-18 11:34     ` Ilya Maximets
2024-06-18 14:58       ` Xin Long
2024-06-18 15:50         ` Ilya Maximets
2024-06-19 12:58           ` Ilya Maximets
2024-06-19 14:07             ` Xin Long
2024-06-19 17:30               ` Ilya Maximets
2024-06-19 20:11                 ` Xin Long
2024-06-19 20:19                   ` Florian Westphal
2024-06-19 20:50                     ` Xin Long
2024-06-19 21:20                       ` Florian Westphal
2024-06-19 22:10                         ` Xin Long
2024-07-08 22:03                           ` Xin Long
2024-07-08 22:38                             ` Florian Westphal
2024-07-09  1:49                               ` Xin Long [this message]
2024-07-09  5:49                                 ` Florian Westphal
2023-07-19  2:58 ` [PATCH net-next 0/3] net: handle the exp removal problem with ovs upcall properly Jakub Kicinski
2023-07-19  3:01   ` Florian Westphal
2023-07-19 16:12     ` Florian Westphal
2023-07-19 13:31 ` Aaron Conole
2023-07-20  8:20 ` patchwork-bot+netdevbpf

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=CADvbK_cYpB07dvyMSGOU3XsAJmZV_feb76hVg9tCJeFjs5iuxA@mail.gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=aconole@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=i.maximets@ovn.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=xiyou.wangcong@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).