-
- Downloads
[NET] Generalise TCP's struct open_request minisock infrastructure
Kept this first changeset minimal, without changing existing names to ease peer review. Basicaly tcp_openreq_alloc now receives the or_calltable, that in turn has two new members: ->slab, that replaces tcp_openreq_cachep ->obj_size, to inform the size of the openreq descendant for a specific protocol The protocol specific fields in struct open_request were moved to a class hierarchy, with the things that are common to all connection oriented PF_INET protocols in struct inet_request_sock, the TCP ones in tcp_request_sock, that is an inet_request_sock, that is an open_request. I.e. this uses the same approach used for the struct sock class hierarchy, with sk_prot indicating if the protocol wants to use the open_request infrastructure by filling in sk_prot->rsk_prot with an or_calltable. Results? Performance is improved and TCP v4 now uses only 64 bytes per open request minisock, down from 96 without this patch :-) Next changeset will rename some of the structs, fields and functions mentioned above, struct or_calltable is way unclear, better name it struct request_sock_ops, s/struct open_request/struct request_sock/g, etc. Signed-off-by:Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/linux/ip.h 21 additions, 0 deletionsinclude/linux/ip.h
- include/linux/ipv6.h 13 additions, 0 deletionsinclude/linux/ipv6.h
- include/linux/tcp.h 11 additions, 0 deletionsinclude/linux/tcp.h
- include/net/request_sock.h 77 additions, 0 deletionsinclude/net/request_sock.h
- include/net/sock.h 4 additions, 0 deletionsinclude/net/sock.h
- include/net/tcp.h 11 additions, 76 deletionsinclude/net/tcp.h
- include/net/tcp_ecn.h 4 additions, 3 deletionsinclude/net/tcp_ecn.h
- net/core/sock.c 35 additions, 0 deletionsnet/core/sock.c
- net/ipv4/syncookies.c 20 additions, 19 deletionsnet/ipv4/syncookies.c
- net/ipv4/tcp.c 0 additions, 9 deletionsnet/ipv4/tcp.c
- net/ipv4/tcp_diag.c 14 additions, 11 deletionsnet/ipv4/tcp_diag.c
- net/ipv4/tcp_ipv4.c 41 additions, 31 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv4/tcp_minisocks.c 25 additions, 23 deletionsnet/ipv4/tcp_minisocks.c
- net/ipv4/tcp_output.c 13 additions, 12 deletionsnet/ipv4/tcp_output.c
- net/ipv4/tcp_timer.c 1 addition, 1 deletionnet/ipv4/tcp_timer.c
- net/ipv6/tcp_ipv6.c 51 additions, 45 deletionsnet/ipv6/tcp_ipv6.c
Loading
Please register or sign in to comment