git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/hns3: fix some incomplete command structures
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_rxtx_vec.h
diff --git
a/drivers/net/mlx5/mlx5_rxtx_vec.h
b/drivers/net/mlx5/mlx5_rxtx_vec.h
index
b54ff72
..
6ddcbfb
100644
(file)
--- a/
drivers/net/mlx5/mlx5_rxtx_vec.h
+++ b/
drivers/net/mlx5/mlx5_rxtx_vec.h
@@
-9,8
+9,11
@@
#include <rte_common.h>
#include <rte_mbuf.h>
#include <rte_common.h>
#include <rte_mbuf.h>
+#include <mlx5_prm.h>
+
#include "mlx5_autoconf.h"
#include "mlx5_autoconf.h"
-#include "mlx5_prm.h"
+
+#include "mlx5_mr.h"
/* HW checksum offload capabilities of vectorized Tx. */
#define MLX5_VEC_TX_CKSUM_OFFLOAD_CAP \
/* HW checksum offload capabilities of vectorized Tx. */
#define MLX5_VEC_TX_CKSUM_OFFLOAD_CAP \
@@
-19,12
+22,6
@@
DEV_TX_OFFLOAD_TCP_CKSUM | \
DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
DEV_TX_OFFLOAD_TCP_CKSUM | \
DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)
-/* HW offload capabilities of vectorized Tx. */
-#define MLX5_VEC_TX_OFFLOAD_CAP \
- (MLX5_VEC_TX_CKSUM_OFFLOAD_CAP | \
- DEV_TX_OFFLOAD_MATCH_METADATA | \
- DEV_TX_OFFLOAD_MULTI_SEGS)
-
/*
* Compile time sanity check for vectorized functions.
*/
/*
* Compile time sanity check for vectorized functions.
*/
@@
-90,9
+87,10
@@
mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
&((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[elts_idx];
unsigned int i;
&((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[elts_idx];
unsigned int i;
- assert(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n));
- assert(n <= (uint16_t)(q_n - (rxq->rq_ci - rxq->rq_pi)));
- assert(MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n) > MLX5_VPMD_DESCS_PER_LOOP);
+ MLX5_ASSERT(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n));
+ MLX5_ASSERT(n <= (uint16_t)(q_n - (rxq->rq_ci - rxq->rq_pi)));
+ MLX5_ASSERT(MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n) >
+ MLX5_VPMD_DESCS_PER_LOOP);
/* Not to cross queue end. */
n = RTE_MIN(n - MLX5_VPMD_DESCS_PER_LOOP, q_n - elts_idx);
if (rte_mempool_get_bulk(rxq->mp, (void *)elts, n) < 0) {
/* Not to cross queue end. */
n = RTE_MIN(n - MLX5_VPMD_DESCS_PER_LOOP, q_n - elts_idx);
if (rte_mempool_get_bulk(rxq->mp, (void *)elts, n) < 0) {
@@
-103,18
+101,12
@@
mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
void *buf_addr;
/*
void *buf_addr;
/*
- *
Load the virtual address for Rx WQE. non-x86 processors
- *
(mostly RISC such as ARM and Power) are more vulnerable to
- *
load stall. For x86, reducing the number of instructions
- *
seems to matter most
.
+ *
In order to support the mbufs with external attached
+ *
data buffer we should use the buf_addr pointer instead of
+ *
rte_mbuf_buf_addr(). It touches the mbuf itself and may
+ *
impact the performance
.
*/
*/
-#ifdef RTE_ARCH_X86_64
buf_addr = elts[i]->buf_addr;
buf_addr = elts[i]->buf_addr;
- assert(buf_addr == rte_mbuf_buf_addr(elts[i], rxq->mp));
-#else
- buf_addr = rte_mbuf_buf_addr(elts[i], rxq->mp);
- assert(buf_addr == elts[i]->buf_addr);
-#endif
wq[i].addr = rte_cpu_to_be_64((uintptr_t)buf_addr +
RTE_PKTMBUF_HEADROOM);
/* If there's only one MR, no need to replace LKey in WQE. */
wq[i].addr = rte_cpu_to_be_64((uintptr_t)buf_addr +
RTE_PKTMBUF_HEADROOM);
/* If there's only one MR, no need to replace LKey in WQE. */