net: eliminate the duplicate code in the ct nat functions of ovs and tc
Status from this message: This series was applied to netdev/net-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest5 patches 4 repliesApplied 5/5
- v35 patches 3 repliesSuperseded
- v25 patches 17 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 5 patches | 10 replies | Superseded |
Changes in v4 from the cover letter
- add NF_NAT_OVS in netfilter/Kconfig and add select NF_NAT_OVS in OVS and TC Kconfig instead of using ifdef in netfilter/Makefile, as Pablo suggested.
Patches in v4 All 5 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | openvswitch: delete the unncessary skb_pull_rcsum call in ovs_ct_nat_executenet/ | +6 | 0 replies | Applied |
| 2/5 | openvswitch: return NF_ACCEPT when OVS_CT_NAT is not set in info natnet/ | +4 | 0 replies | Applied |
| 3/5 | openvswitch: return NF_DROP when fails to add nat ext in ovs_ct_natnet/ | +1 | 1 reply | Applied |
| 4/5 | net: sched: update the nat flag for icmp error packets in ct_nat_executenet/ | +1 | 0 replies | Applied |
| 5/5 | net: move the nat function to nf_nat_ovs for ovs and tcinclude/ net/ net/ +5 more | +166 | 2 replies | Applied |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Saeed Mahameed | Aaron Conole | Marcelo Ricardo Leitner | Pablo Neira Ayuso |
|---|---|---|---|---|
| Series | A-b | |||
| 1/5 | R-b | A-b | ||
| 2/5 | R-b | A-b | ||
| 3/5 | A-b | |||
| 4/5 | R-b | |||
| 5/5 | A-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCHv4 net-next 0/5] net: eliminate the duplicate code in the ct nat functions of ovs and tc
The changes in the patchset:
"net: add helper support in tc act_ct for ovs offloading"
had moved some common ct code used by both OVS and TC into netfilter.
There are still some big functions pretty similar defined and used in each of OVS and TC. It is not good to maintain such big function in 2 places. This patchset is to extract the functions for NAT processing from OVS and TC to netfilter.
To make this change clear and safe, this patchset gets the common code out of OVS and TC step by step: The patch 1-4 make some minor changes in OVS and TC to make the NAT code of them completely the same, then the patch 5 moves the common code to the netfilter and exports one function called by each of OVS and TC.
v1->v2:
- Create nf_nat_ovs.c to include the nat functions, as Pablo suggested.v2->v3:
- fix a typo in subject of patch 2/5, as Marcelo noticed.
- fix in openvswitch to keep OVS ct nat and TC ct nat consistent in patch 3/5 instead of in tc, as Marcelo noticed.
- use BIT(var) macro instead of (1 << var) in patch 5/5, as Marcelo suggested.
- use ifdef in netfilter/Makefile to build nf_nat_ovs only when OVS or TC ct action is enabled in patch 5/5, as Marcelo suggested.v3->v4:
- add NF_NAT_OVS in netfilter/Kconfig and add select NF_NAT_OVS in OVS and TC Kconfig instead of using ifdef in netfilter/Makefile, as Pablo suggested.
Xin Long (5):
openvswitch: delete the unncessary skb_pull_rcsum call in
ovs_ct_nat_execute
openvswitch: return NF_ACCEPT when OVS_CT_NAT is not set in info nat
openvswitch: return NF_DROP when fails to add nat ext in ovs_ct_nat
net: sched: update the nat flag for icmp error packets in
ct_nat_execute
net: move the nat function to nf_nat_ovs for ovs and tc
include/net/netfilter/nf_nat.h | 4 + net/netfilter/Kconfig | 3 + net/netfilter/Makefile | 1 + net/netfilter/nf_nat_ovs.c | 135 ++++++++++++++++++++++++++++++ net/openvswitch/Kconfig | 1 + net/openvswitch/conntrack.c | 146 +++------------------------------ net/sched/Kconfig | 1 + net/sched/act_ct.c | 136 +++--------------------------- 8 files changed, 169 insertions(+), 258 deletions(-) create mode 100644 net/netfilter/nf_nat_ovs.c
Signature · 1 line
2.31.1