net/mlx5: fix RSS hash result for flows
[dpdk.git] / drivers / net / mlx5 / mlx5_rxtx.c
index 2c5ca74..a0092b1 100644 (file)
@@ -1160,7 +1160,7 @@ mlx5_rx_poll_len(struct rxq *rxq, volatile struct mlx5_cqe *cqe,
                        zip->na += 8;
                }
                if (unlikely(rxq->zip.ai == rxq->zip.cqe_cnt)) {
-                       uint16_t idx = rxq->cq_ci;
+                       uint16_t idx = rxq->cq_ci + 1;
                        uint16_t end = zip->cq_ci;
 
                        while (idx != end) {
@@ -1338,7 +1338,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
                        /* Update packet information. */
                        pkt->packet_type = 0;
                        pkt->ol_flags = 0;
-                       if (rxq->rss_hash) {
+                       if (rss_hash_res && rxq->rss_hash) {
                                pkt->hash.rss = rss_hash_res;
                                pkt->ol_flags = PKT_RX_RSS_HASH;
                        }