git: inpcb: Change how TCP local ephemeral port is selected.

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Wed Dec 20 05:50:01 PST 2017


commit 45d93a420fbdbe020514243f5457f9612b054443
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Wed Dec 20 13:28:35 2017 +0800

    inpcb: Change how TCP local ephemeral port is selected.
    
    The goal should be reducing the chance of connection forwarding.
    However, ports in a given portinfo is too sparse to achieve this
    goal.  With the help of randomized local port initial value, the
    tentative local port can be incremented by 1 each time, so that
    the chance of keeping the connection on the current cpu increases.
    
    This change reduces IPI rate significantly (200K/s -> 160K/s), and
    the connection establish rate is increased from 590Kconn/s to
    600Kconn/s.

Summary of changes:
 sys/netinet/in_pcb.c | 102 ++++++++++++++++++---------------------------------
 1 file changed, 36 insertions(+), 66 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/45d93a420fbdbe020514243f5457f9612b054443


-- 
DragonFly BSD source repository



More information about the Commits mailing list