Commit b061b39e authored by Ian Campbell's avatar Ian Campbell Committed by David S. Miller

benet: convert to SKB paged frag API.

Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b22c735
...@@ -638,7 +638,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq, ...@@ -638,7 +638,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq,
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
struct skb_frag_struct *frag = struct skb_frag_struct *frag =
&skb_shinfo(skb)->frags[i]; &skb_shinfo(skb)->frags[i];
busaddr = dma_map_page(dev, frag->page, frag->page_offset, busaddr = skb_frag_dma_map(dev, frag, 0,
frag->size, DMA_TO_DEVICE); frag->size, DMA_TO_DEVICE);
if (dma_mapping_error(dev, busaddr)) if (dma_mapping_error(dev, busaddr))
goto dma_err; goto dma_err;
...@@ -1066,7 +1066,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter, struct be_rx_obj *rxo, ...@@ -1066,7 +1066,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter, struct be_rx_obj *rxo,
skb->tail += curr_frag_len; skb->tail += curr_frag_len;
} else { } else {
skb_shinfo(skb)->nr_frags = 1; skb_shinfo(skb)->nr_frags = 1;
skb_shinfo(skb)->frags[0].page = page_info->page; skb_frag_set_page(skb, 0, page_info->page);
skb_shinfo(skb)->frags[0].page_offset = skb_shinfo(skb)->frags[0].page_offset =
page_info->page_offset + hdr_len; page_info->page_offset + hdr_len;
skb_shinfo(skb)->frags[0].size = curr_frag_len - hdr_len; skb_shinfo(skb)->frags[0].size = curr_frag_len - hdr_len;
...@@ -1091,7 +1091,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter, struct be_rx_obj *rxo, ...@@ -1091,7 +1091,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter, struct be_rx_obj *rxo,
if (page_info->page_offset == 0) { if (page_info->page_offset == 0) {
/* Fresh page */ /* Fresh page */
j++; j++;
skb_shinfo(skb)->frags[j].page = page_info->page; skb_frag_set_page(skb, j, page_info->page);
skb_shinfo(skb)->frags[j].page_offset = skb_shinfo(skb)->frags[j].page_offset =
page_info->page_offset; page_info->page_offset;
skb_shinfo(skb)->frags[j].size = 0; skb_shinfo(skb)->frags[j].size = 0;
...@@ -1173,7 +1173,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, ...@@ -1173,7 +1173,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
if (i == 0 || page_info->page_offset == 0) { if (i == 0 || page_info->page_offset == 0) {
/* First frag or Fresh page */ /* First frag or Fresh page */
j++; j++;
skb_shinfo(skb)->frags[j].page = page_info->page; skb_frag_set_page(skb, j, page_info->page);
skb_shinfo(skb)->frags[j].page_offset = skb_shinfo(skb)->frags[j].page_offset =
page_info->page_offset; page_info->page_offset;
skb_shinfo(skb)->frags[j].size = 0; skb_shinfo(skb)->frags[j].size = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment