net: sctp: migrate cookie life from timeval to ktime
Currently, SCTP code defines its own timeval functions (since timeval is rarely used inside the kernel by others), namely tv_lt() and TIMEVAL_ADD() macros, that operate on SCTP cookie expiration. We might as well remove all those, and operate directly on ktime structures for a couple of reasons: ktime is available on all archs; complexity of ktime calculations depending on the arch is less than (reduces to a simple arithmetic operations on archs with BITS_PER_LONG == 64 or CONFIG_KTIME_SCALAR) or equal to timeval functions (other archs); code becomes more readable; macros can be thrown out. Signed-off-by:Daniel Borkmann <dborkman@redhat.com> Acked-by:
Vlad Yasevich <vyasevich@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/sctp/sctp.h 0 additions, 18 deletionsinclude/net/sctp/sctp.h
- include/net/sctp/structs.h 3 additions, 3 deletionsinclude/net/sctp/structs.h
- net/sctp/associola.c 1 addition, 7 deletionsnet/sctp/associola.c
- net/sctp/sm_make_chunk.c 8 additions, 11 deletionsnet/sctp/sm_make_chunk.c
- net/sctp/socket.c 3 additions, 11 deletionsnet/sctp/socket.c
Loading
Please register or sign in to comment