net/bnxt: fix RSS action
[dpdk.git] / drivers / net / ena / ena_ethdev.c
index b471102..68768ca 100644 (file)
@@ -21,7 +21,7 @@
 #include <ena_eth_io_defs.h>
 
 #define DRV_MODULE_VER_MAJOR   2
-#define DRV_MODULE_VER_MINOR   5
+#define DRV_MODULE_VER_MINOR   6
 #define DRV_MODULE_VER_SUBMINOR        0
 
 #define __MERGE_64B_H_L(h, l) (((uint64_t)h << 32) | l)
@@ -583,7 +583,13 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
        } else {
                if (unlikely(ena_rx_ctx->l4_csum_err)) {
                        ++rx_stats->l4_csum_bad;
-                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+                       /*
+                        * For the L4 Rx checksum offload the HW may indicate
+                        * bad checksum although it's valid. Because of that,
+                        * we're setting the UNKNOWN flag to let the app
+                        * re-verify the checksum.
+                        */
+                       ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
                } else {
                        ++rx_stats->l4_csum_good;
                        ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
@@ -1953,6 +1959,13 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
                return 0;
        }
 
+       if (adapter->dev_mem_base == NULL) {
+               PMD_DRV_LOG(ERR,
+                       "LLQ is advertised as supported, but device doesn't expose mem bar\n");
+               ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
+               return 0;
+       }
+
        rc = ena_com_config_dev_mode(ena_dev, llq, llq_default_configurations);
        if (unlikely(rc)) {
                PMD_INIT_LOG(WARNING,
@@ -1965,13 +1978,6 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
        if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST)
                return 0;
 
-       if (!adapter->dev_mem_base) {
-               PMD_DRV_LOG(ERR,
-                       "Unable to access LLQ BAR resource. Fallback to host mode policy.\n");
-               ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
-               return 0;
-       }
-
        ena_dev->mem_bar = adapter->dev_mem_base;
 
        return 0;