[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>
This commit is contained in:
Arnaldo Carvalho de Melo
2007-03-27 18:55:52 -03:00
committed by David S. Miller
parent 2a123b86e2
commit d626f62b11
133 changed files with 321 additions and 230 deletions

View File

@@ -920,8 +920,10 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
/* copy the next 64 bytes - should be enough except
* for pathological case
*/
memcpy((void *)hwdesc, (void *)(skb->data) +
first_hdr_len, hdr_len - first_hdr_len);
skb_copy_from_linear_data_offset(skb, first_hdr_len,
hwdesc,
(hdr_len -
first_hdr_len));
producer = get_next_index(producer, max_tx_desc_count);
}
}