From: Pablo Neira Ayuso <pablo@netfilter•org>
To: Xin Long <lucien.xin@gmail•com>
Cc: network dev <netdev@vger•kernel.org>,
dev@openvswitch•org, davem@davemloft•net, kuba@kernel•org,
Eric Dumazet <edumazet@google•com>,
Paolo Abeni <pabeni@redhat•com>,
Pravin B Shelar <pshelar@ovn•org>,
Jamal Hadi Salim <jhs@mojatatu•com>,
Cong Wang <xiyou.wangcong@gmail•com>,
Jiri Pirko <jiri@resnulli•us>, Florian Westphal <fw@strlen•de>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail•com>,
Davide Caratti <dcaratti@redhat•com>, Oz Shlomo <ozsh@nvidia•com>,
Paul Blakey <paulb@nvidia•com>,
Ilya Maximets <i.maximets@ovn•org>,
Eelco Chaudron <echaudro@redhat•com>,
Aaron Conole <aconole@redhat•com>,
Saeed Mahameed <saeed@kernel•org>
Subject: Re: [PATCHv4 net-next 5/5] net: move the nat function to nf_nat_ovs for ovs and tc
Date: Fri, 9 Dec 2022 16:21:41 +0100 [thread overview]
Message-ID: <Y5NShbdkxb1XDpV1@salvia> (raw)
In-Reply-To: <c973910b2d9741153cca02c14c6c105942d7f44a.1670518439.git.lucien.xin@gmail.com>
On Thu, Dec 08, 2022 at 11:56:12AM -0500, Xin Long wrote:
> There are two nat functions are nearly the same in both OVS and
> TC code, (ovs_)ct_nat_execute() and ovs_ct_nat/tcf_ct_act_nat().
>
> This patch creates nf_nat_ovs.c under netfilter and moves them
> there then exports nf_ct_nat() so that it can be shared by both
> OVS and TC, and keeps the nat (type) check and nat flag update
> in OVS and TC's own place, as these parts are different between
> OVS and TC.
>
> Note that in OVS nat function it was using skb->protocol to get
> the proto as it already skips vlans in key_extract(), while it
> doesn't in TC, and TC has to call skb_protocol() to get proto.
> So in nf_ct_nat_execute(), we keep using skb_protocol() which
> works for both OVS and TC contrack.
>
> Signed-off-by: Xin Long <lucien.xin@gmail•com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter•org>
Thanks for addressing my feedback.
next prev parent reply other threads:[~2022-12-09 15:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 16:56 [PATCHv4 net-next 0/5] net: eliminate the duplicate code in the ct nat functions of ovs and tc Xin Long
2022-12-08 16:56 ` [PATCHv4 net-next 1/5] openvswitch: delete the unncessary skb_pull_rcsum call in ovs_ct_nat_execute Xin Long
2022-12-08 16:56 ` [PATCHv4 net-next 2/5] openvswitch: return NF_ACCEPT when OVS_CT_NAT is not set in info nat Xin Long
2022-12-08 16:56 ` [PATCHv4 net-next 3/5] openvswitch: return NF_DROP when fails to add nat ext in ovs_ct_nat Xin Long
2022-12-09 13:33 ` Aaron Conole
2022-12-08 16:56 ` [PATCHv4 net-next 4/5] net: sched: update the nat flag for icmp error packets in ct_nat_execute Xin Long
2022-12-08 16:56 ` [PATCHv4 net-next 5/5] net: move the nat function to nf_nat_ovs for ovs and tc Xin Long
2022-12-09 13:33 ` Aaron Conole
2022-12-09 15:21 ` Pablo Neira Ayuso [this message]
2022-12-08 19:44 ` [PATCHv4 net-next 0/5] net: eliminate the duplicate code in the ct nat functions of " Marcelo Ricardo Leitner
2022-12-12 12: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=Y5NShbdkxb1XDpV1@salvia \
--to=pablo@netfilter$(echo .)org \
--cc=aconole@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dcaratti@redhat$(echo .)com \
--cc=dev@openvswitch$(echo .)org \
--cc=echaudro@redhat$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=fw@strlen$(echo .)de \
--cc=i.maximets@ovn$(echo .)org \
--cc=jhs@mojatatu$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=kuba@kernel$(echo .)org \
--cc=lucien.xin@gmail$(echo .)com \
--cc=marcelo.leitner@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=ozsh@nvidia$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=paulb@nvidia$(echo .)com \
--cc=pshelar@ovn$(echo .)org \
--cc=saeed@kernel$(echo .)org \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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