mirror of
https://github.com/torvalds/linux.git
synced 2024-11-06 20:21:57 +00:00
38504c28a2
TIPC currently handles two media specific addresses: Ethernet MAC addresses and InfiniBand addresses. Those are kept in three different formats: 1) A "raw" format as obtained from the device. This format is known only by the media specific adapter code in eth_media.c and ib_media.c. 2) A "generic" internal format, in the form of struct tipc_media_addr, which can be referenced and passed around by the generic media- unaware code. 3) A serialized version of the latter, to be conveyed in neighbor discovery messages. Conversion between the three formats can only be done by the media specific code, so we have function pointers for this purpose in struct tipc_media. Here, the media adapters can install their own conversion functions at startup. We now introduce a new such function, 'raw2addr()', whose purpose is to convert from format 1 to format 2 above. We also try to as far as possible uniform commenting, variable names and usage of these functions, with the purpose of making them more comprehensible. We can now also remove the function tipc_l2_media_addr_set(), whose job is done better by the new function. Finally, we expand the field for serialized addresses (format 3) in discovery messages from 20 to 32 bytes. This is permitted according to the spec, and reduces the risk of problems when we add new media in the future. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
addr.c | ||
addr.h | ||
bcast.c | ||
bcast.h | ||
bearer.c | ||
bearer.h | ||
config.c | ||
config.h | ||
core.c | ||
core.h | ||
discover.c | ||
discover.h | ||
eth_media.c | ||
ib_media.c | ||
Kconfig | ||
link.c | ||
link.h | ||
log.c | ||
Makefile | ||
msg.c | ||
msg.h | ||
name_distr.c | ||
name_distr.h | ||
name_table.c | ||
name_table.h | ||
net.c | ||
net.h | ||
netlink.c | ||
node_subscr.c | ||
node_subscr.h | ||
node.c | ||
node.h | ||
port.c | ||
port.h | ||
ref.c | ||
ref.h | ||
server.c | ||
server.h | ||
socket.c | ||
socket.h | ||
subscr.c | ||
subscr.h | ||
sysctl.c |