• Eric Dumazet's avatar
    tcp: preserve const qualifier in tcp_sk() · e9d9da91
    Eric Dumazet authored
    We can change tcp_sk() to propagate its argument const qualifier,
    thanks to container_of_const().
    
    We have two places where a const sock pointer has to be upgraded
    to a write one. We have been using const qualifier for lockless
    listeners to clearly identify points where writes could happen.
    
    Add tcp_sk_rw() helper to better document these.
    
    tcp_inbound_md5_hash(), __tcp_grow_window(), tcp_reset_check()
    and tcp_rack_reo_wnd() get an additional const qualififer
    for their @tp local variables.
    
    smc_check_reset_syn_req() also needs a similar change.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e9d9da91
tcp.h 75.3 KB