net: Use skb accessors in network drivers
In preparation for unifying the skb_frag and bio_vec, use the fine accessors which already exist and use skb_frag_t instead of struct skb_frag_struct. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7e24b4ed5a
commit
d7840976e3
@@ -861,7 +861,7 @@ static int igc_tx_map(struct igc_ring *tx_ring,
|
||||
struct igc_tx_buffer *tx_buffer;
|
||||
union igc_adv_tx_desc *tx_desc;
|
||||
u32 tx_flags = first->tx_flags;
|
||||
struct skb_frag_struct *frag;
|
||||
skb_frag_t *frag;
|
||||
u16 i = tx_ring->next_to_use;
|
||||
unsigned int data_len, size;
|
||||
dma_addr_t dma;
|
||||
@@ -1015,7 +1015,8 @@ static netdev_tx_t igc_xmit_frame_ring(struct sk_buff *skb,
|
||||
* otherwise try next time
|
||||
*/
|
||||
for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
|
||||
count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
|
||||
count += TXD_USE_COUNT(skb_frag_size(
|
||||
&skb_shinfo(skb)->frags[f]));
|
||||
|
||||
if (igc_maybe_stop_tx(tx_ring, count + 3)) {
|
||||
/* this is a hard error */
|
||||
|
Reference in New Issue
Block a user