[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

@@ -645,7 +645,8 @@ static void netiucv_unpack_skb(struct iucv_connection *conn,
privptr->stats.rx_dropped++;
return;
}
memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len);
skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len),
pskb->len);
skb_reset_mac_header(skb);
skb->dev = pskb->dev;
skb->protocol = pskb->protocol;
@@ -744,7 +745,9 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN;
memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header,
NETIUCV_HDRLEN);
memcpy(skb_put(conn->tx_buff, skb->len), skb->data, skb->len);
skb_copy_from_linear_data(skb,
skb_put(conn->tx_buff, skb->len),
skb->len);
txbytes += skb->len;
txpackets++;
stat_maxcq++;