static int ena_com_hash_key_allocate(struct ena_com_dev *ena_dev)
 {
        struct ena_rss *rss = &ena_dev->rss;
+       struct ena_admin_feature_rss_flow_hash_control *hash_key;
+       struct ena_admin_get_feat_resp get_resp;
+       int rc;
+
+       hash_key = (ena_dev->rss).hash_key;
+
+       rc = ena_com_get_feature_ex(ena_dev, &get_resp,
+                                   ENA_ADMIN_RSS_HASH_FUNCTION,
+                                   ena_dev->rss.hash_key_dma_addr,
+                                   sizeof(ena_dev->rss.hash_key), 0);
+       if (unlikely(rc)) {
+               hash_key = NULL;
+               return -EOPNOTSUPP;
+       }
 
        rss->hash_key =
                dma_alloc_coherent(ena_dev->dmadev, sizeof(*rss->hash_key),
        if (unlikely(rc))
                goto err_indr_tbl;
 
+       /* The following function might return unsupported in case the
+        * device doesn't support setting the key / hash function. We can safely
+        * ignore this error and have indirection table support only.
+        */
        rc = ena_com_hash_key_allocate(ena_dev);
-       if (unlikely(rc))
+       if (unlikely(rc) && rc != -EOPNOTSUPP)
                goto err_hash_key;
-
-       ena_com_hash_key_fill_default_key(ena_dev);
+       else if (rc != -EOPNOTSUPP)
+               ena_com_hash_key_fill_default_key(ena_dev);
 
        rc = ena_com_hash_ctrl_init(ena_dev);
        if (unlikely(rc))