diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 02:38:26 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 02:38:26 -0400 |
| commit | b1e50ebcf24668e57f058deb48b0704b5391ed0f (patch) | |
| tree | 17e1b69b249d0738317b732186340c9dd053f1a1 /net/tipc/port.c | |
| parent | 0c2a2ae32793e3500a15a449612485f5d17dd431 (diff) | |
| parent | 7e125f7b9cbfce4101191b8076d606c517a73066 (diff) | |
Merge remote branch 'origin' into secretlab/next-spi
Diffstat (limited to 'net/tipc/port.c')
| -rw-r--r-- | net/tipc/port.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index e70d27ea6578..0737680e9266 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
| @@ -116,7 +116,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, u32 domain, | |||
| 116 | msg_set_namelower(hdr, seq->lower); | 116 | msg_set_namelower(hdr, seq->lower); |
| 117 | msg_set_nameupper(hdr, seq->upper); | 117 | msg_set_nameupper(hdr, seq->upper); |
| 118 | msg_set_hdr_sz(hdr, MCAST_H_SIZE); | 118 | msg_set_hdr_sz(hdr, MCAST_H_SIZE); |
| 119 | res = msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, | 119 | res = tipc_msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, |
| 120 | !oport->user_port, &buf); | 120 | !oport->user_port, &buf); |
| 121 | if (unlikely(!buf)) | 121 | if (unlikely(!buf)) |
| 122 | return res; | 122 | return res; |
| @@ -241,13 +241,12 @@ struct tipc_port *tipc_createport_raw(void *usr_handle, | |||
| 241 | p_ptr->publ.max_pkt = MAX_PKT_DEFAULT; | 241 | p_ptr->publ.max_pkt = MAX_PKT_DEFAULT; |
| 242 | p_ptr->publ.ref = ref; | 242 | p_ptr->publ.ref = ref; |
| 243 | msg = &p_ptr->publ.phdr; | 243 | msg = &p_ptr->publ.phdr; |
| 244 | msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0); | 244 | tipc_msg_init(msg, importance, TIPC_NAMED_MSG, LONG_H_SIZE, 0); |
| 245 | msg_set_origport(msg, ref); | 245 | msg_set_origport(msg, ref); |
| 246 | p_ptr->last_in_seqno = 41; | 246 | p_ptr->last_in_seqno = 41; |
| 247 | p_ptr->sent = 1; | 247 | p_ptr->sent = 1; |
| 248 | INIT_LIST_HEAD(&p_ptr->wait_list); | 248 | INIT_LIST_HEAD(&p_ptr->wait_list); |
| 249 | INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list); | 249 | INIT_LIST_HEAD(&p_ptr->subscription.nodesub_list); |
| 250 | p_ptr->congested_link = NULL; | ||
| 251 | p_ptr->dispatcher = dispatcher; | 250 | p_ptr->dispatcher = dispatcher; |
| 252 | p_ptr->wakeup = wakeup; | 251 | p_ptr->wakeup = wakeup; |
| 253 | p_ptr->user_port = NULL; | 252 | p_ptr->user_port = NULL; |
| @@ -396,7 +395,7 @@ static struct sk_buff *port_build_proto_msg(u32 destport, u32 destnode, | |||
| 396 | buf = buf_acquire(LONG_H_SIZE); | 395 | buf = buf_acquire(LONG_H_SIZE); |
| 397 | if (buf) { | 396 | if (buf) { |
| 398 | msg = buf_msg(buf); | 397 | msg = buf_msg(buf); |
| 399 | msg_init(msg, usr, type, LONG_H_SIZE, destnode); | 398 | tipc_msg_init(msg, usr, type, LONG_H_SIZE, destnode); |
| 400 | msg_set_errcode(msg, err); | 399 | msg_set_errcode(msg, err); |
| 401 | msg_set_destport(msg, destport); | 400 | msg_set_destport(msg, destport); |
| 402 | msg_set_origport(msg, origport); | 401 | msg_set_origport(msg, origport); |
| @@ -440,7 +439,7 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err) | |||
| 440 | return data_sz; | 439 | return data_sz; |
| 441 | } | 440 | } |
| 442 | rmsg = buf_msg(rbuf); | 441 | rmsg = buf_msg(rbuf); |
| 443 | msg_init(rmsg, imp, msg_type(msg), hdr_sz, msg_orignode(msg)); | 442 | tipc_msg_init(rmsg, imp, msg_type(msg), hdr_sz, msg_orignode(msg)); |
| 444 | msg_set_errcode(rmsg, err); | 443 | msg_set_errcode(rmsg, err); |
| 445 | msg_set_destport(rmsg, msg_origport(msg)); | 444 | msg_set_destport(rmsg, msg_origport(msg)); |
| 446 | msg_set_origport(rmsg, msg_destport(msg)); | 445 | msg_set_origport(rmsg, msg_destport(msg)); |
| @@ -481,7 +480,7 @@ int tipc_port_reject_sections(struct port *p_ptr, struct tipc_msg *hdr, | |||
| 481 | struct sk_buff *buf; | 480 | struct sk_buff *buf; |
| 482 | int res; | 481 | int res; |
| 483 | 482 | ||
| 484 | res = msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, | 483 | res = tipc_msg_build(hdr, msg_sect, num_sect, MAX_MSG_SIZE, |
| 485 | !p_ptr->user_port, &buf); | 484 | !p_ptr->user_port, &buf); |
| 486 | if (!buf) | 485 | if (!buf) |
| 487 | return res; | 486 | return res; |
| @@ -1344,7 +1343,7 @@ int tipc_port_recv_sections(struct port *sender, unsigned int num_sect, | |||
| 1344 | struct sk_buff *buf; | 1343 | struct sk_buff *buf; |
| 1345 | int res; | 1344 | int res; |
| 1346 | 1345 | ||
| 1347 | res = msg_build(&sender->publ.phdr, msg_sect, num_sect, | 1346 | res = tipc_msg_build(&sender->publ.phdr, msg_sect, num_sect, |
| 1348 | MAX_MSG_SIZE, !sender->user_port, &buf); | 1347 | MAX_MSG_SIZE, !sender->user_port, &buf); |
| 1349 | if (likely(buf)) | 1348 | if (likely(buf)) |
| 1350 | tipc_port_recv_msg(buf); | 1349 | tipc_port_recv_msg(buf); |
| @@ -1384,7 +1383,7 @@ int tipc_send(u32 ref, unsigned int num_sect, struct iovec const *msg_sect) | |||
| 1384 | if (port_unreliable(p_ptr)) { | 1383 | if (port_unreliable(p_ptr)) { |
| 1385 | p_ptr->publ.congested = 0; | 1384 | p_ptr->publ.congested = 0; |
| 1386 | /* Just calculate msg length and return */ | 1385 | /* Just calculate msg length and return */ |
| 1387 | return msg_calc_data_size(msg_sect, num_sect); | 1386 | return tipc_msg_calc_data_size(msg_sect, num_sect); |
| 1388 | } | 1387 | } |
| 1389 | return -ELINKCONG; | 1388 | return -ELINKCONG; |
| 1390 | } | 1389 | } |
| @@ -1453,7 +1452,7 @@ int tipc_forward2name(u32 ref, | |||
| 1453 | struct port *p_ptr; | 1452 | struct port *p_ptr; |
| 1454 | struct tipc_msg *msg; | 1453 | struct tipc_msg *msg; |
| 1455 | u32 destnode = domain; | 1454 | u32 destnode = domain; |
| 1456 | u32 destport = 0; | 1455 | u32 destport; |
| 1457 | int res; | 1456 | int res; |
| 1458 | 1457 | ||
| 1459 | p_ptr = tipc_port_deref(ref); | 1458 | p_ptr = tipc_port_deref(ref); |
| @@ -1467,7 +1466,7 @@ int tipc_forward2name(u32 ref, | |||
| 1467 | msg_set_hdr_sz(msg, LONG_H_SIZE); | 1466 | msg_set_hdr_sz(msg, LONG_H_SIZE); |
| 1468 | msg_set_nametype(msg, name->type); | 1467 | msg_set_nametype(msg, name->type); |
| 1469 | msg_set_nameinst(msg, name->instance); | 1468 | msg_set_nameinst(msg, name->instance); |
| 1470 | msg_set_lookup_scope(msg, addr_scope(domain)); | 1469 | msg_set_lookup_scope(msg, tipc_addr_scope(domain)); |
| 1471 | if (importance <= TIPC_CRITICAL_IMPORTANCE) | 1470 | if (importance <= TIPC_CRITICAL_IMPORTANCE) |
| 1472 | msg_set_importance(msg,importance); | 1471 | msg_set_importance(msg,importance); |
| 1473 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); | 1472 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); |
| @@ -1484,7 +1483,7 @@ int tipc_forward2name(u32 ref, | |||
| 1484 | return res; | 1483 | return res; |
| 1485 | if (port_unreliable(p_ptr)) { | 1484 | if (port_unreliable(p_ptr)) { |
| 1486 | /* Just calculate msg length and return */ | 1485 | /* Just calculate msg length and return */ |
| 1487 | return msg_calc_data_size(msg_sect, num_sect); | 1486 | return tipc_msg_calc_data_size(msg_sect, num_sect); |
| 1488 | } | 1487 | } |
| 1489 | return -ELINKCONG; | 1488 | return -ELINKCONG; |
| 1490 | } | 1489 | } |
| @@ -1525,7 +1524,7 @@ int tipc_forward_buf2name(u32 ref, | |||
| 1525 | struct port *p_ptr; | 1524 | struct port *p_ptr; |
| 1526 | struct tipc_msg *msg; | 1525 | struct tipc_msg *msg; |
| 1527 | u32 destnode = domain; | 1526 | u32 destnode = domain; |
| 1528 | u32 destport = 0; | 1527 | u32 destport; |
| 1529 | int res; | 1528 | int res; |
| 1530 | 1529 | ||
| 1531 | p_ptr = (struct port *)tipc_ref_deref(ref); | 1530 | p_ptr = (struct port *)tipc_ref_deref(ref); |
| @@ -1540,7 +1539,7 @@ int tipc_forward_buf2name(u32 ref, | |||
| 1540 | msg_set_origport(msg, orig->ref); | 1539 | msg_set_origport(msg, orig->ref); |
| 1541 | msg_set_nametype(msg, name->type); | 1540 | msg_set_nametype(msg, name->type); |
| 1542 | msg_set_nameinst(msg, name->instance); | 1541 | msg_set_nameinst(msg, name->instance); |
| 1543 | msg_set_lookup_scope(msg, addr_scope(domain)); | 1542 | msg_set_lookup_scope(msg, tipc_addr_scope(domain)); |
| 1544 | msg_set_hdr_sz(msg, LONG_H_SIZE); | 1543 | msg_set_hdr_sz(msg, LONG_H_SIZE); |
| 1545 | msg_set_size(msg, LONG_H_SIZE + dsz); | 1544 | msg_set_size(msg, LONG_H_SIZE + dsz); |
| 1546 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); | 1545 | destport = tipc_nametbl_translate(name->type, name->instance, &destnode); |
| @@ -1620,7 +1619,7 @@ int tipc_forward2port(u32 ref, | |||
| 1620 | return res; | 1619 | return res; |
| 1621 | if (port_unreliable(p_ptr)) { | 1620 | if (port_unreliable(p_ptr)) { |
| 1622 | /* Just calculate msg length and return */ | 1621 | /* Just calculate msg length and return */ |
| 1623 | return msg_calc_data_size(msg_sect, num_sect); | 1622 | return tipc_msg_calc_data_size(msg_sect, num_sect); |
| 1624 | } | 1623 | } |
| 1625 | return -ELINKCONG; | 1624 | return -ELINKCONG; |
| 1626 | } | 1625 | } |
