git: ipfw3_nat: highspeed lockless in-kernel NAT

Bill Yuan bycn82 at crater.dragonflybsd.org
Sat May 12 08:30:17 PDT 2018


commit 4408d5485757eef6e44859025e931d1c1b6746c4
Author: Bill Yuan <bycn82 at dragonflybsd.org>
Date:   Sat May 12 15:26:07 2018 +0000

    ipfw3_nat: highspeed lockless in-kernel NAT
    
    RB-Tree to stored the state for the outgoing packets, and multidimentional
    array of pointers to keep the state for the incoming packets.

Summary of changes:
 lib/libipfw3/basic/ipfw3_basic.c                   |    2 +-
 lib/libipfw3/basic/ipfw3_basic.h                   |    6 +-
 lib/libipfw3/dummynet/ipfw3_dummynet.c             |    2 +-
 lib/libipfw3/dummynet/ipfw3_dummynet.h             |    6 +-
 lib/libipfw3/layer2/ipfw3_layer2.c                 |    2 +-
 lib/libipfw3/layer2/ipfw3_layer2.h                 |    6 +-
 lib/libipfw3/layer4/ipfw3_layer4.c                 |    2 +-
 lib/libipfw3/layer4/ipfw3_layer4.h                 |    6 +-
 lib/libipfw3/nat/ipfw3_nat.c                       |    2 +-
 lib/libipfw3/nat/ipfw3_nat.h                       |    6 +-
 sbin/ipfw3/Makefile                                |    6 +
 sbin/ipfw3/ipfw3.c                                 | 2203 +++-----------------
 sbin/ipfw3/ipfw3.h                                 |   44 +-
 sbin/ipfw3/ipfw3basic.c                            |  148 ++
 .../nat/ipfw3_nat.h => sbin/ipfw3/ipfw3basic.h     |   12 +-
 sbin/ipfw3/ipfw3dummynet.c                         |  727 +++++++
 .../nat/ipfw3_nat.h => sbin/ipfw3/ipfw3dummynet.h  |   20 +-
 sbin/ipfw3/ipfw3log.c                              |  138 ++
 .../nat/ipfw3_nat.h => sbin/ipfw3/ipfw3log.h       |    9 +-
 sbin/ipfw3/ipfw3nat.c                              |    6 +-
 sbin/ipfw3/ipfw3set.c                              |  264 +++
 .../ipfw3_dummynet.h => sbin/ipfw3/ipfw3set.h      |   15 +-
 sbin/ipfw3/{ipfw3nat.c => ipfw3state.c}            |  227 +-
 .../nat/ipfw3_nat.h => sbin/ipfw3/ipfw3state.h     |   15 +-
 sbin/ipfw3/ipfw3sync.c                             |   80 +-
 sbin/ipfw3/ipfw3sync.h                             |   27 +-
 sbin/ipfw3/ipfw3table.c                            |  493 +++++
 .../nat/ipfw3_nat.h => sbin/ipfw3/ipfw3table.h     |   19 +-
 sys/net/dummynet3/Makefile                         |   20 +-
 sys/net/dummynet3/ip_dummynet3.c                   |   20 +-
 sys/net/ipfw3/Makefile                             |   10 +-
 sys/net/ipfw3/ip_fw3.c                             | 1225 +++--------
 sys/net/ipfw3/ip_fw3.h                             |  408 ++--
 sys/net/ipfw3/ip_fw3_glue.c                        |    2 -
 sys/net/ipfw3/ip_fw3_set.c                         |  286 +++
 .../ip_fw3_layer4.h => ipfw3/ip_fw3_set.h}         |   35 +-
 sys/net/ipfw3_basic/Makefile                       |   25 +-
 sys/net/ipfw3_basic/ip_fw3_basic.c                 |  683 +-----
 sys/net/ipfw3_basic/ip_fw3_basic.h                 |  110 +-
 sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_log.c        |   63 +-
 sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_log.h        |    7 +-
 sys/net/ipfw3_basic/ip_fw3_state.c                 |  728 +++++++
 sys/net/ipfw3_basic/ip_fw3_state.h                 |  113 +
 sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_sync.c       |  210 +-
 sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_sync.h       |   68 +-
 sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_table.c      |   88 +-
 sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_table.h      |   61 +-
 sys/net/ipfw3_layer2/Makefile                      |   17 +
 sys/net/ipfw3_layer2/ip_fw3_layer2.c               |   44 +-
 sys/net/ipfw3_layer2/ip_fw3_layer2.h               |    4 +-
 sys/net/ipfw3_layer4/Makefile                      |   17 +
 sys/net/ipfw3_layer4/ip_fw3_layer4.c               |   38 +-
 sys/net/ipfw3_layer4/ip_fw3_layer4.h               |    8 +-
 sys/net/ipfw3_nat/Makefile                         |   17 +
 sys/net/ipfw3_nat/ip_fw3_nat.c                     |  385 ++--
 sys/net/ipfw3_nat/ip_fw3_nat.h                     |   33 +-
 56 files changed, 4842 insertions(+), 4376 deletions(-)
 create mode 100644 sbin/ipfw3/ipfw3basic.c
 copy lib/libipfw3/nat/ipfw3_nat.h => sbin/ipfw3/ipfw3basic.h (82%)
 create mode 100644 sbin/ipfw3/ipfw3dummynet.c
 copy lib/libipfw3/nat/ipfw3_nat.h => sbin/ipfw3/ipfw3dummynet.h (75%)
 create mode 100644 sbin/ipfw3/ipfw3log.c
 copy lib/libipfw3/nat/ipfw3_nat.h => sbin/ipfw3/ipfw3log.h (90%)
 create mode 100644 sbin/ipfw3/ipfw3set.c
 copy lib/libipfw3/dummynet/ipfw3_dummynet.h => sbin/ipfw3/ipfw3set.h (80%)
 copy sbin/ipfw3/{ipfw3nat.c => ipfw3state.c} (54%)
 copy lib/libipfw3/nat/ipfw3_nat.h => sbin/ipfw3/ipfw3state.h (82%)
 create mode 100644 sbin/ipfw3/ipfw3table.c
 copy lib/libipfw3/nat/ipfw3_nat.h => sbin/ipfw3/ipfw3table.h (75%)
 create mode 100644 sys/net/ipfw3/ip_fw3_set.c
 copy sys/net/{ipfw3_layer4/ip_fw3_layer4.h => ipfw3/ip_fw3_set.h} (70%)
 rename sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_log.c (80%)
 rename sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_log.h (90%)
 create mode 100644 sys/net/ipfw3_basic/ip_fw3_state.c
 create mode 100644 sys/net/ipfw3_basic/ip_fw3_state.h
 rename sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_sync.c (63%)
 rename sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_sync.h (61%)
 rename sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_table.c (88%)
 rename sys/net/{ipfw3 => ipfw3_basic}/ip_fw3_table.h (83%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4408d5485757eef6e44859025e931d1c1b6746c4


-- 
DragonFly BSD source repository


More information about the Commits mailing list