aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-11-09 16:30:55 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-02-29 11:45:35 -0500
commit9bbbc59dbd4e69da078b65a7f708c4250984dd29 (patch)
tree11d5ba1e7539d866742d26c623fd5d4003e802b3 /net/tipc/port.c
parente8ec1ae756de320644c69194898c53d247925586 (diff)
tipc: Optimize setting of immutable payload message header fields
Optimizes routines that send payload messages so that they no longer update the "originating node" and "originating port" fields of the outgoing message header template, since these fields are initialized when the sending port is created and never change thereafter. Also optimizes the routine which updates the message header template when a connection to a port is established, for the same reason. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 6adcdf99123b..94d2904cce66 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -1054,8 +1054,6 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer)
1054 msg = &p_ptr->phdr; 1054 msg = &p_ptr->phdr;
1055 msg_set_destnode(msg, peer->node); 1055 msg_set_destnode(msg, peer->node);
1056 msg_set_destport(msg, peer->ref); 1056 msg_set_destport(msg, peer->ref);
1057 msg_set_orignode(msg, tipc_own_addr);
1058 msg_set_origport(msg, p_ptr->ref);
1059 msg_set_type(msg, TIPC_CONN_MSG); 1057 msg_set_type(msg, TIPC_CONN_MSG);
1060 msg_set_lookup_scope(msg, 0); 1058 msg_set_lookup_scope(msg, 0);
1061 msg_set_hdr_sz(msg, SHORT_H_SIZE); 1059 msg_set_hdr_sz(msg, SHORT_H_SIZE);
@@ -1254,8 +1252,6 @@ int tipc_send2name(u32 ref, struct tipc_name const *name, unsigned int domain,
1254 1252
1255 msg = &p_ptr->phdr; 1253 msg = &p_ptr->phdr;
1256 msg_set_type(msg, TIPC_NAMED_MSG); 1254 msg_set_type(msg, TIPC_NAMED_MSG);
1257 msg_set_orignode(msg, tipc_own_addr);
1258 msg_set_origport(msg, ref);
1259 msg_set_hdr_sz(msg, NAMED_H_SIZE); 1255 msg_set_hdr_sz(msg, NAMED_H_SIZE);
1260 msg_set_nametype(msg, name->type); 1256 msg_set_nametype(msg, name->type);
1261 msg_set_nameinst(msg, name->instance); 1257 msg_set_nameinst(msg, name->instance);
@@ -1305,8 +1301,6 @@ int tipc_send2port(u32 ref, struct tipc_portid const *dest,
1305 msg = &p_ptr->phdr; 1301 msg = &p_ptr->phdr;
1306 msg_set_type(msg, TIPC_DIRECT_MSG); 1302 msg_set_type(msg, TIPC_DIRECT_MSG);
1307 msg_set_lookup_scope(msg, 0); 1303 msg_set_lookup_scope(msg, 0);
1308 msg_set_orignode(msg, tipc_own_addr);
1309 msg_set_origport(msg, ref);
1310 msg_set_destnode(msg, dest->node); 1304 msg_set_destnode(msg, dest->node);
1311 msg_set_destport(msg, dest->ref); 1305 msg_set_destport(msg, dest->ref);
1312 msg_set_hdr_sz(msg, BASIC_H_SIZE); 1306 msg_set_hdr_sz(msg, BASIC_H_SIZE);
@@ -1345,8 +1339,6 @@ int tipc_send_buf2port(u32 ref, struct tipc_portid const *dest,
1345 1339
1346 msg = &p_ptr->phdr; 1340 msg = &p_ptr->phdr;
1347 msg_set_type(msg, TIPC_DIRECT_MSG); 1341 msg_set_type(msg, TIPC_DIRECT_MSG);
1348 msg_set_orignode(msg, tipc_own_addr);
1349 msg_set_origport(msg, ref);
1350 msg_set_destnode(msg, dest->node); 1342 msg_set_destnode(msg, dest->node);
1351 msg_set_destport(msg, dest->ref); 1343 msg_set_destport(msg, dest->ref);
1352 msg_set_hdr_sz(msg, BASIC_H_SIZE); 1344 msg_set_hdr_sz(msg, BASIC_H_SIZE);