net/mlx5: check Tx queue size overflow
[dpdk.git] / drivers / net / mlx5 / mlx5_rxtx.c
index baa4079..3da3f62 100644 (file)
@@ -693,7 +693,8 @@ pkt_inline:
                                                   RTE_CACHE_LINE_SIZE);
                        copy_b = (addr_end > addr) ?
                                 RTE_MIN((addr_end - addr), length) : 0;
-                       if (copy_b && ((end - (uintptr_t)raw) > copy_b)) {
+                       if (copy_b && ((end - (uintptr_t)raw) >
+                                      (copy_b + sizeof(inl)))) {
                                /*
                                 * One Dseg remains in the current WQE.  To
                                 * keep the computation positive, it is
@@ -2372,6 +2373,7 @@ removed_tx_burst(void *dpdk_txq __rte_unused,
                 struct rte_mbuf **pkts __rte_unused,
                 uint16_t pkts_n __rte_unused)
 {
+       rte_mb();
        return 0;
 }
 
@@ -2396,6 +2398,7 @@ removed_rx_burst(void *dpdk_txq __rte_unused,
                 struct rte_mbuf **pkts __rte_unused,
                 uint16_t pkts_n __rte_unused)
 {
+       rte_mb();
        return 0;
 }