aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-27 17:55:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:23 -0400
commitd626f62b11e00c16e81e4308ab93d3f13551812a (patch)
treefac4af6ced853755e12fc709d55f0c2bec51265d /drivers/net/ehea
parent2a123b86e2b242a4a6db990d2851d45e192f88e5 (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/net/ehea')
-rw-r--r--drivers/net/ehea/ehea_main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 63732d2305bb..8b5392072632 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1306,7 +1306,7 @@ static void write_swqe2_TSO(struct sk_buff *skb,
1306 1306
1307 if (skb_data_size >= headersize) { 1307 if (skb_data_size >= headersize) {
1308 /* copy immediate data */ 1308 /* copy immediate data */
1309 memcpy(imm_data, skb->data, headersize); 1309 skb_copy_from_linear_data(skb, imm_data, headersize);
1310 swqe->immediate_data_length = headersize; 1310 swqe->immediate_data_length = headersize;
1311 1311
1312 if (skb_data_size > headersize) { 1312 if (skb_data_size > headersize) {
@@ -1337,7 +1337,7 @@ static void write_swqe2_nonTSO(struct sk_buff *skb,
1337 */ 1337 */
1338 if (skb_data_size >= SWQE2_MAX_IMM) { 1338 if (skb_data_size >= SWQE2_MAX_IMM) {
1339 /* copy immediate data */ 1339 /* copy immediate data */
1340 memcpy(imm_data, skb->data, SWQE2_MAX_IMM); 1340 skb_copy_from_linear_data(skb, imm_data, SWQE2_MAX_IMM);
1341 1341
1342 swqe->immediate_data_length = SWQE2_MAX_IMM; 1342 swqe->immediate_data_length = SWQE2_MAX_IMM;
1343 1343
@@ -1350,7 +1350,7 @@ static void write_swqe2_nonTSO(struct sk_buff *skb,
1350 swqe->descriptors++; 1350 swqe->descriptors++;
1351 } 1351 }
1352 } else { 1352 } else {
1353 memcpy(imm_data, skb->data, skb_data_size); 1353 skb_copy_from_linear_data(skb, imm_data, skb_data_size);
1354 swqe->immediate_data_length = skb_data_size; 1354 swqe->immediate_data_length = skb_data_size;
1355 } 1355 }
1356} 1356}
@@ -1772,10 +1772,11 @@ static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev,
1772 /* copy (immediate) data */ 1772 /* copy (immediate) data */
1773 if (nfrags == 0) { 1773 if (nfrags == 0) {
1774 /* data is in a single piece */ 1774 /* data is in a single piece */
1775 memcpy(imm_data, skb->data, skb->len); 1775 skb_copy_from_linear_data(skb, imm_data, skb->len);
1776 } else { 1776 } else {
1777 /* first copy data from the skb->data buffer ... */ 1777 /* first copy data from the skb->data buffer ... */
1778 memcpy(imm_data, skb->data, skb->len - skb->data_len); 1778 skb_copy_from_linear_data(skb, imm_data,
1779 skb->len - skb->data_len);
1779 imm_data += skb->len - skb->data_len; 1780 imm_data += skb->len - skb->data_len;
1780 1781
1781 /* ... then copy data from the fragments */ 1782 /* ... then copy data from the fragments */