Skip to content

Commit

Permalink
net/sfc: account for data offset on Tx
Browse files Browse the repository at this point in the history
[ upstream commit e7694b080de025fbc4bb31fbe7eb149f20a10373 ]

Memory buffers passed by the application may contain private data,
which must not be sent to the NIC. Omit this private data by using
the actual data address instead of the default one.

Fixes: 3037e6c ("net/sfc: support regioned NIC DMA memory mapping type")

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Reviewed-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
  • Loading branch information
okt-galaktionov authored and kevintraynor committed Oct 31, 2023
1 parent c0edca2 commit 0ea692c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/sfc/sfc_ef100_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ sfc_ef100_tx_qdesc_send_create(const struct sfc_ef100_txq *txq,
m->l2_len + m->l3_len) >> 1;
}

rc = sfc_ef100_tx_map(txq, rte_mbuf_data_iova_default(m),
rc = sfc_ef100_tx_map(txq, rte_mbuf_data_iova(m),
rte_pktmbuf_data_len(m), &dma_addr);
if (unlikely(rc != 0))
return rc;
Expand Down

0 comments on commit 0ea692c

Please sign in to comment.