aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3
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 /drivers/net/cxgb3
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 'drivers/net/cxgb3')
-rw-r--r--drivers/net/cxgb3/sge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 166c959c94b9..3666586a4831 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -661,7 +661,7 @@ static inline struct sk_buff *get_imm_packet(const struct rsp_desc *resp)
661 661
662 if (skb) { 662 if (skb) {
663 __skb_put(skb, IMMED_PKT_SIZE); 663 __skb_put(skb, IMMED_PKT_SIZE);
664 memcpy(skb->data, resp->imm_data, IMMED_PKT_SIZE); 664 skb_copy_to_linear_data(skb, resp->imm_data, IMMED_PKT_SIZE);
665 } 665 }
666 return skb; 666 return skb;
667} 667}
@@ -1722,11 +1722,11 @@ static void skb_data_init(struct sk_buff *skb, struct sge_fl_page *p,
1722{ 1722{
1723 skb->len = len; 1723 skb->len = len;
1724 if (len <= SKB_DATA_SIZE) { 1724 if (len <= SKB_DATA_SIZE) {
1725 memcpy(skb->data, p->va, len); 1725 skb_copy_to_linear_data(skb, p->va, len);
1726 skb->tail += len; 1726 skb->tail += len;
1727 put_page(p->frag.page); 1727 put_page(p->frag.page);
1728 } else { 1728 } else {
1729 memcpy(skb->data, p->va, SKB_DATA_SIZE); 1729 skb_copy_to_linear_data(skb, p->va, SKB_DATA_SIZE);
1730 skb_shinfo(skb)->frags[0].page = p->frag.page; 1730 skb_shinfo(skb)->frags[0].page = p->frag.page;
1731 skb_shinfo(skb)->frags[0].page_offset = 1731 skb_shinfo(skb)->frags[0].page_offset =
1732 p->frag.page_offset + SKB_DATA_SIZE; 1732 p->frag.page_offset + SKB_DATA_SIZE;