diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-05-24 13:20:09 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-06-24 16:18:15 -0400 |
commit | 017dac31dc8a25ad45421715d88c3869e299fd35 (patch) | |
tree | fb3a44ebd4ce8f9b51c2c11b38653d53590e1ffe /net/tipc/port.c | |
parent | 76d12527f74ad1b42b068252fdd2056c8ae48a99 (diff) |
tipc: Optimize routing of returned payload messages
Reduces the work involved in transmitting a returned payload message
by doing only the work necessary to route such a message directly to
the specified destination port, rather than invoking the code used
to route an arbitrary message to an arbitrary destination.
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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index 756e64cbff96..70ecdfdf6e3a 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -360,6 +360,7 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err) | |||
360 | int hdr_sz; | 360 | int hdr_sz; |
361 | u32 imp = msg_importance(msg); | 361 | u32 imp = msg_importance(msg); |
362 | u32 data_sz = msg_data_sz(msg); | 362 | u32 data_sz = msg_data_sz(msg); |
363 | u32 src_node; | ||
363 | 364 | ||
364 | if (data_sz > MAX_REJECT_SIZE) | 365 | if (data_sz > MAX_REJECT_SIZE) |
365 | data_sz = MAX_REJECT_SIZE; | 366 | data_sz = MAX_REJECT_SIZE; |
@@ -416,7 +417,11 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err) | |||
416 | 417 | ||
417 | /* send returned message & dispose of rejected message */ | 418 | /* send returned message & dispose of rejected message */ |
418 | 419 | ||
419 | tipc_net_route_msg(rbuf); | 420 | src_node = msg_prevnode(msg); |
421 | if (src_node == tipc_own_addr) | ||
422 | tipc_port_recv_msg(rbuf); | ||
423 | else | ||
424 | tipc_link_send(rbuf, src_node, msg_link_selector(rmsg)); | ||
420 | exit: | 425 | exit: |
421 | buf_discard(buf); | 426 | buf_discard(buf); |
422 | return data_sz; | 427 | return data_sz; |