quoted hunk ↗ jump to hunk
- addr += first_frame ? bp->rx_ip_align : 0;
-
- dma_sync_single_for_cpu(&bp->pdev->dev, addr, data_len,
+ dma_sync_single_for_cpu(&bp->pdev->dev,
+ addr + (first_frame ? bp->rx_ip_align : 0),
+ data_len,
page_pool_get_dma_dir(queue->page_pool));
if (first_frame) {@@ -1683,6 +1878,18 @@ static int gem_rx(struct macb_queue *queue, struct napi_struct *napi,
queue->stats.rx_dropped++;
}
+ headroom = bp->rx_headroom;
+
+ if (last_frame) {
+ ret = gem_xdp_run(queue, buff_head, &data_len,
+ &headroom, addr - gem_rx_pad(bp));
Just to clarify, Is xdp support only available for single-buff case? Is
it possible to receive multi-buff frames? If yes, should these be
allowed to bypass XDP or should these be dropped? The later case would
probably require explicit handling?