diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2007-03-31 10:55:19 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:29 -0400 |
commit | 27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch) | |
tree | b5a0c617cf8339524d3b1f1633e08eae7b94cf86 /drivers/s390/net/qeth_main.c | |
parent | 3dbad80ac7632f243b824d469301abb97ec634a1 (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/s390/net/qeth_main.c')
-rw-r--r-- | drivers/s390/net/qeth_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index df7f279ec408..ad7792dc1a04 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -2501,7 +2501,8 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2501 | vlan_tag = qeth_rebuild_skb(card, skb, hdr); | 2501 | vlan_tag = qeth_rebuild_skb(card, skb, hdr); |
2502 | else { /*in case of OSN*/ | 2502 | else { /*in case of OSN*/ |
2503 | skb_push(skb, sizeof(struct qeth_hdr)); | 2503 | skb_push(skb, sizeof(struct qeth_hdr)); |
2504 | memcpy(skb->data, hdr, sizeof(struct qeth_hdr)); | 2504 | skb_copy_to_linear_data(skb, hdr, |
2505 | sizeof(struct qeth_hdr)); | ||
2505 | } | 2506 | } |
2506 | /* is device UP ? */ | 2507 | /* is device UP ? */ |
2507 | if (!(card->dev->flags & IFF_UP)){ | 2508 | if (!(card->dev->flags & IFF_UP)){ |
@@ -3870,9 +3871,9 @@ __qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, int ipv) | |||
3870 | * memcpys instead of one memmove to save cycles. | 3871 | * memcpys instead of one memmove to save cycles. |
3871 | */ | 3872 | */ |
3872 | skb_push(skb, VLAN_HLEN); | 3873 | skb_push(skb, VLAN_HLEN); |
3873 | memcpy(skb->data, skb->data + 4, 4); | 3874 | skb_copy_to_linear_data(skb, skb->data + 4, 4); |
3874 | memcpy(skb->data + 4, skb->data + 8, 4); | 3875 | skb_copy_to_linear_data_offset(skb, 4, skb->data + 8, 4); |
3875 | memcpy(skb->data + 8, skb->data + 12, 4); | 3876 | skb_copy_to_linear_data_offset(skb, 8, skb->data + 12, 4); |
3876 | tag = (u16 *)(skb->data + 12); | 3877 | tag = (u16 *)(skb->data + 12); |
3877 | /* | 3878 | /* |
3878 | * first two bytes = ETH_P_8021Q (0x8100) | 3879 | * first two bytes = ETH_P_8021Q (0x8100) |