summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/tehuti/tehuti.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-10-18 21:00:24 +0000
committerDavid S. Miller <davem@davemloft.net>2011-10-19 03:10:46 -0400
commit9e903e085262ffbf1fc44a17ac06058aca03524a (patch)
tree4acefc97ba38c1733474d25c0b2053b56af97db1 /drivers/net/ethernet/tehuti/tehuti.c
parentdd767856a36e00b631d65ebc4bb81b19915532d6 (diff)
downloadop-kernel-dev-9e903e085262ffbf1fc44a17ac06058aca03524a.zip
op-kernel-dev-9e903e085262ffbf1fc44a17ac06058aca03524a.tar.gz
net: add skb frag size accessors
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/tehuti/tehuti.c')
-rw-r--r--drivers/net/ethernet/tehuti/tehuti.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c
index c77e3bf4..3a90af6 100644
--- a/drivers/net/ethernet/tehuti/tehuti.c
+++ b/drivers/net/ethernet/tehuti/tehuti.c
@@ -1493,12 +1493,12 @@ bdx_tx_map_skb(struct bdx_priv *priv, struct sk_buff *skb,
bdx_tx_db_inc_wptr(db);
for (i = 0; i < nr_frags; i++) {
- struct skb_frag_struct *frag;
+ const struct skb_frag_struct *frag;
frag = &skb_shinfo(skb)->frags[i];
- db->wptr->len = frag->size;
+ db->wptr->len = skb_frag_size(frag);
db->wptr->addr.dma = skb_frag_dma_map(&priv->pdev->dev, frag,
- 0, frag->size,
+ 0, skb_frag_size(frag),
DMA_TO_DEVICE);
pbl++;
OpenPOWER on IntegriCloud