replace nf_nat_seqofs_lock with spin_lock of nf_conn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
    My kernel version is 2.6.32.
    I have verify that same lock is also used in 3.4.6.
    there is global spin lock at net/ipv4/netfilter/nf_nat_helper.c
    static DEFINE_SPINLOCK(nf_nat_seqofs_lock);

    this is used in following functions:
    adjust_tcp_sequence();
    nf_nat_get_offset();

    This lock will reduce performance in case of multicore machines.
    There is a spin_lock in nf_conn structure itself, which is used by
    tcp_packet() at
    net/netfilter/nf_conntrack_proto_tcp.c
    and other places.

    So can we replace
    spin_lock_bh(&nf_nat_seqofs_lock);
    with
    spin_lock_bh(&ct->lock);

    regards
    rajesh
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux