1
0
Fork 0
alistair23-linux/include
Tom Tucker 9dbc240f19 svc: Move the sockaddr information to svc_xprt
This patch moves the transport sockaddr to the svc_xprt
structure.  Convenience functions are added to set and
get the local and remote addresses of a transport from
the transport provider as well as determine the length
of a sockaddr.

A transport is responsible for setting the xpt_local
and xpt_remote addresses in the svc_xprt structure as
part of transport creation and xpo_accept processing. This
cannot be done in a generic way and in fact varies
between TCP, UDP and RDMA. A set of xpo_ functions
(e.g. getlocalname, getremotename) could have been
added but this would have resulted in additional
caching and copying of the addresses around.  Note that
the xpt_local address should also be set on listening
endpoints; for TCP/RDMA this is done as part of
endpoint creation.

For connected transports like TCP and RDMA, the addresses
never change and can be set once and copied into the
rqstp structure for each request. For UDP, however, the
local and remote addresses may change for each request. In
this case, the address information is obtained from the
UDP recvmsg info and copied into the rqstp structure from
there.

A svc_xprt_local_port function was also added that returns
the local port given a transport. This is used by
svc_create_xprt when returning the port associated with
a newly created transport, and later when creating a
generic find transport service to check if a service is
already listening on a given port.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Acked-by: Neil Brown <neilb@suse.de>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Greg Banks <gnb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01 16:42:12 -05:00
..
acpi x86: dummy placeholder for acpi/reboot.h 2008-01-30 13:31:17 +01:00
asm-alpha [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-arm [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-avr32 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-blackfin [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-cris [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-frv [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-generic asm-generic/tlb.h: build fix 2008-01-31 22:05:48 +01:00
asm-h8300 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-ia64 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-m32r [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-m68k [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-m68knommu m68knommu: remove unused CONFIG_DISKtel symbol 2008-02-01 21:00:01 +11:00
asm-mips [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-parisc [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-powerpc [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-ppc [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
asm-s390 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-sh [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-sparc [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-sparc64 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-um git-x86: unbreak UML 2008-01-30 13:32:38 +01:00
asm-v850 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-x86 [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
asm-xtensa [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
crypto [CRYPTO] api: Include sched.h for cond_resched in scatterwalk.h 2008-01-11 08:16:59 +11:00
keys
linux svc: Move the sockaddr information to svc_xprt 2008-02-01 16:42:12 -05:00
math-emu
media i2c: Constify client address data 2008-01-27 18:14:46 +01:00
mtd
net [NETNS]: Lookup in FIB semantic hashes taking into account the namespace. 2008-01-31 19:28:41 -08:00
pcmcia [AVR32] pcmcia ioaddr_t should be 32 bits on AVR32 2007-11-15 13:47:19 +01:00
rdma RDMA/cma: add support for rdma_migrate_id() 2008-01-25 14:15:32 -08:00
rxrpc
scsi [SCSI] scsi_debug: add XDWRITEREAD_10 support 2008-01-30 13:14:25 -06:00
sound [ALSA] version 1.0.16rc2 2008-01-31 17:40:18 +01:00
video
xen x86: page.h: make pte_t a union to always include 2008-01-30 13:32:57 +01:00
Kbuild