mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
gve: add netmem TX support to GVE DQO-RDA mode
Use netmem_dma_*() helpers in gve_tx_dqo.c DQO-RDA paths to enable netmem TX support in that mode. Declare support for netmem TX in GVE DQO-RDA mode. Signed-off-by: Mina Almasry <almasrymina@google.com> Acked-by: Harshitha Ramamurthy <hramamurthy@google.com> Link: https://patch.msgid.link/20250508004830.4100853-8-almasrymina@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
383faec0fd
commit
c32532670c
|
|
@ -2659,6 +2659,9 @@ static int gve_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (err)
|
||||
goto abort_with_wq;
|
||||
|
||||
if (!gve_is_gqi(priv) && !gve_is_qpl(priv))
|
||||
dev->netmem_tx = true;
|
||||
|
||||
err = register_netdev(dev);
|
||||
if (err)
|
||||
goto abort_with_gve_init;
|
||||
|
|
|
|||
|
|
@ -660,7 +660,8 @@ static int gve_tx_add_skb_no_copy_dqo(struct gve_tx_ring *tx,
|
|||
goto err;
|
||||
|
||||
dma_unmap_len_set(pkt, len[pkt->num_bufs], len);
|
||||
dma_unmap_addr_set(pkt, dma[pkt->num_bufs], addr);
|
||||
netmem_dma_unmap_addr_set(skb_frag_netmem(frag), pkt,
|
||||
dma[pkt->num_bufs], addr);
|
||||
++pkt->num_bufs;
|
||||
|
||||
gve_tx_fill_pkt_desc_dqo(tx, desc_idx, skb, len, addr,
|
||||
|
|
@ -1038,8 +1039,9 @@ static void gve_unmap_packet(struct device *dev,
|
|||
dma_unmap_single(dev, dma_unmap_addr(pkt, dma[0]),
|
||||
dma_unmap_len(pkt, len[0]), DMA_TO_DEVICE);
|
||||
for (i = 1; i < pkt->num_bufs; i++) {
|
||||
dma_unmap_page(dev, dma_unmap_addr(pkt, dma[i]),
|
||||
dma_unmap_len(pkt, len[i]), DMA_TO_DEVICE);
|
||||
netmem_dma_unmap_page_attrs(dev, dma_unmap_addr(pkt, dma[i]),
|
||||
dma_unmap_len(pkt, len[i]),
|
||||
DMA_TO_DEVICE, 0);
|
||||
}
|
||||
pkt->num_bufs = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user