]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: remove struct tipc_name_seq from struct tipc_subscription
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Tue, 2 Feb 2016 09:52:10 +0000 (10:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Feb 2016 08:40:43 +0000 (03:40 -0500)
commit00c7b30388db4e2e53fd4104966cca52997a6aa0
treeec9aecd22c4adc4c4bdeaf74fdcbd7ff81691507
parentfd64b990f2dc00024e6827a5495d7e6f9e7f44c3
tipc: remove struct tipc_name_seq from struct tipc_subscription

Until now, struct tipc_subscriber has duplicate fields for
type, upper and lower (as member of struct tipc_name_seq) at:
1. as member seq in struct tipc_subscription
2. as member seq in struct tipc_subscr, which is contained
   in struct tipc_event
The former structure contains the type, upper and lower
values in network byte order and the later contains the
intact copy of the request.
The struct tipc_subscription contains a field swap to
determine if request needs network byte order conversion.
Thus by using swap, we can convert the request when
required instead of duplicating it.

In this commit,
1. we remove the references to these elements as members of
   struct tipc_subscription and replace them with elements
   from struct tipc_subscr.
2. provide new functions to convert the user request into
   network byte order.

Acked-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/name_table.c
net/tipc/subscr.c
net/tipc/subscr.h