From a2f95d8127f356665e029b054b27a51698b2b6de Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 18 Oct 2011 21:00:24 +0000 Subject: [PATCH] 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 Signed-off-by: David S. Miller --- jme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jme.c b/jme.c index ed558dc..e918eaa 100644 --- a/jme.c +++ b/jme.c @@ -1994,7 +1994,7 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx) u8 hidma = jme->dev->features & NETIF_F_HIGHDMA; int i, nr_frags = skb_shinfo(skb)->nr_frags; int mask = jme->tx_ring_mask; - struct skb_frag_struct *frag; + const struct skb_frag_struct *frag; u32 len; for (i = 0 ; i < nr_frags ; ++i) { @@ -2008,7 +2008,7 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx) #else jme_fill_tx_map(jme->pdev, ctxdesc, ctxbi, skb_frag_page(frag), - frag->page_offset, frag->size, hidma); + frag->page_offset, skb_frag_size(frag), hidma); #endif } -- 2.39.3