From: Elad Persiko Date: Tue, 1 Nov 2016 08:13:27 +0000 (+0000) Subject: net/mlx5: fix buffer alignment in Tx X-Git-Tag: spdx-start~5365 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=609a0767d3dff75322029d201571ab1ddcfd74b5;p=dpdk.git net/mlx5: fix buffer alignment in Tx Constraint alignment was not respected in Tx because of a wrong use of vector instruction. Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path") Signed-off-by: Elad Persiko Acked-by: Adrien Mazarguil --- diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 5f948a4a55..1ccf1ecf62 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -307,7 +307,7 @@ mlx5_tx_dbrec(struct txq *txq) *txq->qp_db = htonl(txq->wqe_ci); /* Ensure ordering between DB record and BF copy. */ rte_wmb(); - rte_mov16(dst, (uint8_t *)data); + memcpy(dst, (uint8_t *)data, 16); txq->bf_offset ^= (1 << txq->bf_buf_size); } @@ -447,7 +447,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) wqe->eseg.mss = 0; wqe->eseg.rsvd2 = 0; /* Start by copying the Ethernet Header. */ - rte_mov16((uint8_t *)raw, (uint8_t *)addr); + memcpy((uint8_t *)raw, ((uint8_t *)addr), 16); length -= MLX5_WQE_DWORD_SIZE; addr += MLX5_WQE_DWORD_SIZE; /* Replace the Ethernet type by the VLAN if necessary. */