diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-27 17:55:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:23 -0400 |
commit | d626f62b11e00c16e81e4308ab93d3f13551812a (patch) | |
tree | fac4af6ced853755e12fc709d55f0c2bec51265d /drivers/infiniband | |
parent | 2a123b86e2b242a4a6db990d2851d45e192f88e5 (diff) |
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from 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@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index e842c65a3f4d..3b4b0acd707f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -821,7 +821,8 @@ static void process_mpa_reply(struct iwch_ep *ep, struct sk_buff *skb) | |||
821 | /* | 821 | /* |
822 | * copy the new data into our accumulation buffer. | 822 | * copy the new data into our accumulation buffer. |
823 | */ | 823 | */ |
824 | memcpy(&(ep->mpa_pkt[ep->mpa_pkt_len]), skb->data, skb->len); | 824 | skb_copy_from_linear_data(skb, &(ep->mpa_pkt[ep->mpa_pkt_len]), |
825 | skb->len); | ||
825 | ep->mpa_pkt_len += skb->len; | 826 | ep->mpa_pkt_len += skb->len; |
826 | 827 | ||
827 | /* | 828 | /* |
@@ -940,7 +941,8 @@ static void process_mpa_request(struct iwch_ep *ep, struct sk_buff *skb) | |||
940 | /* | 941 | /* |
941 | * Copy the new data into our accumulation buffer. | 942 | * Copy the new data into our accumulation buffer. |
942 | */ | 943 | */ |
943 | memcpy(&(ep->mpa_pkt[ep->mpa_pkt_len]), skb->data, skb->len); | 944 | skb_copy_from_linear_data(skb, &(ep->mpa_pkt[ep->mpa_pkt_len]), |
945 | skb->len); | ||
944 | ep->mpa_pkt_len += skb->len; | 946 | ep->mpa_pkt_len += skb->len; |
945 | 947 | ||
946 | /* | 948 | /* |
@@ -1619,7 +1621,8 @@ static int terminate(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1619 | PDBG("%s ep %p\n", __FUNCTION__, ep); | 1621 | PDBG("%s ep %p\n", __FUNCTION__, ep); |
1620 | skb_pull(skb, sizeof(struct cpl_rdma_terminate)); | 1622 | skb_pull(skb, sizeof(struct cpl_rdma_terminate)); |
1621 | PDBG("%s saving %d bytes of term msg\n", __FUNCTION__, skb->len); | 1623 | PDBG("%s saving %d bytes of term msg\n", __FUNCTION__, skb->len); |
1622 | memcpy(ep->com.qp->attr.terminate_buffer, skb->data, skb->len); | 1624 | skb_copy_from_linear_data(skb, ep->com.qp->attr.terminate_buffer, |
1625 | skb->len); | ||
1623 | ep->com.qp->attr.terminate_msg_len = skb->len; | 1626 | ep->com.qp->attr.terminate_msg_len = skb->len; |
1624 | ep->com.qp->attr.is_terminate_local = 0; | 1627 | ep->com.qp->attr.is_terminate_local = 0; |
1625 | return CPL_RET_BUF_DONE; | 1628 | return CPL_RET_BUF_DONE; |