Hi Gabriel,
Thanks for pointing out this shortcoming.
However, I don't think that the solution you suggested would work as is.

@@ -628,21 +644,30 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct 
bnx2x_fastpath *fp,
                        bnx2x_fp_qstats(bp, fp)->rx_skb_alloc_failed++;
                        return err;
                }
+               if (old_rx_pg.offset + old_rx_pg.len >= PAGE_SIZE) {
+                       /* Unmap the page as we finished passing it to
+                        * the stack
+                        */
+                       old_rx_pg.mapping = old_rx_pg.mapping -
+                               old_rx_pg.offset;
+                       dma_unmap_page(&bp->pdev->dev,
+                                      dma_unmap_addr(&old_rx_pg, mapping),
+                                      PAGE_SIZE, DMA_FROM_DEVICE);
+               }

This code assumes that pages are consumed by the device in order. This is not 
true.
The pages are consumed according to packet arrival order, which can be from 
different aggregations.

We'll come up with a compatible solution.

Thanks,
Ariel
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to