aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-03-31 10:55:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:29 -0400
commit27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch)
treeb5a0c617cf8339524d3b1f1633e08eae7b94cf86 /net/tipc/port.c
parent3dbad80ac7632f243b824d469301abb97ec634a1 (diff)
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 5f8217d4b452..bcd5da00737b 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -464,7 +464,7 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err)
464 msg_set_size(rmsg, data_sz + hdr_sz); 464 msg_set_size(rmsg, data_sz + hdr_sz);
465 msg_set_nametype(rmsg, msg_nametype(msg)); 465 msg_set_nametype(rmsg, msg_nametype(msg));
466 msg_set_nameinst(rmsg, msg_nameinst(msg)); 466 msg_set_nameinst(rmsg, msg_nameinst(msg));
467 memcpy(rbuf->data + hdr_sz, msg_data(msg), data_sz); 467 skb_copy_to_linear_data_offset(rbuf, hdr_sz, msg_data(msg), data_sz);
468 468
469 /* send self-abort message when rejecting on a connected port */ 469 /* send self-abort message when rejecting on a connected port */
470 if (msg_connected(msg)) { 470 if (msg_connected(msg)) {
@@ -1419,7 +1419,7 @@ int tipc_send_buf(u32 ref, struct sk_buff *buf, unsigned int dsz)
1419 return -ENOMEM; 1419 return -ENOMEM;
1420 1420
1421 skb_push(buf, hsz); 1421 skb_push(buf, hsz);
1422 memcpy(buf->data, (unchar *)msg, hsz); 1422 skb_copy_to_linear_data(buf, msg, hsz);
1423 destnode = msg_destnode(msg); 1423 destnode = msg_destnode(msg);
1424 p_ptr->publ.congested = 1; 1424 p_ptr->publ.congested = 1;
1425 if (!tipc_port_congested(p_ptr)) { 1425 if (!tipc_port_congested(p_ptr)) {
@@ -1555,7 +1555,7 @@ int tipc_forward_buf2name(u32 ref,
1555 if (skb_cow(buf, LONG_H_SIZE)) 1555 if (skb_cow(buf, LONG_H_SIZE))
1556 return -ENOMEM; 1556 return -ENOMEM;
1557 skb_push(buf, LONG_H_SIZE); 1557 skb_push(buf, LONG_H_SIZE);
1558 memcpy(buf->data, (unchar *)msg, LONG_H_SIZE); 1558 skb_copy_to_linear_data(buf, msg, LONG_H_SIZE);
1559 msg_dbg(buf_msg(buf),"PREP:"); 1559 msg_dbg(buf_msg(buf),"PREP:");
1560 if (likely(destport || destnode)) { 1560 if (likely(destport || destnode)) {
1561 p_ptr->sent++; 1561 p_ptr->sent++;
@@ -1679,7 +1679,7 @@ int tipc_forward_buf2port(u32 ref,
1679 return -ENOMEM; 1679 return -ENOMEM;
1680 1680
1681 skb_push(buf, DIR_MSG_H_SIZE); 1681 skb_push(buf, DIR_MSG_H_SIZE);
1682 memcpy(buf->data, (unchar *)msg, DIR_MSG_H_SIZE); 1682 skb_copy_to_linear_data(buf, msg, DIR_MSG_H_SIZE);
1683 msg_dbg(msg, "buf2port: "); 1683 msg_dbg(msg, "buf2port: ");
1684 p_ptr->sent++; 1684 p_ptr->sent++;
1685 if (dest->node == tipc_own_addr) 1685 if (dest->node == tipc_own_addr)