git: ip_forward: Migrate cpu if hash doesn't match.

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Jul 6 08:56:30 PDT 2023


commit a6da5b60c9de99ff97ef13fe72b69d548a0d1f7c
Author: Kyle Butt <kyle at iteratee.net>
Date:   Wed Jul 5 09:01:47 2023 -0600

    ip_forward: Migrate cpu if hash doesn't match.
    
    Packet filter re-writes can cause the call to ip_forward to be on the
    wrong CPU. Detect this case and correct it. Check M_HASH at the
    beginning of ip_input and dispatch to a new CPU if we aren't in the
    right place. This mirrors what is done for packets that are destined to
    the transport layer. This causes ip_forward and ip_output to be called
    on the correct CPU, including any states that are created by output
    rules.

Summary of changes:
 sys/net/netmsg.h       |  8 ++++++++
 sys/netinet/ip_input.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sys/sys/mbuf.h         |  2 ++
 3 files changed, 63 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a6da5b60c9de99ff97ef13fe72b69d548a0d1f7c


-- 
DragonFly BSD source repository


More information about the Commits mailing list